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

Replace csst_ifs_sim.py

parent 414ca60c
Loading
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -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)