autowisp.processing_steps.manual_util module

Class Inheritance Diagram

Inheritance diagram of ArgumentParser, DefaultsFormatter, ManualStepArgumentParser

Collection of functions used by many processing steps.

class autowisp.processing_steps.manual_util.ManualStepArgumentParser(*, input_type, description, add_component_versions=(), add_catalog=False, add_photref=False, inputs_help_extra='', allow_parallel_processing=False, convert_to_dict=True, add_lc_fname_arg=False, add_exposure_timing=False, skip_io=False)[source]

Bases: ArgumentParser

Inheritance diagram of autowisp.processing_steps.manual_util.ManualStepArgumentParser

Incorporate boiler plate handling of command line arguments.

__init__(*, input_type, description, add_component_versions=(), add_catalog=False, add_photref=False, inputs_help_extra='', allow_parallel_processing=False, convert_to_dict=True, add_lc_fname_arg=False, add_exposure_timing=False, skip_io=False)[source]

Initialize the praser with options common to all manual steps.

Parameters:
  • input_type (str) – What kind of files does the step process. Possible values are 'raw', 'calibrated', 'dr', or 'calibrated + dr'.

  • description (str) – The description of the processing step to add to the help message.

  • add_component_versions (str iterable) – A list of DR file version numbers the step needs to know. For example ('srcextract',).

  • add_catalog (False or dict) – Whether to add an arguments to specify a catalog query. If not False should specify defaults for some or all of the option values and a prefix for the option names.

  • inputs_help_extra (str) – Additional text to append to the help string for the input files. Usually describing what requirements they must satisfy.

  • allow_parallel_processing (bool) – Should an argument be added to specify the number of paralllel processes to use.

  • convert_to_dict (bool) – Whether to return the parsed configuration as a dictionary (True) or attributes of a namespace (False).

Returns:

None

_add_catalog_args(catalog_config)[source]

Add arguments to specify a catalog query.

_add_exposure_timing()[source]

Add command line arguments to determine exposure start & duration.

_add_version_args(components)[source]

Add arguments to select versions of the given components.

add_argument(*args, **kwargs)[source]

Store each argument’s description in self.argument_descriptions.

parse_args(*args, **kwargs)[source]

Set-up logging and return cleaned up dict instead of namespace.

autowisp.processing_steps.manual_util.add_image_options(parser, include=('subpixmap', 'gain', 'magnitude-1adu'))[source]

Add options specifying the properties of the image.

autowisp.processing_steps.manual_util.get_catalog_config(cmdline_args, prefix)[source]

Return the configuration for querrying a catalog per command line.

autowisp.processing_steps.manual_util.ignore_progress(input_fname, status=1, final=True)[source]

Dummy function to replace progress tracking of auto processing.

autowisp.processing_steps.manual_util.read_subpixmap(fits_fname)[source]

Read the sub-pixel sensitivity map from a FITS file.