pypeit.pypeit module

Main driver class for PypeIt run

class pypeit.pypeit.PypeIt(pypeit_file, overwrite=True, reuse_calibs=False, show=False, redux_path=None, calib_only=False)[source]

Bases: object

This class runs the primary calibration and extraction in PypeIt

Todo

Fill in list of attributes!

Parameters:
  • pypeit_file (str) – PypeIt filename.

  • overwrite (bool, optional) – Flag to overwrite any existing files/directories.

  • reuse_calibs (bool, optional) – Reuse any pre-existing calibration files

  • show – (bool, optional): Show reduction steps via plots (which will block further execution until clicked on) and outputs to ginga. Requires remote control ginga session via ginga --modules=RC,SlitWavelength &

  • redux_path (str, optional) – Over-ride reduction path in PypeIt file (e.g. Notebook usage)

  • calib_only – (bool, optional): Only generate the calibration files that you can

Variables:
build_qa()[source]

Generate QA wrappers

Called by run_pypeit.py

calib_all()[source]

Process all calibration frames.

Provides an avenue to process the calibrations for a dataset without (or omitting) any science/standard frames.

print_end_time()[source]

Print the elapsed time

property qa_path: str

Return the path to the top-level QA directory.

reduce_all()[source]

Main driver of the end-to-end reduction

Calibration and extraction via a series of calls to reduce_exposure().

property science_path: Path

Return the path to the science directory.

pypeit.pypeit.reduce_calibID(spectrograph, par, fitstbl, calib_ID, calibrations_path, reduce_standard=False, overwrite=False, show=False, run_state=None, reuse_calibs=True)[source]

Reduce all the frames in a given calibration group

Outputs are written to disk.

Calls reduce_exposure() to do the actual reduction.

Parameters:
  • spectrograph (Spectrograph) – The spectrograph object for the instrument being reduced.

  • par (PypeItPar) – The parameter set for the reduction, including slitmask and object finding parameters.

  • fitstbl (pypeit.metadata.PypeItMetaData) – The metadata table for the current reduction.

  • calib_ID (str) – The calibration group ID to reduce.

  • calibrations_path (str) – The path to the calibration files.

  • reduce_standard (bool, optional) – Reduce the standard frames if True; science frames if False.

  • overwrite (bool, optional) – Overwrite any existing files.

  • show (bool, optional) – Show reduction steps via plots (which will block further execution until clicked on) and outputs to ginga. Requires remote control ginga session via ginga --modules=RC,SlitWavelength &

  • run_state (RunPypeItState, optional) – The current state of the reduction.

  • reuse_calibs (bool, optional) – Reuse any pre-existing calibration files