recipe_system.reduction package Subpackages Submodules recipe_system.reduction.coreReduce module

class Reduce provides one (1) public method:


which calls on the mapper classes and passes the received data to them.

class recipe_system.reduction.coreReduce.Reduce(sys_args=None)[source]

Bases: object

The Reduce class encapsulates the core processing to be done by reduce. __init__ may receive one (1) parameter, nominally, an argparse Namespace instance. However, this object type is not required, but only that any passed object must present an equivalent interface to that of an <argparse.Namespace> instance, i.e. a duck type.

The class provides one (1) public method, runr(), the only call needed to run reduce on the supplied argument set. Parameters

sys_argsargparse.Namespace (optional) or <duck-type object>

This object type is not required, per se, but only that any passed object must present an equivalent interface to that of an argparse.Namespace instance. Attributes

adinputs: <list>

attribute is a list of the input astrodata objects as made from the ‘files’ list (see ‘files’ below).

output_filenames: <list>

read-only property is a list of final output filenames.

mode: <str>

operational mode. Currently, only ‘qa’, ‘sq’ modes are supported.

drpkg: <str>

Data reduction package name. Default is ‘geminidr’, the Gemini Observatory data reduction package.

files: <list>

List of input filenames. Passed to Reduce.__init__(), these are converted to astrodata objects.

suffix: <str>

User supplied suffix to be applied as a final suffix to output filenames.

ucals: <dict>

Dictionary of calibration files passed by –user_cals flag.

uparms: <dict>

Dictionary of user parameters as passed by -p, –param flag.


List of products to upload to fitsstore as passed by –upload. E.g.,

–upload metrics calibs

(==> upload == [‘metrics’, ‘calibs’]) will upload QA metrics to fitsstore and processing calibration files.

recipename: <str> or callable

The name of the recipe that will be run. If None, the ‘default’ recipe is used, as specified in the appropriate recipe library.

property output_filenames

Map and run the requested or defaulted recipe. Parameters

<void> Returns


property upload
exception recipe_system.reduction.coreReduce.UnrecognizedParameterException[source]

Bases: Exception

Exception for unrecognized user parameters.