Flat
Overview
This file describes the data model for the Flat
.
It is a series of images starting from
the combination of all input pixelflat frames.
The images are written to disk as a multi-extension FITS file
prefixed by Flat
in the Calibrations/
folder.
See Calibration Frame Naming for the naming convention.
Inspecting
PypeIt provides the pypeit_chk_flats
script to inspect
the key Flat
outputs.
The script usage can be displayed by calling the script with the
-h
option:
$ pypeit_chk_flats -h
usage: pypeit_chk_flats [-h] [--type TYPE] [--try_old] file
Display flat images in Ginga viewer
positional arguments:
file PypeIt Flat file [e.g. Flat_A_1_DET01.fits]
options:
-h, --help show this help message and exit
--type TYPE Which flats to display. Must be one of: pixel, illum, all
(default: all)
--try_old Attempt to load old datamodel versions. A crash may ensue..
(default: False)
pypeit_chk_flats
This script takes a Flat
as input and displays
a series of images in a
ginga viewer, each in a separate tab.
Here is a typical call:
pypeit_chk_flats Calibrations/Flat_A_1_DET01.fits
Below we describe the standard products. There is enough variation from spectrograph to spectrograph that we have not included example screen-shots.
Raw Flat
This is the processed and combined pixelflat
image.
Despite the name, it is not completely raw.
This image should look like any one of your input
pixelflat
images.
Pixel Flat
This is the normalized to unity image which is used to correct for pixel-to-pixel variations across the detector.
It should look mainly like a salt-and-pepper, random-noise image fluctuating very close around values of 1.
For many detectors there may be ‘pock’ marks, columns, and even funny patterns.
It is also typical for the extreme spectral portions (top/bottom) to have more structure or pattern noise. This is especially true if there is limited flux at these ends (e.g. the data goes below the atmospheric cutoff).
Illumination Flat
This image should also have most values near unity, but there will be vertical coherence. And the edges (left/right) may fall off well below unity.
Flat Model
This image should largely resemble the Raw Flat.
pypeit_show_pixflat
In addition to pypeit_chk_flats
, if a custom pixel flat is provided by the user,
another script pypeit_show_pixflat
is available to inspect it. The script is called as follows:
pypeit_show_pixflat PYPEIT_LRISb_pixflat_B600_2x2_17sep2009_specflip.fits.gz
The script usage can be displayed by calling the script with the -h
option:
$ pypeit_show_pixflat -h
usage: pypeit_show_pixflat [-h] [--det DET [DET ...]] file
Show an archived Pixel Flat image in a ginga window.
positional arguments:
file Pixel Flat filename, e.g.
pixelflat_keck_lris_blue.fits.gz
options:
-h, --help show this help message and exit
--det DET [DET ...] Detector(s) to show. If more than one, list the detectors
as, e.g. --det 1 2 to show detectors 1 and 2. If not
provided, all detectors will be shown. (default: None)
Troubleshooting
If one or more of your image appears to be in err, here are the things to consider:
Is one or more of your flat frames junk?
Is one or more of your input flat frames mis-labeled?
Did you saturate portions of the flat?
Current FlatImages Data Model
Internally, the image is held in
FlatImages
which subclasses from pypeit.datamodel.DataContainer
.
The datamodel written to disk is:
Version 1.1.2
HDU Name |
HDU Type |
Data Type |
Description |
---|---|---|---|
|
… |
Empty data HDU. Contains basic header information. |
|
|
float64 |
Processed, combined pixel flats |
|
|
float64 |
Normalized pixel flat |
|
|
float64 |
Model flat |
|
|
… |
bspline model of the pixelflat for |
|
… |
… |
… |
… |
|
… |
2D polynomial fits to the fine correction of the spatial illumination profile of the pixelflat for |
|
… |
… |
… |
… |
|
int16 |
Mirrors SlitTraceSet mask for flat-specific flags |
|
|
float64 |
Relative spectral illumination |
|
|
float64 |
Waveimage for pixel flat |
|
|
float64 |
Processed, combined illum flats |
|
|
… |
bspline model of the illumflat for |
|
… |
… |
… |
… |
|
… |
2D polynomial fits to the fine correction of the spatial illumination profile of the illumflat for |
|
… |
… |
… |
… |
|
int16 |
Mirrors SlitTraceSet mask for flat-specific flags |
|
|
int64 |
Slit spat_id |