Commit 2eb4e6b5 authored by Wei Chengliang's avatar Wei Chengliang
Browse files

update codestyle-PEP8

parent 1a887d44
Pipeline #7144 passed with stage
in 0 seconds
......@@ -51,7 +51,7 @@ def add_crosstalk(GSimg):
# 1*16 -> 2*8
newimg = chip_utils.formatRevert(newimg)
return newimg
return newimg
# test FUNCTION --- END #
......@@ -64,7 +64,7 @@ class detModule_coverage(unittest.TestCase):
def test_add_crosstalk(self):
nsecy = 2
nsecx = 8
ny, nx = 1024,1024
ny, nx = 1024, 1024
dy = int(ny/nsecy)
dx = int(nx/nsecx)
mapclip = np.zeros([dy, int(nsecx*nsecy*dx)])
......@@ -74,18 +74,18 @@ class detModule_coverage(unittest.TestCase):
nsecy = 1
nsecx = 16
ny,nx = mapclip.array.shape
ny, nx = mapclip.array.shape
dy = int(ny/nsecy)
dx = int(nx/nsecx)
for i in range(int(nsecy*nsecx)):
gal = galsim.Gaussian(sigma=0.2, flux=500000).drawImage(nx=32, ny=32).array
py = np.random.randint(450)+10
mapclip.array[py:py+32, int(i*dx)+10:int(i*dx)+42] += gal
tmap = chip_utils.formatRevert(mapclip, nsecy=1, nsecx=16) # 1*16 -> 2*8
temp = add_crosstalk(tmap)
fig = plt.figure(figsize=(20,60))
fig = plt.figure(figsize=(20, 60))
ax = plt.subplot(311)
plt.imshow(np.log10(mapclip.array+1), origin='lower', cmap='gray')
ax = plt.subplot(312)
......
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