diff --git a/ObservationSim/MockObject/FlatLED.py b/ObservationSim/MockObject/FlatLED.py index 4ce0bc91ba07c548069c8ca4a23d7375ac3362bb..8c517cda98e9c0eea51f5fddf130b810fabc5dcf 100755 --- a/ObservationSim/MockObject/FlatLED.py +++ b/ObservationSim/MockObject/FlatLED.py @@ -35,12 +35,21 @@ cwaves_fwhm = {'LED1': 110, 'LED2': 120, 'LED3': 200, 'LED4': 300, 'LED5': 300, 'LED8': 260, 'LED9': 400, 'LED10': 370, 'LED11': 500, 'LED12': 1400, 'LED13': 90, 'LED14': 100} # LED_QE = {'LED1': 0.3, 'LED2': 0.4, 'LED13': 0.5, 'LED14': 0.5, 'LED10': 0.4} # e-/ms -fluxLED = {'LED1': 0.16478729, 'LED2': 0.084220931, 'LED3': 2.263360617, 'LED4': 2.190623489, 'LED5': 0.703504768, - 'LED6': 0.446117963, 'LED7': 0.647122098, 'LED8': 0.922313442, - 'LED9': 0.987278143, 'LED10': 2.043989167, 'LED11': 0.612571429, 'LED12': 1.228915663, 'LED13': 0.17029384, - 'LED14': 0.27842925} +# fluxLED = {'LED1': 0.16478729, 'LED2': 0.084220931, 'LED3': 2.263360617, 'LED4': 2.190623489, 'LED5': 0.703504768, +# 'LED6': 0.446117963, 'LED7': 0.647122098, 'LED8': 0.922313442, +# 'LED9': 0.987278143, 'LED10': 2.043989167, 'LED11': 0.612571429, 'LED12': 1.228915663, 'LED13': 0.17029384, +# 'LED14': 0.27842925} + +# e-/ms +fluxLED = {'LED1': 15, 'LED2': 15, 'LED3': 12.5, 'LED4': 9, 'LED5': 9, + 'LED6': 9, 'LED7': 9, 'LED8': 9, 'LED9': 9, 'LED10': 12.5, 'LED11': 15, 'LED12':15, 'LED13': 12.5, + 'LED14': 12.5} +# fluxLEDL = {'LED1': 10, 'LED2': 10, 'LED3': 10, 'LED4': 10, 'LED5': 10, +# 'LED6': 10, 'LED7': 10, 'LED8': 10, 'LED9': 10, 'LED10': 10, 'LED11': 10, 'LED12':10, 'LED13': 10, +# 'LED14': 10} mirro_eff = {'GU':0.61, 'GV':0.8, 'GI':0.8} +# mirro_eff = {'GU':1, 'GV':1, 'GI':1} class FlatLED(object): def __init__(self, chip,filt, flatDir = None, logger=None): @@ -115,7 +124,7 @@ class FlatLED(object): t_spec = np.trapz(f_spec*ccd_eff*fil_eff, w_list) # print(i, np.mean(unitFlatImg), t_spec, exp_t) unitFlatImg = unitFlatImg * t_spec - + # print("DEBUG1:---------------",np.mean(unitFlatImg)) ledFlat = ledFlat+unitFlatImg*exp_t return ledFlat @@ -134,6 +143,7 @@ class FlatLED(object): led_wave = cwaves[led_type] led_fwhm = cwaves_fwhm[led_type] led_spec = self.gaussian1d_profile_led(led_wave, led_fwhm) + # print("DEBUG1:---------------",np.mean(ledFlat_)) ledspec_map = self.calculateLEDSpec( skyMap=ledFlat_, blueLimit=self.filt.blue_limit, @@ -160,11 +170,15 @@ class FlatLED(object): xlist = np.arange(xc-x_radii, xc+x_radii, 0.5) xlist_ = np.zeros(len(xlist) + 2) xlist_[1:-1] = xlist - xlist_[0] = 2550 - xlist_[-1] = 10000 + xlist_[0] = 2000 + xlist_[-1] = 18000 + ids1 = xlist>xc-fwhm + ids2 = xlist[ids1]=2.6s +# shutter_effect: NO + + + # flat_level: set the total skybackground value (e-) in the exptime,if none,set null, or delete the key + # flat_level_filt: the vale of "flat_level" is in the filter "flat_level_filt", can set NUV, u, g, r, i, z, y, if + # none,set null,or delete the key + + # sky_background: + # exptime: 150. # [s] + # shutter_effect: YES + # flat_fielding: YES + # enable_straylight_model: YES + # flat_level: 20000 + # flat_level_filt: g + + # Apply PRNU to accumulated photons + PRNU_effect: {} + # Accumulate photons caused by cosmic rays + cosmic_rays: {} + # Add Poission noise and dark current + poisson_and_dark: + add_dark: YES + # Simulate brighter fatter effects + bright_fatter: {} + # Add detector defects: hot/warm pixels, bad columns + detector_defects: + hot_pixels: YES + dead_pixels: YES + bad_columns: YES + # Apply response nonlinearity + nonlinearity: {} + # Apply CCD Saturation & Blooming + blooming: {} + # # Run CTE simulation + CTE_effect: {} + # Add prescan and overscan + prescan_overscan: {} + # Add bias + bias: + bias_16channel: YES + # Add readout noise + readout_noise: {} + # Apply gain + gain: + gain_16channel: YES + # Output the final image + quantization_and_output: + format_output: NO +... \ No newline at end of file diff --git a/config/obs_config_Calibration.yaml b/config/obs_config_Calibration_FLAT.yaml similarity index 74% rename from config/obs_config_Calibration.yaml rename to config/obs_config_Calibration_FLAT.yaml index 933c6e09d65f493ffb374e927d62799156bfb1f0..54e9465782f5e62d41cbac13405968eddabc4e7e 100644 --- a/config/obs_config_Calibration.yaml +++ b/config/obs_config_Calibration_FLAT.yaml @@ -3,39 +3,42 @@ # # Configuration file for CSST simulation # For single exposure type: -# SCI-WIDE +# FLAT # CSST-Sim Group, 2024/01/08 # ############################################### # Observation type -obs_type: "DARK" - +obs_type: "FLAT" +obs_type_code: "128" +obs_id: "00000001" # Define list of chips -run_chips: [8] +run_chips: [17] # Define observation sequence call_sequence: # Accumulate fluxes from objects led_calib_model: #"LED": ['LED1','LED2','LED3','LED4','LED5','LED6','LED7','LED8','LED9','LED10','LED11','LED12','LED13','LED14'] or null - #'LED1': '275', 'LED2': '310', 'LED3': '430', 'LED4': '505', 'LED5': '545', 'LED6': '590', 'LED7': '670', - #'LED8': '760', 'LED9': '940', 'LED10': '940', 'LED11': '1050', 'LED12': '1050','LED13': '340', 'LED14': '365' - LED_TYPE: ['LED5'] + #'LED1': '275', 'LED2': '310', 'LED3': '430', 'LED4': '505', 'LED5': '525', 'LED6': '590', 'LED7': '670', + #'LED8': '760', 'LED9': '880', 'LED10': '940', 'LED11': '1050', 'LED12': '1550','LED13': '340', 'LED14': '365' + LED_TYPE: ['LED13'] LED_TIME: [1.] + # if open shutter effect, led time must be >=2.6s + shutter_effect: NO # flat_level: set the total skybackground value (e-) in the exptime,if none,set null, or delete the key # flat_level_filt: the vale of "flat_level" is in the filter "flat_level_filt", can set NUV, u, g, r, i, z, y, if # none,set null,or delete the key - sky_background: - exptime: 150. # [s] - shutter_effect: YES - flat_fielding: YES - enable_straylight_model: YES - flat_level: 20000 - flat_level_filt: g + # sky_background: + # exptime: 150. # [s] + # shutter_effect: YES + # flat_fielding: YES + # enable_straylight_model: YES + # flat_level: 20000 + # flat_level_filt: g # Apply PRNU to accumulated photons PRNU_effect: {}