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

debug

parent a5489f19
Loading
Loading
Loading
Loading
Loading
+30 −55
Original line number Original line Diff line number Diff line
@@ -22,23 +22,11 @@ from scipy.signal import fftconvolve
from scipy import ndimage
from scipy import ndimage
import cmath
import cmath
import configparser as ConfigParser
import configparser as ConfigParser

# from support import IFSinstrumentModel
# from support import cosmicrays
# from support import logger as lg
# from CTI import CTI

import os
import os
from scipy.interpolate import interp1d
from scipy.interpolate import interp1d
import astropy.coordinates as coord
import astropy.coordinates as coord
import ctypes
import ctypes
import sys
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')
sys.path.append('./csst_ifs_sim')
conf.auto_max_age = None
conf.auto_max_age = None


@@ -91,6 +79,9 @@ Note:: This class is Python 3 compatible.


"""
"""
######################## functions definition ################################
######################## functions definition ################################


class CDM03bidir():
    """
    """
    Charge Transfer Inefficiency
    Charge Transfer Inefficiency
    ============================
    ============================
@@ -103,11 +94,6 @@ parameters in parallel and serial direction.
    :requires: NumPy
    :requires: NumPy
    :requires: CDM03 (FORTRAN code, f2py -c -m cdm03bidir cdm03bidir.f90)
    :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.
    Class to run CDM03 CTI model, class Fortran routine to perform the actual CDM03 calculations.


     :param settings: input parameters
     :param settings: input parameters
@@ -181,8 +167,6 @@ class CDM03bidir():
        Set up the logger.
        Set up the logger.
        """
        """
        self.logger = True
        self.logger = True
        # if self.log is None:
        #     self.logger = False




    def applyRadiationDamage(self, data, iquadrant=0):
    def applyRadiationDamage(self, data, iquadrant=0):
@@ -309,6 +293,8 @@ def lg(log_filename, loggername='logger'):




##############################################################################
##############################################################################

def IFSinformation():
    """
    """
    IFS Instrument Model
    IFS Instrument Model
    ====================
    ====================
@@ -316,13 +302,8 @@ IFS Instrument Model
    The file provides a function that returns IFS related information such as pixel
    The file provides a function that returns IFS related information such as pixel
    size, dark current, gain...
    size, dark current, gain...
    
    
"""
    Returns a dictionary describing VIS. The following information is provided 

    (id: value - reference)::
def IFSinformation():
    """
    Returns a dictionary describing VIS. The following information is provided (id: value - reference)::




    :return: instrument model parameters
    :return: instrument model parameters
    :rtype: dict
    :rtype: dict
@@ -353,7 +334,12 @@ def CCDnonLinearityModel(data, beta=6e-7):
    return out
    return out


#############################################################################
#############################################################################

from scipy.interpolate import InterpolatedUnivariateSpline

class cosmicrays():
    """
    """
    
    Cosmic Rays
    Cosmic Rays
    ===========
    ===========


@@ -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
    testing purposes. The class can be used to draw a single cosmic ray
    event or up to a covering fraction.
    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
    Cosmic ray generation class. Can either draw events from distributions or
    set the energy of the events to a constant.
    set the energy of the events to a constant.