Hermes DRS  6.0
reduction software
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
hermes.pipeline.components.subtractbiasCCD.subtractBiasCCD Class Reference

Subtract bias from exposed image part and estimate read-out noise. More...

Inheritance diagram for hermes.pipeline.components.subtractbiasCCD.subtractBiasCCD:
hermes.pipeline.core.pipelinecomponent.PipelineComponent

Public Member Functions

def __init__
 Make a Hermes component and initialize variables.
 
def optionsAreValid
 check we have the options, or set defaults. More...
 
def __call__
 run the module
 
- Public Member Functions inherited from hermes.pipeline.core.pipelinecomponent.PipelineComponent
def __init__
 
def __call__
 
def optionsAreValid
 
def getOptions
 
def setOptions
 
def checkExistShapeUnits
 
def isOption
 

Public Attributes

 isDebug
 default values for options More...
 
 results
 
 subtractBias
 subtractBias is mandatory More...
 
 readoutNoise
 readoutNoise is mandatory More...
 
 suspectBiasLevel
 suspectBiasLevel is mandatory
 
 suspectReadoutNoiseLevel
 suspectReadoutNoiseLevel is mandatory
 
 biasToleranceFromDefault
 biasToleranceFromDefault is mandatory
 
 readoutNoiseToleranceFromDefault
 readoutNoiseToleranceFromDefault is mandatory
 
 prescanBiasADU
 
 prescanReadoutNoiseADU
 get prescanReadoutNoiseADU from previous module or use default
 
- Public Attributes inherited from hermes.pipeline.core.pipelinecomponent.PipelineComponent
 options
 
 logger
 
 ConsoleLogSeverity
 default value
 
 canShowGraphics
 when machine does not run matplotlib. More...
 

Detailed Description

Subtract bias from exposed image part and estimate read-out noise.

PURPOSE :

This module subtracts the bias value from the input image (in ADU units) and
estimates the read-out noise (in ADU units). For the bias value, as well as
for the read-out noise (though independently), three options exist:

(a) select the value from the prescan region of the image (as computed by
    computeBiasPrescanADU); this corresponds to the options \n
    OptionDict.subtractBias = prescan \n
    OptionDict.readoutNoise = prescan (NOT recommended) \n

(b) select the default value associated with the instrument model; this
    corresponds to the options \n
    OptionDict.subtractBias = default \n
    OptionDict.readoutNoise = default \n

(c) let the choice depend on the difference between the prescan
    value (a) and the default value (b). This corresponds to the options \n
    OptionDict.subtractBias = conditional \n
    OptionDict.readoutNoise = conditional


    (c.1) If the absolute value of the difference between the two
        values (a) and (b) does not exceed the prescribed tolerance
        value 'biasToleranceFromDefault', then use the default value.

        The philosophy of this choice is that the default values based on
        the measurement of a stack of bias frames are more accurate than
        those measured in the prescan region of a single frame (especially
        true concerning the read-out noise).

    (c.2) If the absolute value of the difference is significant, then
        use the value from the prescan region.

        Any other value of 'OptionDict.subtractBias' is interpreted
        as "default", and an info message is given. \n

    (c.3) If the bias or the read-out noise estimated from the prescan
        region is grossly inconsistent with the default values, indicating
        that the detector is misbehaving, then treatment of the image will
        be stopped #SUGG and a warning will be issued.

    The relevant differences with the default values are put
    in 'model.suspectBiasLevel' and 'model.suspectReadoutNoiselevel'.
    ######## : NOTE : no writing in the model should been allowed at all !!!!!!!

COMMENTS :

SYNTAX :

INPUT CONSTANTS FROM INSTRUMENT MODEL :

MANDATORY :
    defaultPrescanBiasADU
    defaultReadoutNoiseADU
    biasOffset



INPUT DATA FROM RESULTDICT :

MANDATORY :
    image
        obtained from a rawimage with the "cutPrescan" component


    numberOfImagesInStack       should be 1
        other values will end the execution and raise the
        "TooManyFilesToHandle" flag

OPTIONAL :
    prescanBiasADU
    prescanReadoutNoiseADU
        Both those values should come
        from previous module "computebiasprescan"
        If not present, default values will be used.



OPTIONS READ FROM OPTIONDICT :

MANDATORY :
    subtractBias
        "default"
        "prescan"
        or "conditional"

    readoutNoise
        "default"
        "prescan"
        or "conditional"

    suspectBiasLevel
    suspectReadoutNoiseLevel
    biasToleranceFromDefault
    readoutNoiseToleranceFromDefault

OPTIONAL :
    isDebug (Boolean : True or False)
        default value : False
        writes a fits file with the results
            image           in 'T15image.fits')



OUTPUT WRITTEN IN RESULTDICT

When success condition is met :

    image
    subtractBias : used option for estimation of the bias level
    readoutNoise : used option for estimation of readout noise

When success condition is not met :
    record the fatal error message and stop the chain.




SUCCESS CONDITIONS :

OPTIONS are tested before execution of the component, and
some values are making that execution impossible.

Member Function Documentation

def hermes.pipeline.components.subtractbiasCCD.subtractBiasCCD.optionsAreValid (   self,
  optionDict 
)

check we have the options, or set defaults.

Member Data Documentation

hermes.pipeline.components.subtractbiasCCD.subtractBiasCCD.isDebug

default values for options

isDebug is False by default.

When set to True, intermediate files are written in the debug folder. This is meant to let the user find out why his results are not the expected ones. Usually it reflects a change in the instrument that has to be fixed.

hermes.pipeline.components.subtractbiasCCD.subtractBiasCCD.readoutNoise

readoutNoise is mandatory

otherwise, we choose to apply the ron measured in the prescan region

subtraction of the default bias, when appropriate.

TODO : test if int(image) works and if the subtract of a constant works on it find out which option for the readout noise estimate was selected for most cases, use standard value

hermes.pipeline.components.subtractbiasCCD.subtractBiasCCD.subtractBias

subtractBias is mandatory

find out whether either the bias level measured in the prescan region, or the read-out noise measured in the prescan region is suspect

find out which option for the bias estimate was selected


The documentation for this class was generated from the following file: