diff --git a/csst_mci_sim/earthshine.py b/csst_mci_sim/earthshine.py index bee2b128e16b2b5df20e17958784a558f0e142ae..332aa4e0f112e66b6f6562b2bdd92e449507084c 100644 --- a/csst_mci_sim/earthshine.py +++ b/csst_mci_sim/earthshine.py @@ -57,7 +57,7 @@ def ill2flux(E, path): # use template from sky_bkg (background_spec_hst.dat) filename = path+'MCI_inputData/refs/background_spec_hst.dat' - cat_spec = pd.read_csv(filename, sep='\s+', header=None, comment='#') + cat_spec = pd.read_csv(filename, sep='\\s+', header=None, comment='#') wave0 = cat_spec[0].values # A spec0 = cat_spec[2].values # erg/s/cm^2/A/arcsec^2 diff --git a/csst_mci_sim/straylight.py b/csst_mci_sim/straylight.py index cb37588ccabd777a8b991bb6a5ad11bc0a67992f..2646f5de9d2589ce119b38e9cad3174fafef2722 100644 --- a/csst_mci_sim/straylight.py +++ b/csst_mci_sim/straylight.py @@ -57,7 +57,7 @@ def ill2flux(E, path): # use template from sky_bkg (background_spec_hst.dat) filename = path+'MCI_inputData/refs/background_spec_hst.dat' - cat_spec = pd.read_csv(filename, sep='\s+', header=None, comment='#') + cat_spec = pd.read_csv(filename, sep='\\s+', header=None, comment='#') wave0 = cat_spec[0].values # A spec0 = cat_spec[2].values # erg/s/cm^2/A/arcsec^2 diff --git a/csst_mci_sim/support/cosmicrays.py b/csst_mci_sim/support/cosmicrays.py index c54edbb59db915c7d4b5a6d5da2a7be3cb1be465..49ceba87b68d2979ea04a85426d9f540f0ae7949 100644 --- a/csst_mci_sim/support/cosmicrays.py +++ b/csst_mci_sim/support/cosmicrays.py @@ -48,7 +48,7 @@ class cosmicrays(): self.log = log - #image and size + # image and size self.image = image.copy() self.ysize, self.xsize = self.image.shape @@ -180,9 +180,7 @@ class cosmicrays(): return crImage ################################################## ############################################ -############################################################################ -##################################### -######################################## + def _drawEventsToCoveringFactor(self, coveringFraction=3.0, limit=1000, verbose=False): """ Generate cosmic ray events up to a covering fraction and include it to a cosmic ray map (self.cosmicrayMap). diff --git a/csst_mci_sim/support/sed.py b/csst_mci_sim/support/sed.py index 1e14fa55c25dcec76f89e3786a9c90ed5cf1e186..fb1fa2b5acf42c26bbe82566548dd1bf1b07c3b5 100755 --- a/csst_mci_sim/support/sed.py +++ b/csst_mci_sim/support/sed.py @@ -217,7 +217,7 @@ def Model_Galaxy_SED(wave, ugriz, z, temp, path): temp (class): Class of gaalxy template Returns: - float array: Spectral energy distribution of stellar SED, + float array: Spectral energy distribution of stellar SED, which have the same length to the input wave """ sed = 10. ** (-0.4 * ugriz) diff --git a/csst_mci_sim/support/shao.py b/csst_mci_sim/support/shao.py index 320def7139225e4811ac07aef476c893aede08b6..d6f8185808752dedcec781f20dc77f53bf425d18 100644 --- a/csst_mci_sim/support/shao.py +++ b/csst_mci_sim/support/shao.py @@ -1,8 +1,9 @@ from ctypes import * + def checkInputList(input_list, n): if not isinstance(type(input_list), list): - # if type(input_list) != type([1, 2, 3]): + # if type(input_list) != type([1, 2, 3]): raise TypeError("Input type is not list!", input_list) for i in input_list: if not isinstance(type(i), float): # type(i) != type(1.1): @@ -49,7 +50,8 @@ 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 - if not isinstance(type(input_date_str), str): # type(input_date_str) != type("2025-03-05"): + if not isinstance(type(input_date_str), str): + # type(input_date_str) != type("2025-03-05"): raise TypeError("Parameter 15 is not string!", input_date_str) else: input_date_str = input_date_str.strip() @@ -73,7 +75,8 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp raise TypeError( "Parameter 15 day range error [1 ~ 31]!", input_day) - if not isinstance(type(input_time_str), str): # type(input_time_str) != type("20:15:15.15"): + if not isinstance(type(input_time_str), str): + # type(input_time_str) != type("20:15:15.15"): raise TypeError("Parameter 16 is not string!", input_time_str) else: input_time_str = input_time_str.strip()