pypeit.scripts.compile_wvarxiv module

This script enables the user to convert a MasterWaveCalib wavelength solution fits file into a PypeIt arxiv solution that can be used with the full_template method.

class pypeit.scripts.compile_wvarxiv.CompileWVarxiv[source]

Bases: ScriptBase

A class for compiling a set of wxarxiv solutions from Identify into a single fits file.

Parameters:
  • wvarxiv_folder (str) – Location of the WVarxiv files.

  • instrument (str) – Name of the instrument (e.g., keck_lris_blue, keck_deimos, gemini_gmos_s_ham).

  • grating (str) – Instrument grating name (e.g., B600, R400, 600_10000).

  • append (bool, optional) – Append to an existing file for this instrument. Defaults to False.

Example

parser = WvarxivCompile.get_parser() args = parser.parse_args() WvarxivCompile.main(args)

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 Path.cwd() when the script is executed. This means help dialogs will include this replacement, and parsing of the command line will use Path.cwd() 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.

  • include_log_options (bool, optional) – Include options that define the logging level(s) and log file.

  • default_log_file (bool, optional) – If true, script will use the default log file name if none is provided. Ignored if include_log_options is False.

Returns:

Command-line interpreter.

Return type:

argparse.ArgumentParser

classmethod main(args)[source]

Execute the script.