Commit 446862eb authored by Fang Yuedong's avatar Fang Yuedong
Browse files

fix skyback_level rescaling

parent b567986b
......@@ -439,14 +439,13 @@ class Observation(object):
pf_map = led_flat
# whether to output zero, dark, flat calibration images.
expTime = self.config["obs_setting"]["exp_time"]
skybg_unit = self.filter_param.param[sky_level_filt][5]
norm_scaler = skyback_level/expTime/skybg_unit
norm_scaler = skyback_level/expTime * self.filter_param.param[chip.filter_type][5] / self.filter_param.param[sky_level_filt][5]
if skyback_level == 0:
self.config["ins_effects"]["shutter_effect"] = False
if chip.survey_type == "photometric":
sky_map = np.ones_like(chip.img.array) * skybg_unit * norm_scaler / self.tel.pupil_area
sky_map = np.ones_like(chip.img.array) * norm_scaler / self.tel.pupil_area
elif chip.survey_type == "spectroscopic":
flat_normal = np.ones_like(chip.img.array)
if self.config["ins_effects"]["flat_fielding"] == 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