Loading csst_ifs_sim/csst_ifs_sim.py +30 −55 Original line number Diff line number Diff line Loading @@ -22,23 +22,11 @@ from scipy.signal import fftconvolve from scipy import ndimage import cmath import configparser as ConfigParser # from support import IFSinstrumentModel # from support import cosmicrays # from support import logger as lg # from CTI import CTI import os from scipy.interpolate import interp1d import astropy.coordinates as coord import ctypes import sys # from csst_ifs_sim.support import IFSinstrumentModel # from csst_ifs_sim.support import cosmicrays # from csst_ifs_sim.support import logger as lg # from csst_ifs_sim.CTI import CTI sys.path.append('./csst_ifs_sim') conf.auto_max_age = None Loading Loading @@ -91,6 +79,9 @@ Note:: This class is Python 3 compatible. """ ######################## functions definition ################################ class CDM03bidir(): """ Charge Transfer Inefficiency ============================ Loading @@ -103,11 +94,6 @@ parameters in parallel and serial direction. :requires: NumPy :requires: CDM03 (FORTRAN code, f2py -c -m cdm03bidir cdm03bidir.f90) """ #CDM03bidir class CDM03bidir(): """ Class to run CDM03 CTI model, class Fortran routine to perform the actual CDM03 calculations. :param settings: input parameters Loading Loading @@ -181,8 +167,6 @@ class CDM03bidir(): Set up the logger. """ self.logger = True # if self.log is None: # self.logger = False def applyRadiationDamage(self, data, iquadrant=0): Loading Loading @@ -309,6 +293,8 @@ def lg(log_filename, loggername='logger'): ############################################################################## def IFSinformation(): """ IFS Instrument Model ==================== Loading @@ -316,13 +302,8 @@ IFS Instrument Model The file provides a function that returns IFS related information such as pixel size, dark current, gain... """ def IFSinformation(): """ Returns a dictionary describing VIS. The following information is provided (id: value - reference):: Returns a dictionary describing VIS. The following information is provided (id: value - reference):: :return: instrument model parameters :rtype: dict Loading Loading @@ -353,7 +334,12 @@ def CCDnonLinearityModel(data, beta=6e-7): return out ############################################################################# from scipy.interpolate import InterpolatedUnivariateSpline class cosmicrays(): """ Cosmic Rays =========== Loading @@ -365,18 +351,7 @@ The energy of the cosmic ray events can also be set to constant for testing purposes. The class can be used to draw a single cosmic ray event or up to a covering fraction. :requires: NumPy :requires: SciPy :version: 0.2 """ from scipy.interpolate import InterpolatedUnivariateSpline class cosmicrays(): """ Cosmic ray generation class. Can either draw events from distributions or set the energy of the events to a constant. Loading Loading
csst_ifs_sim/csst_ifs_sim.py +30 −55 Original line number Diff line number Diff line Loading @@ -22,23 +22,11 @@ from scipy.signal import fftconvolve from scipy import ndimage import cmath import configparser as ConfigParser # from support import IFSinstrumentModel # from support import cosmicrays # from support import logger as lg # from CTI import CTI import os from scipy.interpolate import interp1d import astropy.coordinates as coord import ctypes import sys # from csst_ifs_sim.support import IFSinstrumentModel # from csst_ifs_sim.support import cosmicrays # from csst_ifs_sim.support import logger as lg # from csst_ifs_sim.CTI import CTI sys.path.append('./csst_ifs_sim') conf.auto_max_age = None Loading Loading @@ -91,6 +79,9 @@ Note:: This class is Python 3 compatible. """ ######################## functions definition ################################ class CDM03bidir(): """ Charge Transfer Inefficiency ============================ Loading @@ -103,11 +94,6 @@ parameters in parallel and serial direction. :requires: NumPy :requires: CDM03 (FORTRAN code, f2py -c -m cdm03bidir cdm03bidir.f90) """ #CDM03bidir class CDM03bidir(): """ Class to run CDM03 CTI model, class Fortran routine to perform the actual CDM03 calculations. :param settings: input parameters Loading Loading @@ -181,8 +167,6 @@ class CDM03bidir(): Set up the logger. """ self.logger = True # if self.log is None: # self.logger = False def applyRadiationDamage(self, data, iquadrant=0): Loading Loading @@ -309,6 +293,8 @@ def lg(log_filename, loggername='logger'): ############################################################################## def IFSinformation(): """ IFS Instrument Model ==================== Loading @@ -316,13 +302,8 @@ IFS Instrument Model The file provides a function that returns IFS related information such as pixel size, dark current, gain... """ def IFSinformation(): """ Returns a dictionary describing VIS. The following information is provided (id: value - reference):: Returns a dictionary describing VIS. The following information is provided (id: value - reference):: :return: instrument model parameters :rtype: dict Loading Loading @@ -353,7 +334,12 @@ def CCDnonLinearityModel(data, beta=6e-7): return out ############################################################################# from scipy.interpolate import InterpolatedUnivariateSpline class cosmicrays(): """ Cosmic Rays =========== Loading @@ -365,18 +351,7 @@ The energy of the cosmic ray events can also be set to constant for testing purposes. The class can be used to draw a single cosmic ray event or up to a covering fraction. :requires: NumPy :requires: SciPy :version: 0.2 """ from scipy.interpolate import InterpolatedUnivariateSpline class cosmicrays(): """ Cosmic ray generation class. Can either draw events from distributions or set the energy of the events to a constant. Loading