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 FindObjPar parameters in par. The latter takes precedence. If more than one row is provided by standard_frames, the first index is used.

Parameters:
Returns:

Full path to the standard spec1d output file to use.

Return type:

str

pypeit.outputfiles.intermediate_filename(itype, basename, det_name, inter_path='Intermediate')[source]

Construct the intermediate file name for a given type and detector

Parameters:
  • itype (str) – Type of intermediate file Standard options are: sciImg, bkgImg, initSky, spec1d

  • basename (str) – Basename of the file

  • det_name (str) – Name of the detector

  • inter_path (str, optional) – Path to the intermediate files

Returns:

The full path to the intermediate file

Return type:

str

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 from fitstbl.

  • twod (bool) – Name for the 2D output file; 1D file otherwise.

  • ext (str, optional) – Extension for the output file. Default is ‘.fits’.

Returns:

The path for the output file

Return type:

Path