Estimates the Background level between spectral orders. More...
Public Member Functions | |
def | __init__ |
Make a Hermes component and initialize variables. | |
def | getName |
give component name | |
def | optionsAreValid |
check options before running | |
def | __call__ |
program runs this | |
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 | |
allowedDistance | |
user may specify an allowed distance, default is 0.02 | |
halfLengthMedian | |
default value for falfLengthMedian is 15 | |
isDebug | |
User may want intermediary debug files in debug folder. | |
results | |
useOrderPositionsFromTemplate | |
parameter useOrderPositionsFromTemplate is mandatory, program fails without it. More... | |
Public Attributes inherited from hermes.pipeline.core.pipelinecomponent.PipelineComponent | |
options | |
logger | |
ConsoleLogSeverity | |
default value | |
canShowGraphics | |
when machine does not run matplotlib. More... | |
Estimates the Background level between spectral orders.
PURPOSE : This module estimates the background level at positions mid-between the spectral orders from the intensity values nearby this positions. The applied algorithm takes care of the facts that (a) the intensity increases towards the orders, possibly over a scale that is not very large relative to the pixel size; (b) hot pixels, dark pixels and radiation events may have biased observed intensities locally; (c) further model-fitting requires relatively smooth input data for a successful interpolation of the background near and under the spectral orders. With the cross-disperser being a prism, the spectral order at longer wavelength are packed closer together. The background level between successive spectral orders tends to change faster when the spectral orders are packed more densely. It is then advantageous to fit a model not in the detector pixel coordinates, but in a coordinate system linked to the number of the spectral order, i.e. varying between the centre of order m and order m + 1 smoothly from m to m + 1 proportional with the distance from the centres of the spectral orders. Hence, first this 'relative background coordinate system' is set-up and thereafter, using data on pixels with are sufficiently close to m + 1/2, the background at m + 1/2 is estimated in each row. An estimate of the random error in the background grid-points is included. COMMENTS : None SYNTAX : INPUT CONSTANTS FROM INSTRUMENT MODEL : if not in RESULTDICT : estimateOrderPositionTemplate is taken from model INPUT DATA FROM RESULTDICT : MANDATORY : image : input image (output from subtractbiasCCD) OPTIONAL : estimateOrderPositionTemplate OPTIONS READ FROM OPTIONDICT : MANDATORY : useOrderPositionsFromTemplate : YES or NO If order positions are NOT measured on frame, see if we may use the template. If not, stop with message. OPTIONAL : allowedDistance : allowed distance is the maximum allowed distance, along a row, between a pixel and the mid-interorder position in that row expressed in the "relative background" coordinate system (order separation = 1). Value very critical for results, see COMMENTS. halfLengthMedian : default = 15 isDebug (Boolean : True or False) default value : False writes results to two fits files image in 'T10image.fits') imageVariance in 'T11imageVariance.fits') OUTPUT WRITTEN TO THE RESULTDICT: backgroundOrderPositions = imageBackcoord measureBkgResultFile = path + filename1 midInterorderBackground = meds
hermes.pipeline.components.measurebackground.measureBackground.useOrderPositionsFromTemplate |
parameter useOrderPositionsFromTemplate is mandatory, program fails without it.