Automated typing of HIRES frames
Version History
Version |
Author |
Date |
|
---|---|---|---|
1.0 |
Debora Pelliccia |
10 Aug 2024 |
1.16.1.dev |
Basics
The general procedure used to assign frames a given type is described here: Frame Types.
HIRES frame typing
The primary typing of HIRES frames is performed by
pypeit.spectrographs.keck_hires.KECKHIRESSpectrograph.check_frame_type()
.
This function checks the values of various header keywords against a
set of criteria used to classify the frame type.
The header cards required for the frame-typing and their associated keyword in the
PypeItMetaData
object are:
|
Header Key |
---|---|
|
|
|
|
|
See below |
No key |
|
No key |
|
lampstat01
is defined using a combination of header keywords, which include
LAMPCAT1
, LAMPCAT2
, LAMPQTZ2
, LAMPNAME
. If LAMPCAT1 = True
or
LAMPCAT2 = True
, lampstat01
will be equal to 'ThAr1'
or 'ThAr2'
, respectively.
If LAMPQTZ2 = True
or LAMPNAME = 'quartz1'
, lampstat01
will be equal to 'on'
.
The criteria used to select each frame type are as follows:
Frame |
|
|
|
|
|
---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Not used |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Not used |
|
|
|
|
|
Not used |
Note that PypeIt employs commonly used value of exptime
to distinguish frame type;
however, if needed, the user can specify a different value by
using the exprng
parameter in the PypeIt Reduction File; see also Frame Types.
The science
and standard
frames have identical selection criteria, except for the
exptime
value. In order to better distinguish between the two types, the RA
and DEC
header
keywords are also used to assign the standard
type to frames with RA
and DEC
values that are
within 10 arcmin of one of the standard stars available in PypeIt (see Standard Stars).
The criteria used to select arc
and tilt
frames are identical; the same is true for
pixelflat
, trace
, and illumflat
frames. Note that if both pixelflat
and
slitless_pixflat
frames are identified, the pixelflat
assignment will be removed
so that the slitless_pixflat
frames will be used for the flat fielding.
Finally, note that a HIRES frame is never given a pinhole
type.
Testing
To test that PypeIt can successfully identify HIRES framt types
among a set of files, we have added the
test_hires()
test to ${PYPEIT_DEV}/unit_tests/test_frametype.py
.
Here is an example of how to run the test:
cd ${PYPEIT_DEV}/unit_tests
pytest test_frametype.py::test_hires -W ignore
The tests requires that you have downloaded the PypeIt
PypeIt Development Suite and defined the PYPEIT_DEV
environmental
variable that points to the relevant directory. The algorithm for
all these tests is the same and is as follows:
Find the directories in the PypeIt Development Suite with Keck HIRES data.
For each directory (i.e., instrument setup):
Make sure there is a “by-hand” version of the pypeit file for this setup where a human (one of the pypeit developers) has ensured the frame types are correct.
Effectively run pypeit_setup on each of the instrument setups to construct a new pypeit file with the automatically generated frame types.
Read both the by-hand and automatically generated frame types from these two pypeit files and check that they are identical. This check is only performed for the calibration frames, not any
science
orstandard
frames.
Because this test is now included in the PypeIt
Unit Tests (GitHub CI), this frame-typing check is performed by the
developers for every new version of the code.