pypeit.scripts.show_2dspec module

This script enables the viewing of a processed FITS file with extras. Run above the Science/ folder.

class pypeit.scripts.show_2dspec.Show2DSpec[source]

Bases: ScriptBase

classmethod get_parser(width=None)[source]

Construct the command-line argument parser.

Derived classes should override this. Ideally they should use this base-class method to instantiate the ArgumentParser object and then fill in the relevant parser arguments

Warning

Any argument that defaults to the string 'current working directory' will be replaced by the result of os.getcwd() when the script is executed. This means help dialogs will include this replacement, and parsing of the command line will use os.getcwd() as the default. This functionality is largely to allow for PypeIt’s automated documentation of script help dialogs without the “current working” directory being that of the developer that most recently compiled the docs.

Parameters:
  • description (str, optional) – A short description of the purpose of the script.

  • width (int, optional) – Restrict the width of the formatted help output to be no longer than this number of characters, if possible given the help formatter. If None, the width is the same as the terminal width.

  • formatter (argparse.HelpFormatter) – Class used to format the help output.

Returns:

Command-line interpreter.

Return type:

argparse.ArgumentParser

static main(args)[source]

Execute the script.

pypeit.scripts.show_2dspec.show_trace(sobjs, det, viewer, ch)[source]

Overplot the extracted object traces for this detector in the provided ginga channel.

Parameters:
  • sobjs (SpecObjs) – Object holding the 1D spectral extractions. If None, the function doesn’t do anything.

  • det (str) – The string identifier for the detector or mosaic used to select the extractions to show.

  • viewer

  • ch