5.1.1.3. recipe_system.mappers package

5.1.1.3.1. Submodules

5.1.1.3.2. recipe_system.mappers.baseMapper module

class recipe_system.mappers.baseMapper.Mapper(dtags, ipkg, mode='sq', drpkg='geminidr', recipename='_default')[source]

Bases: object

This is the base class for classes

recipeMapper.RecipeMapper

and

primitiveMapper.PrimitiveMapper.

It provides initialization only.

Recipes and primitives are algorithmically selected via instropection of module and class attributes that match on a dataset’s tags attribute.

5.1.1.3. Parameters

dtags<set>

A set of AstroData tags from input dataset. These are decoupled from astrodata objects so as not to introduce ‘ad’ objects into mapper generators.

ipkg<str>

Instrument package name, lower case, as returned by,

ad.instrument(generic=True).lower()

drpkg<str>

The data reduction package to map. Default is ‘geminidr’. This package must be importable.

recipename<str>

The recipe to use for processing. Passed by user with -r or set by caller. Else, ‘_default’ recipe. If defined, it will override the mapping in part or in whole.

mode<str>

Pipeline mode. Selection criterion for recipe sets. Supported modes: ‘sq’ - Science Quality (default) ‘qa’ - Quality Assessment ‘ql’ - Quicklook

5.1.1.3.3. recipe_system.mappers.primitiveMapper module

class recipe_system.mappers.primitiveMapper.PrimitiveMapper(dtags, ipkg, mode='sq', drpkg='geminidr', recipename='_default')[source]

Bases: Mapper

Retrieve the appropriate primitive class for a dataset, using all defined defaults:

>>> ad = astrodata.open(<fitsfile>)
>>> dtags = set(list(ad.tags)[:])
>>> instpkg = ad.instrument(generic=True).lower()
>>> pm = PrimitiveMapper(dtags, instpkg)
>>> pclass = pm.get_applicable_primitives()
>>> pclass
<class 'primitives_IMAGE.PrimitivesIMAGE'>
get_applicable_primitives()[source]

5.1.1.3.4. recipe_system.mappers.recipeMapper module

class recipe_system.mappers.recipeMapper.RecipeMapper(dtags, ipkg, mode='sq', drpkg='geminidr', recipename='_default')[source]

Bases: Mapper

Retrieve the appropriate recipe for a dataset, using all defined defaults:

>>> ad = astrodata.open(<fitsfile>)
>>> dtags = set(list(ad.tags)[:])
>>> instpkg = ad.instrument(generic=True).lower()
>>> rm = RecipeMapper(dtags, instpkg)
>>> recipe = rm.get_applicable_recipe()
>>> recipe.__name__
'qaReduce'
get_applicable_recipe()[source]