Loading ObservationSim/Instrument/Filter.py +5 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ class Filter(object): self.sky_background = filter_param.param[filter_type][5] self.mag_saturation = filter_param.param[filter_type][6] self.mag_limiting = filter_param.param[filter_type][7] self.zodical_spec = None def is_too_bright(self, mag, margin=-2.5): return mag <= self.mag_saturation + margin Loading Loading @@ -114,10 +115,14 @@ class Filter(object): sl = Straylight(jtime=jtime, sat_pos=sat_pos, pointing_radec=pointing_radec,sun_pos=sun_pos) if self.filter_type in ["GU","GV","GI"]: s_pix, spec = sl.calculateStrayLightGrating(grating = self.filter_type.upper()) if s_pix>0.8: s_pix = 0.8 self.sky_background = s_pix self.zodical_spec = spec elif self.filter_type.lower() in ["nuv","u","g","r","i","z","y"]: s_pix = sl.calculateStrayLightFilter(filter=self.filter_type.lower()) if s_pix>1: s_pix = 1 self.sky_background = s_pix self.zodical_spec = None Loading ObservationSim/ObservationSim.py +3 −2 Original line number Diff line number Diff line Loading @@ -107,9 +107,10 @@ class Observation(object): chip.img.setOrigin(chip.bound.xmin, chip.bound.ymin) chip.img.wcs = wcs_fp if self.config["obs_setting"]["enable_straylight_model"]: filt.setFilterStrayLightPixel(jtime = pointing.jdt, sat_pos = np.array([pointing.sat_x, pointing.sat_y, pointing.sat_z]), pointing_radec = np.array([pointing.ra,pointing.dec]), sun_pos = np.array([pointing.sun_x,pointing.sun_y,pointing.sun_z])) print("========================sky pix========================\n") print("========================sky pix========================") print(filt.sky_background) if chip.survey_type == "photometric": Loading config/config_C6.yaml +3 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,9 @@ obs_setting: # Whether to enable astrometric modeling enable_astrometric_model: True # Whether to enable straylight model enable_straylight_model: False # Cut by saturation magnitude in which band? cut_in_band: "z" Loading Loading
ObservationSim/Instrument/Filter.py +5 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ class Filter(object): self.sky_background = filter_param.param[filter_type][5] self.mag_saturation = filter_param.param[filter_type][6] self.mag_limiting = filter_param.param[filter_type][7] self.zodical_spec = None def is_too_bright(self, mag, margin=-2.5): return mag <= self.mag_saturation + margin Loading Loading @@ -114,10 +115,14 @@ class Filter(object): sl = Straylight(jtime=jtime, sat_pos=sat_pos, pointing_radec=pointing_radec,sun_pos=sun_pos) if self.filter_type in ["GU","GV","GI"]: s_pix, spec = sl.calculateStrayLightGrating(grating = self.filter_type.upper()) if s_pix>0.8: s_pix = 0.8 self.sky_background = s_pix self.zodical_spec = spec elif self.filter_type.lower() in ["nuv","u","g","r","i","z","y"]: s_pix = sl.calculateStrayLightFilter(filter=self.filter_type.lower()) if s_pix>1: s_pix = 1 self.sky_background = s_pix self.zodical_spec = None Loading
ObservationSim/ObservationSim.py +3 −2 Original line number Diff line number Diff line Loading @@ -107,9 +107,10 @@ class Observation(object): chip.img.setOrigin(chip.bound.xmin, chip.bound.ymin) chip.img.wcs = wcs_fp if self.config["obs_setting"]["enable_straylight_model"]: filt.setFilterStrayLightPixel(jtime = pointing.jdt, sat_pos = np.array([pointing.sat_x, pointing.sat_y, pointing.sat_z]), pointing_radec = np.array([pointing.ra,pointing.dec]), sun_pos = np.array([pointing.sun_x,pointing.sun_y,pointing.sun_z])) print("========================sky pix========================\n") print("========================sky pix========================") print(filt.sky_background) if chip.survey_type == "photometric": Loading
config/config_C6.yaml +3 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,9 @@ obs_setting: # Whether to enable astrometric modeling enable_astrometric_model: True # Whether to enable straylight model enable_straylight_model: False # Cut by saturation magnitude in which band? cut_in_band: "z" Loading