5.1.1.4. recipe_system.reduction package
5.1.1.4.1. Subpackages
5.1.1.4.2. Submodules
5.1.1.4.3. recipe_system.reduction.coreReduce module
class Reduce provides one (1) public method:
runr()
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.
5.1.1.4. Parameters
- sys_args
argparse.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.
5.1.1.4. 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.
- upload<list>
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
- runr()[source]
Map and run the requested or defaulted recipe.
5.1.1.4. Parameters
<void>
5.1.1.4. Returns
<void>
- property upload
- sys_args
- exception recipe_system.reduction.coreReduce.UnrecognizedParameterException[source]
Bases:
Exception
Exception for unrecognized user parameters.
- recipe_system.reduction.coreReduce.reduce_data(files, mode='sq', drpkg='geminidr', recipename=None, uparms={}, ucals={}, upload=None, config_file=None, suffix=None, logmode=None)[source]
Map and run the requested or defaulted recipe.
5.1.1.4. Parameters
- files<list> or str
The set of files to reduce, if a string it is assumed to be a single file
- mode<str>
The mode of reduction:
qa
ql
orsq
, defaults tosq
- drpkg :<str>
The data reduction package to map. Default is ‘geminidr’. This package must be importable.
- recipename<str>
The name of the recipe or primitive to run, or None for default
- uparms<dict>
The parameters for the recipes, if any
- ucals<dict>
Calibration files to use, if any, as a dictionary mapping calibration type to file,
None
for default- upload<list>
List of types to upload, default None
- config_filestr
Configuration file to use, None for default
- suffixstr
Suffix to add to output file(s), None for default
- logmodestr
Mode of logging such as ‘debug’, or None for default
5.1.1.4. Returns
<list> : List of files produced by the reduction