Automated typing of NIRES frames
Version History
Version |
Author |
Date |
|
---|---|---|---|
1.0 |
Kyle Westfall |
9 Aug 2022 |
1.10.1dev |
1.1 |
Debora Pelliccia |
9 Nov 2022 |
1.11.1dev |
1.2 |
Debora Pelliccia |
24 Mar 2023 |
1.12.2dev |
Basics
The general procedure used to assign frames a given type is described here: Frame Types.
NIRES frame typing
The primary typing of NIRES frames is performed by
pypeit.spectrographs.keck_nires.KeckNIRESSpectrograph.check_frame_type()
.
This function checks the values of various header keywords against a
set of criteria used to classify the frame type. The headers cards
required for the frame-typing and their associated keyword in the
PypeItMetaData
object are:
|
Header Key |
---|---|
|
|
|
|
|
|
The criteria used to select each frame type are as follows:
Frame |
|
|
|
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
Not use |
Not used |
|
|
Not use |
Not used |
|
|
Not use |
Not used |
|
|
|
|
|
|
|
|
Note
By default, the exposure time (
ITIME
) is only used to distinguish betweenscience
andstandard
frames; the criteria forITIME
can be changed using theexprng
parameter in the PypeIt Reduction File; see also Frame Types.
Testing
Requirement PN-14 states: “As a user, I expect the pipeline to automatically recognize calibration files.”
PypeIt
meets this requirement as demonstrated by the test at
PypeIt-development-suite/unit_tests/test_frametype.py
. To run the test:
cd PypeIt-development-suite/unit_tests
pytest test_frametype.py::test_nires -W ignore
The test 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 of the
test is as follows:
Find all the directories in the PypeIt Development Suite with Keck NIRES data.
For each directory (i.e., instrument setup; currently there is only one):
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.