pypeit.core.wavecal.waveio module
Module for I/O in arclines
- pypeit.core.wavecal.waveio.load_line_lists(lamps, unknown=False, all=False, restrict_on_instr=None)[source]
Loads a series of line list files
- pypeit.core.wavecal.waveio.load_reid_arxiv(arxiv_file)[source]
Load a REID arxiv file Now there are 2 possible formats. We need to consolidate
- pypeit.core.wavecal.waveio.load_template(arxiv_file, det, wvrng=None)[source]
Load a full template file from disk
- Parameters
arxiv_file – str
det – int
wvrng (list, optional) – min, max wavelength range for the arxiv
- Returns
ndarray flux: ndarray binning: int, Of the template arc spectrum
- Return type
wave
- pypeit.core.wavecal.waveio.load_tree(polygon=4, numsearch=20)[source]
Load a KDTree of ThAr patterns that is stored on disk
- Parameters
polygon (int) –
Number of sides to the polygon used in pattern matching:
polygon=3 –> trigon (two anchor lines and one floating line)
polygon=4 –> tetragon (two anchor lines and two floating lines)
polygon=5 –> pentagon (two anchor lines and three floating lines)
numsearch (int) –
Number of consecutive detected lines used to generate a pattern. For example, if numsearch is 4, then for a trigon, the following patterns will be generated (assuming line #1 is the left anchor):
1 2 3 (in this case line #3 is the right anchor)
1 2 4 (in this case line #4 is the right anchor)
1 3 4 (in this case line #4 is the right anchor)
- Returns
file_load (KDTree instance) – The KDTree containing the patterns
index (ndarray) – For each pattern in the KDTree, this array stores the corresponding index in the linelist
- pypeit.core.wavecal.waveio.load_wavelength_calibration(filename: Path) dict [source]
Load the wavelength calibration data from a file.
- Parameters
filename (
pathlib.Path
) – Name of the json file.- Returns
Returns the wavelength calibration dictionary. Lists read from the json file are returnes as numpy arrays.
- Return type