Commit 8fd9723d authored by Wei Chengliang's avatar Wei Chengliang
Browse files

update codestyle-PEP8

parent 9a4dead8
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ class FilterParam(object):
        # 6) sky background: e/pix/s
        # 7) saturation magnitude
        # 8) dim end magnitude
        if filter_param == None:
        if filter_param is None:
            filtP = {
                "NUV":   [2867.7,   705.4,  2470.0,   3270.0,  0.1404, 0.004, 15.7, 25.4],
                "u":     [3601.1,   852.1,  3120.0,   4090.0,  0.2176, 0.021, 16.1, 25.4],
+2 −2
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ class FocalPlane(object):
        self.nchips = 42
        self.ignore_chips = []

        if bad_chips == None:
        if bad_chips is None:
            self.bad_chips = []
        else:
            self.bad_chips = bad_chips
@@ -80,7 +80,7 @@ class FocalPlane(object):
        if logger is not None:
            logger.info(
                "    Construct the wcs of the entire image mosaic using Gnomonic/TAN projection")
        if (xcen == None) or (ycen == None):
        if (xcen is None) or (ycen is None):
            xcen = self.cen_pix_x
            ycen = self.cen_pix_y

+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ class Chip(FocalPlane):
        """Return the filter index and type for a given chip #(chipID)
        """
        filter_type_list = _util.ALL_FILTERS
        if chipID == None:
        if chipID is None:
            chipID = self.chipID

        # updated configurations
+2 −2
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@ def get_poisson(seed=0, sky_level=0.):


def get_base_img(img, chip, read_noise, readout_time, dark_noise, exptime=150., InputDark=None):
    if InputDark == None:
    if InputDark is None:
        # base_level = read_noise**2 + dark_noise*(exptime+0.5*readout_time)
        # base_level = dark_noise*(exptime+0.5*readout_time)
        base_level = dark_noise*(exptime)
@@ -237,7 +237,7 @@ def add_poisson(img, chip, exptime=150., seed=0, sky_level=0., poisson_noise=Non
    img.addNoise(poisson_noise)
    # img -= read_noise**2

    if InputDark != None:
    if InputDark is not None:
        # "Instrument/data/dark/dark_1000s_example_0.fits"
        hdu = fits.open(InputDark)
        img += hdu[0].data/hdu[0].header['exptime']*exptime
+1 −1
Original line number Diff line number Diff line
@@ -80,6 +80,6 @@ def add_bias(self, chip, filt, tel, pointing, catalog, obs_param):
                                               nsecy=chip.nsecy,
                                               nsecx=chip.nsecx,
                                               seed=self.overall_config["random_seeds"]["seed_biasNonUniform"]+chip.chipID)
    elif obs_param["bias_16channel"] == False:
    elif obs_param["bias_16channel"] is False:
        chip.img += chip.bias_level
    return chip, filt, tel, pointing
+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

Loading