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

update codestyle-PEP8

parent b8b5bed9
Loading
Loading
Loading
Loading
Loading
+32 −37
Original line number Diff line number Diff line
@@ -3,7 +3,8 @@ from matplotlib.pyplot import flag
import numpy as np
from numpy.core.fromnumeric import mean, size
from numpy.random import Generator, PCG64
import math,copy
import math
import copy
from numba import jit
from astropy import stats

@@ -390,9 +391,9 @@ def ChargeFlow(imgarr, fullwell=9E4):
        except Exception as e:
            print(e, '@pix ', (yi+1, xi+1))
            return imgarr
        
    return imgarr


def SaturBloom(GSImage, nsect_x=1, nsect_y=1, fullwell=9e4):
    """
    To simulate digital detector's saturation and blooming effect. The blooming is along the read-out direction, perpendicular to the charge transfer direction. Charge clumpy overflows the pixel well will flow to two oposite directions with nearly same charges.
@@ -530,12 +531,8 @@ def CTEModelColRow(img, trail_direction = 'up', direction='column', threshold=27

                all_trail_pix += t_pow
                all_trail[m] = t_pow


            trail_pix_eff = trail_f/all_trail_pix

            all_trail = trail_pix_eff*all_trail

            all_trail[0] = f - trail_f
            
            for m in np.arange(0, xy_num, 1):
@@ -559,10 +556,8 @@ def CTEModelColRow(img, trail_direction = 'up', direction='column', threshold=27
    return n_img



# ---------- For Cosmic-Ray Simulation ------------
# ---------- Zhang Xin ----------------------------

def getYValue(collection, x):
    index = 0;
    if (collection.shape[1] == 2):