diff --git a/csst_mci_sim/CTI/CTI.py b/csst_mci_sim/CTI/CTI.py index d25aa4b80d0bb4cba931e321935a4623e02e9875..6fbfbee2ade96c5e4b6b4b0f88c9e899bc8ef2f3 100644 --- a/csst_mci_sim/CTI/CTI.py +++ b/csst_mci_sim/CTI/CTI.py @@ -130,7 +130,7 @@ class CDM03bidir(): :return: image that has been run through the CDM03 model :rtype: ndarray """"" - + # ## # return data iflip = iquadrant / 2 diff --git a/csst_mci_sim/support/cosmicrays.py b/csst_mci_sim/support/cosmicrays.py index d10781f0d768fbb1dd04c6168d11a53621815aaa..c54edbb59db915c7d4b5a6d5da2a7be3cb1be465 100644 --- a/csst_mci_sim/support/cosmicrays.py +++ b/csst_mci_sim/support/cosmicrays.py @@ -78,13 +78,8 @@ 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. @@ -205,11 +200,7 @@ 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) diff --git a/csst_mci_sim/support/sed.py b/csst_mci_sim/support/sed.py old mode 100644 new mode 100755 index d9e77115d5dadd79a30a93c9bac429d901c542b7..1e14fa55c25dcec76f89e3786a9c90ed5cf1e186 --- a/csst_mci_sim/support/sed.py +++ b/csst_mci_sim/support/sed.py @@ -71,15 +71,9 @@ 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'] @@ -134,15 +128,9 @@ 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') @@ -172,15 +160,9 @@ 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') diff --git a/csst_mci_sim/support/shao.py b/csst_mci_sim/support/shao.py index 926eab9252c132367879b6fd5883076e576d3b30..320def7139225e4811ac07aef476c893aede08b6 100644 --- a/csst_mci_sim/support/shao.py +++ b/csst_mci_sim/support/shao.py @@ -1,18 +1,12 @@ 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: @@ -24,11 +18,7 @@ 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) @@ -38,11 +28,7 @@ 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) @@ -63,11 +49,7 @@ 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() @@ -91,11 +73,7 @@ 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()