Commit 94c62f0a authored by Fang Yuedong's avatar Fang Yuedong
Browse files

move CTE effect before adding bias

parent 042e55d9
...@@ -515,21 +515,6 @@ class Chip(FocalPlane): ...@@ -515,21 +515,6 @@ class Chip(FocalPlane):
if config["ins_effects"]["add_badcolumns"] == True: if config["ins_effects"]["add_badcolumns"] == True:
img = effects.BadColumns(img, seed=SeedBadColumns, chipid=self.chipID, logger=self.logger) img = effects.BadColumns(img, seed=SeedBadColumns, chipid=self.chipID, logger=self.logger)
# Add Bias level
if config["ins_effects"]["add_bias"] == True:
if self.logger is not None:
self.logger.info(" Adding Bias level and 16-channel non-uniformity")
else:
print(" Adding Bias level and 16-channel non-uniformity")
if config["ins_effects"]["bias_16channel"] == True:
img = effects.AddBiasNonUniform16(img,
bias_level=float(self.bias_level),
nsecy = 2, nsecx=8,
seed=SeedBiasNonuni+self.chipID,
logger=self.logger)
elif config["ins_effects"]["bias_16channel"] == False:
img += self.bias_level
# Apply Nonlinearity on the chip image # Apply Nonlinearity on the chip image
if config["ins_effects"]["non_linear"] == True: if config["ins_effects"]["non_linear"] == True:
if self.logger is not None: if self.logger is not None:
...@@ -553,6 +538,21 @@ class Chip(FocalPlane): ...@@ -553,6 +538,21 @@ class Chip(FocalPlane):
else: else:
print(" Apply CTE Effect") print(" Apply CTE Effect")
img = effects.CTE_Effect(GSImage=img, threshold=27) img = effects.CTE_Effect(GSImage=img, threshold=27)
# Add Bias level
if config["ins_effects"]["add_bias"] == True:
if self.logger is not None:
self.logger.info(" Adding Bias level and 16-channel non-uniformity")
else:
print(" Adding Bias level and 16-channel non-uniformity")
if config["ins_effects"]["bias_16channel"] == True:
img = effects.AddBiasNonUniform16(img,
bias_level=float(self.bias_level),
nsecy = 2, nsecx=8,
seed=SeedBiasNonuni+self.chipID,
logger=self.logger)
elif config["ins_effects"]["bias_16channel"] == False:
img += self.bias_level
# Add Read-out Noise # Add Read-out Noise
if config["ins_effects"]["add_readout"] == True: if config["ins_effects"]["add_readout"] == True:
......
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