Commit 33afd063 authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

Replace csst_ifs_sim.py

parent 414ca60c
Pipeline #8287 passed with stage
in 0 seconds
......@@ -718,7 +718,8 @@ class StrayLight(object):
self.ecliptic = self.equator.transform_to('barycentrictrueecliptic')
self.pointing = transRaDec2D(radec[0], radec[1])
self.slcdll = ctypes.CDLL(
os.path.join(self.path, 'IFS_inputdata/refs/libstraylight.so')) # dylib
# dylib
os.path.join(self.path, 'IFS_inputdata/refs/libstraylight.so'))
self.slcdll.Calculate.argtypes = [ctypes.c_double, ctypes.POINTER(ctypes.c_double),
ctypes.POINTER(ctypes.c_double), ctypes.POINTER(
......@@ -2290,8 +2291,10 @@ class IFSsimulator():
crImage_r = np.zeros((3072, 6144), dtype=float)
# cosmic ray instance
cosmics_b = cosmicrays(self.log, crImage_b, self.information['exptime'], crInfo=self.cr)
cosmics_r = cosmicrays(self.log, crImage_r, self.information['exptime'], crInfo=self.cr)
cosmics_b = cosmicrays(self.log, crImage_b,
self.information['exptime'], crInfo=self.cr)
cosmics_r = cosmicrays(self.log, crImage_r,
self.information['exptime'], crInfo=self.cr)
CCD_cr_b = cosmics_b.addUpToFraction(
self.information['coveringfraction']*self.information['exptime']/300.0, limit=None)
......@@ -5606,7 +5609,7 @@ class IFSsimulator():
##############################################################
sn = self.simnumber-1
Num=int(self.information['exptime']/60)
Num = int(self.information['exptime']/60)
arr = np.array(df['time'][sn*Num:sn*Num+Num])
self.exptime_start_jd, self.exptime_start_index = find_min(arr)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment