diff --git a/csst_ifs_sim/csst_ifs_sim.py b/csst_ifs_sim/csst_ifs_sim.py index 9fdbca25cd8c01f2507ca1ecfe397c70bff8cc3e..40da5715168f0da48b20a7216cd52648298b3844 100644 --- a/csst_ifs_sim/csst_ifs_sim.py +++ b/csst_ifs_sim/csst_ifs_sim.py @@ -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 @@ -91,23 +79,21 @@ Note:: This class is Python 3 compatible. """ ######################## functions definition ################################ -""" -Charge Transfer Inefficiency -============================ -This file contains a simple class to run a CDM03 CTI model developed by Alex Short (ESA). -This now contains both the official CDM03 and a new version that allows different trap -parameters in parallel and serial direction. +class CDM03bidir(): + """ + Charge Transfer Inefficiency + ============================ + + This file contains a simple class to run a CDM03 CTI model developed by Alex Short (ESA). -:requires: NumPy -:requires: CDM03 (FORTRAN code, f2py -c -m cdm03bidir cdm03bidir.f90) + This now contains both the official CDM03 and a new version that allows different trap + 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 @@ -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): @@ -309,20 +293,17 @@ def lg(log_filename, loggername='logger'): ############################################################################## -""" -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):: - + IFS Instrument Model + ==================== + The file provides a function that returns IFS related information such as pixel + size, dark current, gain... + + Returns a dictionary describing VIS. The following information is provided + (id: value - reference):: :return: instrument model parameters :rtype: dict @@ -353,30 +334,24 @@ def CCDnonLinearityModel(data, beta=6e-7): return out ############################################################################# -""" -Cosmic Rays -=========== - -This simple class can be used to include cosmic ray events to an image. -By default the cosmic ray events are drawn from distributions describing -the length and energy of the events. Such distributions can be generated -for example using Stardust code (http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=04636917). -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 Rays + =========== + + This simple class can be used to include cosmic ray events to an image. + By default the cosmic ray events are drawn from distributions describing + the length and energy of the events. Such distributions can be generated + for example using Stardust code (http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=04636917). + 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. + + Cosmic ray generation class. Can either draw events from distributions or set the energy of the events to a constant.