Loading .gitignore +1 −1 Original line number Diff line number Diff line build/* CSSTSim.egg-info/* csst_msc_sim.egg-info/* dist/* *.pyc *.so Loading Catalog/Catalog_example.py +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ class Catalog(CatalogBase): super().__init__() self.cat_dir = os.path.join(config["data_dir"], config["catalog_options"]["input_path"]["cat_dir"]) self.chip = chip if "star_cat" in config["catalog_options"]["input_path"] and config["catalog_options"]["input_path"]["star_cat"] if "star_cat" in config["catalog_options"]["input_path"] and config["catalog_options"]["input_path"]["star_cat"]: star_file = config["catalog_options"]["input_path"]["star_cat"] star_SED_file = config["catalog_options"]["SED_templates_path"]["star_SED"] self.star_path = os.path.join(self.cat_dir, star_file) Loading ObservationSim/Config/Header/ImageHeader.py +1 −1 Original line number Diff line number Diff line Loading @@ -473,7 +473,7 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointing_id = '00000001', po # h_prim['SIM_VER'] = (get_distribution("CSSTSim").version, "Version of CSST MSC simulation software") currentDateAndTime = datetime.now() compute_name = platform.node() h_prim['FITSSWV'] = get_distribution("CSSTSim").version +'_' + currentDateAndTime.strftime("%Y%m%d") + '_' +compute_name h_prim['FITSSWV'] = get_distribution("csst_msc_sim").version +'_' + currentDateAndTime.strftime("%Y%m%d") + '_' +compute_name h_prim['EPOCH'] = round((Time(h_prim['EXPSTART'], format='mjd', scale='tcb')).jyear, 1) return h_prim Loading ObservationSim/MockObject/FlatLED.py +2 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ fluxLED = {'LED1': 15, 'LED2': 15, 'LED3': 12.5, 'LED4': 9, 'LED5': 9, mirro_eff = {'GU':0.61, 'GV':0.8, 'GI':0.8} # mirro_eff = {'GU':1, 'GV':1, 'GI':1} class FlatLED(object): class FlatLED(MockObject): def __init__(self, chip,filt, flatDir = None, logger=None): # self.led_type_list = led_type_list self.filt = filt Loading Loading @@ -426,7 +426,7 @@ class FlatLED(object): print('time: %s ms' % ((T2 - T1) * 1000)) if isAlongY == 1: fimg, tmx, tmy = rotate90(array_orig=fImg.array, xc=0, yc=0, isClockwise=0) fimg, tmx, tmy = SpecDisperser.rotate90(array_orig=fImg.array, xc=0, yc=0, isClockwise=0) else: fimg = fImg.array Loading ObservationSim/sim_steps/add_LED_flat.py +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ def add_LED_Flat(self, chip, filt, tel, pointing, catalog, obs_param): pf_map = np.array(pf_map, dtype='float32') self.updateHeaderInfo(header_flag='ext', keys = ['SHTSTAT'], values = [True]) else: self.updateHeaderInfo(header_flag='ext', keys = ['SHTSTAT','SHTOPEN0','SHTOPEN1','SHTCLOS0','SHTCLOS1'], values = [True,'','','','']) self.updateHeaderInfo(header_flag='ext', keys = ['SHTSTAT','SHTOPEN1','SHTCLOS0'], values = [True,self.h_ext['SHTCLOS1'],self.h_ext['SHTOPEN0']]) chip.img = chip.img + pf_map Loading Loading
.gitignore +1 −1 Original line number Diff line number Diff line build/* CSSTSim.egg-info/* csst_msc_sim.egg-info/* dist/* *.pyc *.so Loading
Catalog/Catalog_example.py +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ class Catalog(CatalogBase): super().__init__() self.cat_dir = os.path.join(config["data_dir"], config["catalog_options"]["input_path"]["cat_dir"]) self.chip = chip if "star_cat" in config["catalog_options"]["input_path"] and config["catalog_options"]["input_path"]["star_cat"] if "star_cat" in config["catalog_options"]["input_path"] and config["catalog_options"]["input_path"]["star_cat"]: star_file = config["catalog_options"]["input_path"]["star_cat"] star_SED_file = config["catalog_options"]["SED_templates_path"]["star_SED"] self.star_path = os.path.join(self.cat_dir, star_file) Loading
ObservationSim/Config/Header/ImageHeader.py +1 −1 Original line number Diff line number Diff line Loading @@ -473,7 +473,7 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointing_id = '00000001', po # h_prim['SIM_VER'] = (get_distribution("CSSTSim").version, "Version of CSST MSC simulation software") currentDateAndTime = datetime.now() compute_name = platform.node() h_prim['FITSSWV'] = get_distribution("CSSTSim").version +'_' + currentDateAndTime.strftime("%Y%m%d") + '_' +compute_name h_prim['FITSSWV'] = get_distribution("csst_msc_sim").version +'_' + currentDateAndTime.strftime("%Y%m%d") + '_' +compute_name h_prim['EPOCH'] = round((Time(h_prim['EXPSTART'], format='mjd', scale='tcb')).jyear, 1) return h_prim Loading
ObservationSim/MockObject/FlatLED.py +2 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ fluxLED = {'LED1': 15, 'LED2': 15, 'LED3': 12.5, 'LED4': 9, 'LED5': 9, mirro_eff = {'GU':0.61, 'GV':0.8, 'GI':0.8} # mirro_eff = {'GU':1, 'GV':1, 'GI':1} class FlatLED(object): class FlatLED(MockObject): def __init__(self, chip,filt, flatDir = None, logger=None): # self.led_type_list = led_type_list self.filt = filt Loading Loading @@ -426,7 +426,7 @@ class FlatLED(object): print('time: %s ms' % ((T2 - T1) * 1000)) if isAlongY == 1: fimg, tmx, tmy = rotate90(array_orig=fImg.array, xc=0, yc=0, isClockwise=0) fimg, tmx, tmy = SpecDisperser.rotate90(array_orig=fImg.array, xc=0, yc=0, isClockwise=0) else: fimg = fImg.array Loading
ObservationSim/sim_steps/add_LED_flat.py +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ def add_LED_Flat(self, chip, filt, tel, pointing, catalog, obs_param): pf_map = np.array(pf_map, dtype='float32') self.updateHeaderInfo(header_flag='ext', keys = ['SHTSTAT'], values = [True]) else: self.updateHeaderInfo(header_flag='ext', keys = ['SHTSTAT','SHTOPEN0','SHTOPEN1','SHTCLOS0','SHTCLOS1'], values = [True,'','','','']) self.updateHeaderInfo(header_flag='ext', keys = ['SHTSTAT','SHTOPEN1','SHTCLOS0'], values = [True,self.h_ext['SHTCLOS1'],self.h_ext['SHTOPEN0']]) chip.img = chip.img + pf_map Loading