Commit 20c5ee5f authored by Wei Chengliang's avatar Wei Chengliang
Browse files

update codestyle-PEP8

parent 00508e40
Pipeline #7097 failed with stage
in 0 seconds
......@@ -31,7 +31,7 @@ def get_trap_map(seeds,nx,ny,nmax,rho_trap,beta,c,out_dir):
get_trap_h(seeds_p,c_int(int(nsp)),c_int(int(nx)),c_int(int(ny)),\
c_int(int(nmax)),rho_trap_p,c_float(beta),\
c_float(c),filename)
def bin2fits(bin_file,fits_dir,nsp,nx,ny,nmax):
data = np.fromfile(bin_file,dtype=np.float32)
data = data.reshape(nx,nsp,ny,nmax).transpose(1,3,2,0)
......@@ -101,6 +101,6 @@ if __name__ =='__main__':
image = fits.getdata("inputdata/image.fits").astype(np.int32)
get_trap_map(trap_seeds,nx,ny,nmax,rho_trap,beta,c,".")
bin2fits("trap.bin",".",nsp,nx,ny,nmax)
image_cti = CTI_sim(image,nx,ny,noverscan,nsp,nmax,beta,w,c,t,rho_trap,trap_seeds,release_seed)
image_cti = CTI_sim(image,nx,ny,noverscan,nsp,nmax,beta,w,c,t,rho_trap,trap_seeds,release_seed)
fits.writeto("output/image_CTI.fits",data=image_cti,overwrite=True)
"""
......@@ -50,7 +50,7 @@ class PSFGauss(PSFModel):
Return: the flux ratio
"""
if pscale == None:
if pscale is None:
pscale = self.pix_size
gaussx = galsim.Gaussian(flux=1.0, sigma=sig)
gaussImg = gaussx.drawImage(scale=pscale, method='no_pixel')
......@@ -68,7 +68,7 @@ class PSFGauss(PSFModel):
return the fwhm in arcsec
"""
if pscale == None:
if pscale is None:
pscale = self.pix_size
err = 1.0e-3
nxx = 100
......@@ -122,4 +122,5 @@ class PSFGauss(PSFModel):
# return ell, beta, qr
PSFshear = galsim.Shear(e=ell, beta=beta*galsim.radians)
return self.psf.shear(PSFshear), PSFshear
\ No newline at end of file
return self.psf.shear(PSFshear), PSFshear
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment