Loading csst_mci_sim/earthshine.py +26 −24 Original line number Diff line number Diff line Loading @@ -153,30 +153,32 @@ class StrayLight(object): self.slcdll.Init(str.encode(self.deFn), str.encode( self.PSTFn), str.encode(self.RFn), str.encode(self.ZolFn)) def caculateStarLightFilter(self, filter='i'): filterIndex = {'nuv': 0, 'u': 1, 'g': 2, 'r': 3, 'i': 4, 'z': 5, 'y': 6} # def caculateStarLightFilter(self, filter='i'): # filterIndex = {'nuv': 0, 'u': 1, 'g': 2, # 'r': 3, 'i': 4, 'z': 5, 'y': 6} sat = (ctypes.c_double*3)() sat[:] = self.sat ob = (ctypes.c_double*3)() ob[:] = self.pointing # sat = (ctypes.c_double*3)() # sat[:] = self.sat # ob = (ctypes.c_double*3)() # ob[:] = self.pointing py1 = (ctypes.c_double*3)() py2 = (ctypes.c_double*3)() self.slcdll.ComposeY(ob, py1, py2) # py1 = (ctypes.c_double*3)() # py2 = (ctypes.c_double*3)() # self.slcdll.ComposeY(ob, py1, py2) star_e1 = (ctypes.c_double*7)() self.slcdll.PointSource(self.jtime, sat, ob, py1, star_e1, str.encode(self.brightStarTabFn)) star_e2 = (ctypes.c_double*7)() self.slcdll.PointSource(self.jtime, sat, ob, py2, star_e2, str.encode(self.brightStarTabFn)) # star_e1 = (ctypes.c_double*7)() # self.slcdll.PointSource(self.jtime, sat, ob, py1, # star_e1, str.encode(self.brightStarTabFn)) # star_e2 = (ctypes.c_double*7)() # self.slcdll.PointSource(self.jtime, sat, ob, py2, # star_e2, str.encode(self.brightStarTabFn)) band_star_e1 = star_e1[:][filterIndex[filter]] band_star_e2 = star_e2[:][filterIndex[filter]] # band_star_e1 = star_e1[:][filterIndex[filter]] # band_star_e2 = star_e2[:][filterIndex[filter]] return max(band_star_e1, band_star_e2) # return max(band_star_e1, band_star_e2) ############################################################################### def caculateEarthShineFilter(self, filter='i'): Loading csst_mci_sim/straylight.py +18 −18 Original line number Diff line number Diff line Loading @@ -178,30 +178,30 @@ class StrayLight(object): return max(band_star_e1, band_star_e2) def caculateEarthShineFilter(self, filter='i'): # def caculateEarthShineFilter(self, filter='i'): filterIndex = {'nuv': 0, 'u': 1, 'g': 2, 'r': 3, 'i': 4, 'z': 5, 'y': 6} sat = (ctypes.c_double*3)() sat[:] = self.sat ob = (ctypes.c_double*3)() ob[:] = self.pointing # filterIndex = {'nuv': 0, 'u': 1, 'g': 2, # 'r': 3, 'i': 4, 'z': 5, 'y': 6} # sat = (ctypes.c_double*3)() # sat[:] = self.sat # ob = (ctypes.c_double*3)() # ob[:] = self.pointing py1 = (ctypes.c_double*3)() py2 = (ctypes.c_double*3)() self.slcdll.ComposeY(ob, py1, py2) # py1 = (ctypes.c_double*3)() # py2 = (ctypes.c_double*3)() # self.slcdll.ComposeY(ob, py1, py2) earth_e1 = (ctypes.c_double*7)() self.slcdll.EarthShine(self.jtime, sat, ob, py1, earth_e1) # e[7]代表7个波段的照度 # earth_e1 = (ctypes.c_double*7)() # self.slcdll.EarthShine(self.jtime, sat, ob, py1, # earth_e1) # e[7]代表7个波段的照度 earth_e2 = (ctypes.c_double*7)() self.slcdll.EarthShine(self.jtime, sat, ob, py2, earth_e2) # earth_e2 = (ctypes.c_double*7)() # self.slcdll.EarthShine(self.jtime, sat, ob, py2, earth_e2) band_earth_e1 = earth_e1[:][filterIndex[filter]] band_earth_e2 = earth_e2[:][filterIndex[filter]] # band_earth_e1 = earth_e1[:][filterIndex[filter]] # band_earth_e2 = earth_e2[:][filterIndex[filter]] return max(band_earth_e1, band_earth_e2) # return max(band_earth_e1, band_earth_e2) ############################################################################### Loading Loading
csst_mci_sim/earthshine.py +26 −24 Original line number Diff line number Diff line Loading @@ -153,30 +153,32 @@ class StrayLight(object): self.slcdll.Init(str.encode(self.deFn), str.encode( self.PSTFn), str.encode(self.RFn), str.encode(self.ZolFn)) def caculateStarLightFilter(self, filter='i'): filterIndex = {'nuv': 0, 'u': 1, 'g': 2, 'r': 3, 'i': 4, 'z': 5, 'y': 6} # def caculateStarLightFilter(self, filter='i'): # filterIndex = {'nuv': 0, 'u': 1, 'g': 2, # 'r': 3, 'i': 4, 'z': 5, 'y': 6} sat = (ctypes.c_double*3)() sat[:] = self.sat ob = (ctypes.c_double*3)() ob[:] = self.pointing # sat = (ctypes.c_double*3)() # sat[:] = self.sat # ob = (ctypes.c_double*3)() # ob[:] = self.pointing py1 = (ctypes.c_double*3)() py2 = (ctypes.c_double*3)() self.slcdll.ComposeY(ob, py1, py2) # py1 = (ctypes.c_double*3)() # py2 = (ctypes.c_double*3)() # self.slcdll.ComposeY(ob, py1, py2) star_e1 = (ctypes.c_double*7)() self.slcdll.PointSource(self.jtime, sat, ob, py1, star_e1, str.encode(self.brightStarTabFn)) star_e2 = (ctypes.c_double*7)() self.slcdll.PointSource(self.jtime, sat, ob, py2, star_e2, str.encode(self.brightStarTabFn)) # star_e1 = (ctypes.c_double*7)() # self.slcdll.PointSource(self.jtime, sat, ob, py1, # star_e1, str.encode(self.brightStarTabFn)) # star_e2 = (ctypes.c_double*7)() # self.slcdll.PointSource(self.jtime, sat, ob, py2, # star_e2, str.encode(self.brightStarTabFn)) band_star_e1 = star_e1[:][filterIndex[filter]] band_star_e2 = star_e2[:][filterIndex[filter]] # band_star_e1 = star_e1[:][filterIndex[filter]] # band_star_e2 = star_e2[:][filterIndex[filter]] return max(band_star_e1, band_star_e2) # return max(band_star_e1, band_star_e2) ############################################################################### def caculateEarthShineFilter(self, filter='i'): Loading
csst_mci_sim/straylight.py +18 −18 Original line number Diff line number Diff line Loading @@ -178,30 +178,30 @@ class StrayLight(object): return max(band_star_e1, band_star_e2) def caculateEarthShineFilter(self, filter='i'): # def caculateEarthShineFilter(self, filter='i'): filterIndex = {'nuv': 0, 'u': 1, 'g': 2, 'r': 3, 'i': 4, 'z': 5, 'y': 6} sat = (ctypes.c_double*3)() sat[:] = self.sat ob = (ctypes.c_double*3)() ob[:] = self.pointing # filterIndex = {'nuv': 0, 'u': 1, 'g': 2, # 'r': 3, 'i': 4, 'z': 5, 'y': 6} # sat = (ctypes.c_double*3)() # sat[:] = self.sat # ob = (ctypes.c_double*3)() # ob[:] = self.pointing py1 = (ctypes.c_double*3)() py2 = (ctypes.c_double*3)() self.slcdll.ComposeY(ob, py1, py2) # py1 = (ctypes.c_double*3)() # py2 = (ctypes.c_double*3)() # self.slcdll.ComposeY(ob, py1, py2) earth_e1 = (ctypes.c_double*7)() self.slcdll.EarthShine(self.jtime, sat, ob, py1, earth_e1) # e[7]代表7个波段的照度 # earth_e1 = (ctypes.c_double*7)() # self.slcdll.EarthShine(self.jtime, sat, ob, py1, # earth_e1) # e[7]代表7个波段的照度 earth_e2 = (ctypes.c_double*7)() self.slcdll.EarthShine(self.jtime, sat, ob, py2, earth_e2) # earth_e2 = (ctypes.c_double*7)() # self.slcdll.EarthShine(self.jtime, sat, ob, py2, earth_e2) band_earth_e1 = earth_e1[:][filterIndex[filter]] band_earth_e2 = earth_e2[:][filterIndex[filter]] # band_earth_e1 = earth_e1[:][filterIndex[filter]] # band_earth_e2 = earth_e2[:][filterIndex[filter]] return max(band_earth_e1, band_earth_e2) # return max(band_earth_e1, band_earth_e2) ############################################################################### Loading