Commit a8b75053 authored by Zhang Xin's avatar Zhang Xin
Browse files

add straylight limit for big value

parent d008c206
......@@ -115,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
......
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