Commit dd1608ee authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

debug

parent a5489f19
Pipeline #4473 passed with stage
in 0 seconds
......@@ -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
from scipy.interpolate import InterpolatedUnivariateSpline
:version: 0.2
class cosmicrays():
"""
"""
Cosmic Rays
===========
from scipy.interpolate import InterpolatedUnivariateSpline
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.
class cosmicrays():
"""
Cosmic ray generation class. Can either draw events from distributions or
set the energy of the events to a constant.
......
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