pypeit.outputfiles module
Module for constructing output file names and paths for PypeIt reductions.
- pypeit.outputfiles.get_std_outfile(fitstbl, par, standard_frames)[source]
Return the spec1d file name for a reduced standard to use as a tracing crutch.
The file is either constructed using the provided standard frame indices or it is directly pulled from the
FindObjParparameters inpar. The latter takes precedence. If more than one row is provided bystandard_frames, the first index is used.- Parameters:
fitstbl (
pypeit.metadata.PypeItMetaData) – The metadata table for the current reduction.par (
pypeit.par.pypeitpar.PypeItPar) – The parameter set for the current reduction.standard_frames (
list) – List of frame indices infitstblcorresponding to standard star frames.
- Returns:
Full path to the standard spec1d output file to use.
- Return type:
- pypeit.outputfiles.intermediate_filename(itype, basename, det_name, inter_path='Intermediate')[source]
Construct the intermediate file name for a given type and detector
- Parameters:
- Returns:
The full path to the intermediate file
- Return type:
- pypeit.outputfiles.science_path(par)[source]
Constructs the path to the science directory based on the provided parameters.
- Parameters:
par (
PypeItPar) – The parameter set for the reduction, including slitmask and object finding parameters.- Returns:
The full path to the science directory as a Path object.
- Return type:
Path
- pypeit.outputfiles.spec_output_file(fitstbl, par, frame, twod=False, ext='.fits', sci_path=None)[source]
Return the path to the spectral output data file.
- Parameters:
fitstbl (
pypeit.metadata.PypeItMetaData) – The metadata table for the current reduction.par (
pypeit.par.pypeitpar.PypeItPar) – The parameter set for the current reduction.frame (
int) – Frame index fromfitstbl.twod (
bool) – Name for the 2D output file; 1D file otherwise.ext (
str, optional) – Extension for the output file. Default is ‘.fits’.sci_path (Path)
- Returns:
The path for the output file
- Return type: