Loading csst_mci_sim/mci_so/__pycache__/__init__.cpython-311.pycdeleted 100644 → 0 −187 B File deleted. View file csst_mci_sim/support/cosmicrays.py +9 −0 Original line number Diff line number Diff line Loading @@ -78,8 +78,13 @@ class cosmicrays(): crImage = np.zeros((self.ysize, self.xsize), dtype=np.float64) # x and y shifts <<<<<<< HEAD dx = dl * np.cos(phi) / 2. dy = dl * np.sin(phi) / 2. ======= dx = l * np.cos(phi) / 2. dy = l * np.sin(phi) / 2. >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 mskdx = np.abs(dx) < 1e-8 mskdy = np.abs(dy) < 1e-8 dx[mskdx] = 0. Loading Loading @@ -200,7 +205,11 @@ class cosmicrays(): self.cosmicrayMap = np.zeros((self.ysize, self.xsize)) # how many events to draw at once, too large number leads to exceeding the covering fraction <<<<<<< HEAD # cr_n = int(295 * self.exptime / 565. * coveringFraction / 1.4) ======= ####cr_n = int(295 * self.exptime / 565. * coveringFraction / 1.4) >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 cr_n = int(5000 * self.exptime / 565. * coveringFraction) Loading csst_mci_sim/support/sed.py 100755 → 100644 +18 −0 Original line number Diff line number Diff line Loading @@ -71,9 +71,15 @@ def flux_to_mag(wave, flux, path, band='GAIA_bp'): float: value of magnitude """ # /home/yan/MCI_sim/MCI_input/SED_Code/data <<<<<<< HEAD # # parent = os.path.dirname(os.path.realpath(__file__)) ======= ##import os ###parent = os.path.dirname(os.path.realpath(__file__)) >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 band = ascii.read(path+'MCI_inputData/SED_Code/seddata/' + band + '.dat') wave0 = band['col1'] Loading Loading @@ -128,9 +134,15 @@ class Gal_Temp(): def __init__(self, path): <<<<<<< HEAD # # parent = os.path.dirname(os.path.realpath(__file__)) ======= ###import os ###parent = os.path.dirname(os.path.realpath(__file__)) >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 self.path = path hdulist = fits.open( self.path+'MCI_inputData/SED_Code/seddata/galaxy_temp.fits') Loading Loading @@ -160,9 +172,15 @@ class Star_Temp(): def __init__(self, path): <<<<<<< HEAD # self.path = path # parent = os.path.dirname(os.path.realpath(__file__)) ======= ##import os self.path = path ####parent = os.path.dirname(os.path.realpath(__file__)) >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 # print("获取其父目录——" + parent) # 从当前文件路径中获取目录 hdulist = fits.open( path+'MCI_inputData/SED_Code/seddata/stellar_temp.fits') Loading csst_mci_sim/support/shao.py +22 −0 Original line number Diff line number Diff line from ctypes import * def checkInputList(input_list, n): if not isinstance(type(input_list), list): # if type(input_list) != type([1, 2, 3]): raise TypeError("Input type is not list!", input_list) for i in input_list: <<<<<<< HEAD if not isinstance(type(i), float): # type(i) != type(1.1): if not isinstance(type(i), int): # type(i) != type(1): ======= if type(i) != type(1.1): if type(i) != type(1): >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 raise TypeError( "Input list's element is not float or int!", input_list) if len(input_list) != n: Loading @@ -18,7 +24,11 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp input_parallax_list, input_nstars, input_x, input_y, input_z, input_vx, input_vy, input_vz, input_epoch, input_date_str, input_time_str): # Check input parameters <<<<<<< HEAD if not isinstance(type(input_nstars), int): # type(input_nstars) != type(1): ======= if type(input_nstars) != type(1): >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 raise TypeError("Parameter 7 is not int!", input_nstars) checkInputList(input_ra_list, input_nstars) Loading @@ -28,7 +38,11 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp checkInputList(input_rv_list, input_nstars) checkInputList(input_parallax_list, input_nstars) <<<<<<< HEAD if not isinstance(type(input_x), float): # type(input_x) != type(1.1): ======= if type(input_x) != type(1.1): >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 raise TypeError("Parameter 8 is not double!", input_x) if not isinstance(type(input_y), float): # type(input_y) != type(1.1): raise TypeError("Parameter 9 is not double!", input_y) Loading @@ -49,7 +63,11 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp input_vy = input_vy*1000.0 input_vz = input_vz*1000.0 <<<<<<< HEAD if not isinstance(type(input_date_str), str): # type(input_date_str) != type("2025-03-05"): ======= if type(input_date_str) != type("2025-03-05"): >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 raise TypeError("Parameter 15 is not string!", input_date_str) else: input_date_str = input_date_str.strip() Loading @@ -73,7 +91,11 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp raise TypeError( "Parameter 15 day range error [1 ~ 31]!", input_day) <<<<<<< HEAD if not isinstance(type(input_time_str), str): # type(input_time_str) != type("20:15:15.15"): ======= if type(input_time_str) != type("20:15:15.15"): >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 raise TypeError("Parameter 16 is not string!", input_time_str) else: input_time_str = input_time_str.strip() Loading Loading
csst_mci_sim/mci_so/__pycache__/__init__.cpython-311.pycdeleted 100644 → 0 −187 B File deleted. View file
csst_mci_sim/support/cosmicrays.py +9 −0 Original line number Diff line number Diff line Loading @@ -78,8 +78,13 @@ class cosmicrays(): crImage = np.zeros((self.ysize, self.xsize), dtype=np.float64) # x and y shifts <<<<<<< HEAD dx = dl * np.cos(phi) / 2. dy = dl * np.sin(phi) / 2. ======= dx = l * np.cos(phi) / 2. dy = l * np.sin(phi) / 2. >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 mskdx = np.abs(dx) < 1e-8 mskdy = np.abs(dy) < 1e-8 dx[mskdx] = 0. Loading Loading @@ -200,7 +205,11 @@ class cosmicrays(): self.cosmicrayMap = np.zeros((self.ysize, self.xsize)) # how many events to draw at once, too large number leads to exceeding the covering fraction <<<<<<< HEAD # cr_n = int(295 * self.exptime / 565. * coveringFraction / 1.4) ======= ####cr_n = int(295 * self.exptime / 565. * coveringFraction / 1.4) >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 cr_n = int(5000 * self.exptime / 565. * coveringFraction) Loading
csst_mci_sim/support/sed.py 100755 → 100644 +18 −0 Original line number Diff line number Diff line Loading @@ -71,9 +71,15 @@ def flux_to_mag(wave, flux, path, band='GAIA_bp'): float: value of magnitude """ # /home/yan/MCI_sim/MCI_input/SED_Code/data <<<<<<< HEAD # # parent = os.path.dirname(os.path.realpath(__file__)) ======= ##import os ###parent = os.path.dirname(os.path.realpath(__file__)) >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 band = ascii.read(path+'MCI_inputData/SED_Code/seddata/' + band + '.dat') wave0 = band['col1'] Loading Loading @@ -128,9 +134,15 @@ class Gal_Temp(): def __init__(self, path): <<<<<<< HEAD # # parent = os.path.dirname(os.path.realpath(__file__)) ======= ###import os ###parent = os.path.dirname(os.path.realpath(__file__)) >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 self.path = path hdulist = fits.open( self.path+'MCI_inputData/SED_Code/seddata/galaxy_temp.fits') Loading Loading @@ -160,9 +172,15 @@ class Star_Temp(): def __init__(self, path): <<<<<<< HEAD # self.path = path # parent = os.path.dirname(os.path.realpath(__file__)) ======= ##import os self.path = path ####parent = os.path.dirname(os.path.realpath(__file__)) >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 # print("获取其父目录——" + parent) # 从当前文件路径中获取目录 hdulist = fits.open( path+'MCI_inputData/SED_Code/seddata/stellar_temp.fits') Loading
csst_mci_sim/support/shao.py +22 −0 Original line number Diff line number Diff line from ctypes import * def checkInputList(input_list, n): if not isinstance(type(input_list), list): # if type(input_list) != type([1, 2, 3]): raise TypeError("Input type is not list!", input_list) for i in input_list: <<<<<<< HEAD if not isinstance(type(i), float): # type(i) != type(1.1): if not isinstance(type(i), int): # type(i) != type(1): ======= if type(i) != type(1.1): if type(i) != type(1): >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 raise TypeError( "Input list's element is not float or int!", input_list) if len(input_list) != n: Loading @@ -18,7 +24,11 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp input_parallax_list, input_nstars, input_x, input_y, input_z, input_vx, input_vy, input_vz, input_epoch, input_date_str, input_time_str): # Check input parameters <<<<<<< HEAD if not isinstance(type(input_nstars), int): # type(input_nstars) != type(1): ======= if type(input_nstars) != type(1): >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 raise TypeError("Parameter 7 is not int!", input_nstars) checkInputList(input_ra_list, input_nstars) Loading @@ -28,7 +38,11 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp checkInputList(input_rv_list, input_nstars) checkInputList(input_parallax_list, input_nstars) <<<<<<< HEAD if not isinstance(type(input_x), float): # type(input_x) != type(1.1): ======= if type(input_x) != type(1.1): >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 raise TypeError("Parameter 8 is not double!", input_x) if not isinstance(type(input_y), float): # type(input_y) != type(1.1): raise TypeError("Parameter 9 is not double!", input_y) Loading @@ -49,7 +63,11 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp input_vy = input_vy*1000.0 input_vz = input_vz*1000.0 <<<<<<< HEAD if not isinstance(type(input_date_str), str): # type(input_date_str) != type("2025-03-05"): ======= if type(input_date_str) != type("2025-03-05"): >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 raise TypeError("Parameter 15 is not string!", input_date_str) else: input_date_str = input_date_str.strip() Loading @@ -73,7 +91,11 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp raise TypeError( "Parameter 15 day range error [1 ~ 31]!", input_day) <<<<<<< HEAD if not isinstance(type(input_time_str), str): # type(input_time_str) != type("20:15:15.15"): ======= if type(input_time_str) != type("20:15:15.15"): >>>>>>> 227ceb873fa36e1fbb00f61f9d34ac21b7436192 raise TypeError("Parameter 16 is not string!", input_time_str) else: input_time_str = input_time_str.strip() Loading