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

Construct a differential (or absolute) model for the positions of the spectral orders. More...

Inheritance diagram for hermes.pipeline.components.modelsearchedorderpositions.modelSearchedOrderPositions:
hermes.pipeline.core.pipelinecomponent.PipelineComponent

Public Member Functions

def __init__
 Make a Hermes component and initialize variables.
 
def optionsAreValid
 check users options, set default values when needed
 
def __call__
 Run the component starts here.
 
def getTheMask
 Construct the mask.
 
def getOminusCsOfMeasured
 
def getModelAbsoluteOrderPositions
 
def getBivariatePolynomialValue
 
def modelOrderPositions
 
- 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

 isLevelToSet
 initiate the values More...
 
 areVirtualEdgeOrdersAdded
 set areVirtualEdgeOrdersAdded according to user's value or True for default
 
 isDebug
 User may set this switch to True in order to get intermediary results in the debug folder (as files)
 
 referenceRow
 set referenceRowForMaskConstruction according to user's value or 0 for default
 
 level
 set ccfTresholdForMaskConstruction according to user's value or 0. More...
 
 isFerosData
 set isFerosData according to user's value or False for default. More...
 
 isMaskNeeded
 set isMaskNeeded according to user's value or False for default
 
 areRelativeCoordinates
 set areRelativeCoordinates according to user's value or True for default
 
 polyorder
 set PolynomeDegreeInOrderDirection according to user's value or 7 for default
 
 polyrow
 set PolynomeDegreeInRowDirection according to user's value or 5 for default
 
 makeTemplateOrdpos
 set makeTemplateOrdpos according to user's value or False for default
 
 MODSHIFT
 set shiftApproximateOrderPositions according to user's value or 0 for default
 
 results
 
 name
 
 header
 point to the header
 
 inFile
 
 firstOrder
 preset first order
 
 lastOrder
 preset last order
 
 orderMid
 preset the order middle
 
 rowMid
 preset the row middle
 
 allLevels
 list of all levels
 
- Public Attributes inherited from hermes.pipeline.core.pipelinecomponent.PipelineComponent
 options
 
 logger
 
 ConsoleLogSeverity
 default value
 
 canShowGraphics
 when machine does not run matplotlib. More...
 

Detailed Description

Construct a differential (or absolute) model for the positions of the spectral orders.

PURPOSE :

To model the absolute order positions (f.e. those measured from scratched by the
searchorderpositions module)

COMMENTS :

SYNTAX :

INPUT CONSTANTS FROM INSTRUMENT MODEL :

MANDATORY :
    instrumentModel.middleOrder
        middle order number used as origin of the relative CCD coordinates
    instrumentModel.middleRow
        middle row number (here we suppose that rows are in the cross order direction)
        used as origin of the relative CCD coordinates

INPUT DATA FROM RESULTDICT :

MANDATORY :
    AbsoluteOrderPositionsInTemplate
        Is a frame that contains the absolute order positions in the template (see instrument model).
        Dimensions are [Nrow, Norder]. Where Nrow is the number of pixels in the cross-order direction
        and Norder is the number of orders.
    MaximaOfTheCrossCorrelationFunctions
        Is a frame having the same dimensions than AbsoluteOrderPositionsInTemplate.
        It contains the maximum value of the cross correlation functions used to locate the
        orders, row per row.

OPTIONAL :




OPTIONS READ FROM OPTIONDICT :

MANDATORY :
    referenceRowForMaskConstruction (int)
        default is set to 0
        This index is needed when a mask is needed for the modeling.
        It is used to construct the mask by setting the reference row (in the cross order direction)
        to which all the CCF maxima will be compared.
    ccfTresholdForMaskConstruction (float)
        default is 0.7
        Is associated to referenceRowForMaskConstruction. All order positions derived from a CCF
        having a maximum lower than ccfTresholdForMaskConstruction * CCFMAX_in_the_referenceRowForMaskConstruction
        will be masked
    isFerosData (boolean)
        default is False
        Tells whether we are using FEROS data.
    isMaskNeeded (boolean)
        default is False
        Do we need to mask order positions before carrying out the modeling ?
    areRelativeCoordinates (boolean)
        default is True
        De we used relative CCD coordinates to model the order positions
    PolynomeDegreeInOrderDirection (int)
        default is 7
        It corresponds to the degree of the bivariate polynomial in the cross order direction.
        (i.e. the degree is therefore 7 per default)
    PolynomeDegreeInRowDirection (in)
        default is 5
        It corresponds to the degree of the bivariate polynomial in the cross row direction.
        (i.e. the degree is therefore 5 per default)
    orderPositionTemplate (array)
        the reason is that we need to rewrite the fits file of the template used to locate
        the order positions.
    orderPositionTemplateHeader (fits header)
        because we need to add or update the model coefficients in the header of the fits
        file



OPTIONAL :

    areVirtualEdgeOrdersAdded (boolean)
        hardcoded value is True
        to measure the background we need one additional order on both sides of the CCD

    isDebug (boolean)
        default is True
        Set this parameter to true to write debug information in the
        self.results ["DebugPath"] folder.
        following fits files will be written:
            masktomodelsearchedorderpositions.fits
            coefficientsmodelsearchedorderpositions.fits
            modeledsearchedorderpositions.fits
            ominuscsofsearchedpositions.fits

OUTPUT written in the RESULTDICT :
    consideredMask
        is the mask that was considered during the modeling
    modelOrderPositionCoefficients
        are the coefficients of the bivariate polynomial used to model the
        order positions
    modelAbsoluteOrderPositions
        absolute order positions predicted by the model
    oMinusCsSearchOrderPositions
        O-C values

OUTPUT written in fits files:

    File path and name: self.results ["outputPath"] + "templateordercenters.fits"
        A new version of the image frame is produced. In this version the coefficients of the
        bivariate polynomial used to fit the order positions are saved in the header.:
        modelOrderPositionCoefficients
        While the image remains unchanged:
        orderPositionTemplate
        The coefficients we save in the header are defined using the following keywords:
            HIERARCH MODEL ODEGREE
            HIERARCH MODEL RDEGREE
            "HIERARCH COEFFS "+str(k)+" "+str(l)
            HIERARCH MODEL REF ROW
            HIERARCH MODEL REF ORDER
            MODSHIFT

Member Data Documentation

hermes.pipeline.components.modelsearchedorderpositions.modelSearchedOrderPositions.isFerosData

set isFerosData according to user's value or False for default.

First runs weer done using Feros data, and results were compared to known good results. Switch was kept because it can be useful to rerun those tests, or just to use some feros data.

hermes.pipeline.components.modelsearchedorderpositions.modelSearchedOrderPositions.isLevelToSet

initiate the values

treshold/level can be estimated by revering to the point where orders are the most aligned with the lines

set true

hermes.pipeline.components.modelsearchedorderpositions.modelSearchedOrderPositions.level

set ccfTresholdForMaskConstruction according to user's value or 0.

for default


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