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

Samples each order with steps constant in wavelength or velocity (ln(wavelength)) More...

Inheritance diagram for hermes.pipeline.components.rebin.rebin:
hermes.pipeline.core.pipelinecomponent.PipelineComponent

Public Member Functions

def __init__
 Make a Hermes component and initialize variables.
 
def optionsAreValid
 check options received or set defaults
 
def __call__
 the CALL needs the resultdict and the instrumentModel More...
 
- 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

 results
 
 rebinMethod
 Default for rebinMethod = "log". More...
 
 rebinAlgorithm
 Default for rebinAlgorithm = "gradient".
 
 rebinInput
 Default for rebinInput = "intensity".
 
 middleRow
 Default for middleRowCCD = 2304.
 
 middleOrder
 Default for middleOrder = 70.
 
 sizeOfBin
 bin size "sizeOfBin" is mandatory
 
 firstOrder
 set first order value from previous computations
 
 lastOrder
 set last order value from previous computations
 
- Public Attributes inherited from hermes.pipeline.core.pipelinecomponent.PipelineComponent
 options
 
 logger
 
 ConsoleLogSeverity
 default value
 
 canShowGraphics
 when machine does not run matplotlib. More...
 

Detailed Description

Samples each order with steps constant in wavelength or velocity (ln(wavelength))

PURPOSE :

This program resamples the extracted spectral orders in detector pixels
to equal-sized bins in velocity (natural logarithm of wavelength)
or wavelength. In the latter case, an equal size of bins can be imposed
over the whole wavelength range, over (partly overlapping) sub-ranges of
wavelength or over a spectral order. In the last option, the size is
determined by the requirement that the total number of bins in the
resampled spectrum equals the total number of pixels in the extracted
spectral order.
Notice that the last option is not suited to merge the spectral orders
afterwards.
Rebinning takes also into account whether the input data are
intensities per pixel, or rather intensities per pixel unit area.
The former is the case for extracted data, possibly divided by a
normalised flat-field. The latter is the case for extracted data
divided by similarly extracted data (for example a non-normalised
flat-field, or just an extracted blaze profile).

COMMENTS :



INPUT CONSTANTS FROM INSTRUMENT MODEL :

MANDATORY :
    rebinBinCentreReference
    pixelsize




INPUT DATA FROM RESULTDICT :

MANDATORY :
    inputExtracted



OPTIONS READ FROM OPTIONDICT :

MANDATORY :
    rebinMethod :
        log
        noMerge
        wavelength
    rebinAlgorithm :
        gradient

OPTIONAL
    sizeOfBin : if "rebinMethod" is different of "noMerge"



OUTPUT WRITTEN IN RESULTDICT

When success condition is met :
    outputExtracted



SUCCESS CONDITIONS :

Member Function Documentation

def hermes.pipeline.components.rebin.rebin.__call__ (   self,
  instrumentModel,
  rebinMethod = "-",
  rebinAlgorithm = "-",
  rebinInput = "-",
  sizeOfBin = 0 
)

the CALL needs the resultdict and the instrumentModel

    for each order, compute wavelength or ln wavelength
    at left edge and at right edge of each pixel
    using the exact wavelength calibration function.
    depending on rebinMethod, use wavelength units or ln wavelength

    Part II : count number of new bins in each order
    for the option "noMerge", the number of new bins should equal the number
    of input pixels, and the corresponding step in wavelength is computed
    In all other options the bin size is given and number of bins calculated.

CALLs :
rebin( instrumentModel)
rebin(self.results, instrumentModel, rebinMethod, rebinAlgorithm, sizeOfBin)

Member Data Documentation

hermes.pipeline.components.rebin.rebin.rebinMethod

Default for rebinMethod = "log".

Further testing of option values, some have to drop messages.

rebinMethod should be in ("log", "noMerge", "wavelength") and "log" as default


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