Check whether the frame geometry and exposure level is as expected. More...
Public Member Functions | |
| def | __init__ |
| Make a Hermes component and initialize variables. | |
| def | optionsAreValid |
| Read user options, or set defaults. More... | |
| def | __call__ |
| Program runs from here. | |
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 | |
| percentileOrders | |
| default values More... | |
| NumberOfLogHistogramBins | |
| User may want different bins for histograms. | |
| Percentile | |
| User may force another percentile. | |
| intensityLabels | |
| User may give another label serie. | |
| results | |
| startFirstBin | |
| order in ["red", "blue", "mid", "only"]: More... | |
| endLastBin | |
| numberOfHistogramBins | |
| numberOfOutliersLow | |
| numberOfOutliersHigh | |
| outlier | |
| stopIsRequested | |
| minVerticalAxis | |
| Prepare Plot. | |
| maxVerticalAxis | |
| minHorizontalAxis | |
| maxHorizontalAxis | |
| fiber | |
| get prescan region More... | |
| fig | |
| numberOfPixelsInImage | |
Public Attributes inherited from hermes.pipeline.core.pipelinecomponent.PipelineComponent | |
| options | |
| logger | |
| ConsoleLogSeverity | |
| default value | |
| canShowGraphics | |
| when machine does not run matplotlib. More... | |
Check whether the frame geometry and exposure level is as expected.
PURPOSE :
This module tests whether
(a) the frames are nowhere overexposed, however accepting 'known' saturated
pixels e.g. hot pixels and purposedly overexposed Ar or Ne lines from the
wavelength calibration lamp.
(b) the distribution of the high-intensity values over the frame is as expected
i.e. a rough check on the type of frame and the fact they are no unexpected
shifts in the position of the spectral orders or the spectral lines.
This module shows a histogram of the logarithm of the number of pixels within
an intensity interval [x:fx]. The factor f has a default value of 1.05 and
produces small bins at more-frequent low intensities and large bins at
less-frequent high intensities. The lowest-intensity interval starts below the
bias level and the highest interval includes numerical saturation. Overplotted
is a histogram computed over the pixels expected within the spectral orders
(for wavelength calibration frames: in emission lines in these orders). The
number and the position of 'unexpected' saturated pixels is also given.
COMMENTS :
The definition of the bins in the histogram is such that smaller bins are used
at count levels seen in many pixel, such that the log N - axis of the histograms
is confined to a smaller interval, which makes the figure easier readable.
INPUT CONSTANTS FROM INSTRUMENT MODEL :
MANDATORY :
defaultPrescanBiasADU
defaultReadoutNoiseADU
maskHRF, maskLRF, maskWCF, mask2F must exist in instrumentModel
and are masks locating approximately the order positions
INPUT DATA FROM RESULTDICT :
MANDATORY :
a raw image frame including the FIBMODE keyword in its header
can only be HRF, LRF, WCF or 2F in order to select the appropriate mask.
OPTIONS READ FROM OPTIONDICT :
MANDATORY :
NumberOfLogHistogramBins
intensityLabels
Percentile
OPTIONAL :
OUTPUT WRITTEN IN RESULTDICT
note number of unexpected saturated pixels : self.results["numberOfUnexpectedSaturatedPixels"]
plot saved in a png file | def hermes.pipeline.components.checkimagesanity.checkImageSanity.optionsAreValid | ( | self, | |
| optionDict | |||
| ) |
Read user options, or set defaults.
| hermes.pipeline.components.checkimagesanity.checkImageSanity.fiber |
get prescan region
get image region
| hermes.pipeline.components.checkimagesanity.checkImageSanity.percentileOrders |
default values
User may give another list.
| hermes.pipeline.components.checkimagesanity.checkImageSanity.startFirstBin |
order in ["red", "blue", "mid", "only"]:
color in ("red", "mid", "blue") logADU = true/false out == true: look for outliers
1.8.6