Loading observation_sim/mock_objects/FlatLED.py +5 −3 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ class FlatLED(MockObject): ledflats = bandtoLed[self.chip.filter_type] iFlat = np.zeros([self.chip.npix_y, self.chip.npix_x]) for nled in ledflats: iFlat = iFlat + self.getLEDImage(led_type=nled, LED_Img_flag=False) iFlat = iFlat + self.getLEDImage1(led_type=nled, LED_Img_flag=False) iFlat = iFlat/len(ledflats) return iFlat Loading Loading @@ -123,7 +123,7 @@ class FlatLED(MockObject): # return LED flat, e/s ### def getLEDImage1(self, led_type='LED1'): def getLEDImage1(self, led_type='LED1', LED_Img_flag =True): # cwave = cwaves[led_type] flat = fits.open(os.path.join(self.flatDir, 'model_' + cwaves_name[led_type] + 'nm.fits')) Loading Loading @@ -155,6 +155,8 @@ class FlatLED(MockObject): N[0:self.chip.npix_y, 0:self.chip.npix_x]), method='linear') U = U/np.mean(U) flatImage = U if LED_Img_flag: flatImage = U*fluxLED[led_type]*1000 gc.collect() return flatImage Loading Loading
observation_sim/mock_objects/FlatLED.py +5 −3 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ class FlatLED(MockObject): ledflats = bandtoLed[self.chip.filter_type] iFlat = np.zeros([self.chip.npix_y, self.chip.npix_x]) for nled in ledflats: iFlat = iFlat + self.getLEDImage(led_type=nled, LED_Img_flag=False) iFlat = iFlat + self.getLEDImage1(led_type=nled, LED_Img_flag=False) iFlat = iFlat/len(ledflats) return iFlat Loading Loading @@ -123,7 +123,7 @@ class FlatLED(MockObject): # return LED flat, e/s ### def getLEDImage1(self, led_type='LED1'): def getLEDImage1(self, led_type='LED1', LED_Img_flag =True): # cwave = cwaves[led_type] flat = fits.open(os.path.join(self.flatDir, 'model_' + cwaves_name[led_type] + 'nm.fits')) Loading Loading @@ -155,6 +155,8 @@ class FlatLED(MockObject): N[0:self.chip.npix_y, 0:self.chip.npix_x]), method='linear') U = U/np.mean(U) flatImage = U if LED_Img_flag: flatImage = U*fluxLED[led_type]*1000 gc.collect() return flatImage Loading