diff --git a/csst_mci_sim/mci_so/__pycache__/__init__.cpython-311.pyc b/csst_mci_sim/mci_so/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index d0cfa51aed7d5e0c7e2f8fe2ac372f8698db5cfe..0000000000000000000000000000000000000000 Binary files a/csst_mci_sim/mci_so/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/csst_mci_sim/support/cosmicrays.py b/csst_mci_sim/support/cosmicrays.py index c54edbb59db915c7d4b5a6d5da2a7be3cb1be465..d10781f0d768fbb1dd04c6168d11a53621815aaa 100644 --- a/csst_mci_sim/support/cosmicrays.py +++ b/csst_mci_sim/support/cosmicrays.py @@ -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. @@ -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) diff --git a/csst_mci_sim/support/sed.py b/csst_mci_sim/support/sed.py old mode 100755 new mode 100644 index 1e14fa55c25dcec76f89e3786a9c90ed5cf1e186..d9e77115d5dadd79a30a93c9bac429d901c542b7 --- a/csst_mci_sim/support/sed.py +++ b/csst_mci_sim/support/sed.py @@ -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'] @@ -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') @@ -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') diff --git a/csst_mci_sim/support/shao.py b/csst_mci_sim/support/shao.py index 320def7139225e4811ac07aef476c893aede08b6..926eab9252c132367879b6fd5883076e576d3b30 100644 --- a/csst_mci_sim/support/shao.py +++ b/csst_mci_sim/support/shao.py @@ -1,12 +1,18 @@ 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: @@ -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) @@ -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) @@ -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() @@ -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()