3 Recipes

 3.1 Recipe Names
 3.2 Recipe locations

Recipes in orac-dr consist of a series of data reduction steps (primitives) containing instructions for the reduction of data. In general, recipes are different for each instrument supported and are keyed to the specific observing mode used to take the data.

An example recipe may look something like:

  =head1 NAME
  
  RECIPE_NAME - Short description of what the recipe does
  
  =head1 DESCRIPTION
  
  Long description of what recipe does.
  
  =head1 NOTES
  
  Some notes associated with the recipe.
  
  =head1 SEE ALSO
  
  List of related recipes.
  
  =head1 AUTHORS
  
  List of authors
  
  =cut
  
  _INSTRUMENT_HELLO_
  # A comment
  _STEP_ONE_
  _STEP_TWO_  ARG1=number ARG2=string
  _STEP_THREE_
  _TIDY_RECIPE_

This recipe illustrates all the important features of a recipe:

Here is a more concrete example, the UFTI QUADRANT_JITTER recipe (without the pod sections and only minimal comments):

  # Initialisation
  _IMAGING_HELLO_
  _CREATE_WCS_
  _QUADRANT_JITTER_HELLO_
  _QUADRANT_JITTER_STEER_
  # Calibration
  _MASK_BAD_PIXELS_
  _SUBTRACT_DARK_
  _FLAT_FIELD_QUADRANT_JITTER_ MASK=1
  # Mosaicking
  _GENERATE_OFFSETS_QUADRANT_JITTER_ PERCENTILE=99 COMPLETE=0.4 MINPIX=12
  _MAKE_MOSAIC_QUADRANT_OPTIMISED_ RESAMPLE=1 INT_METHOD=linint FILLBAD=1
  # Cleanup
  _QUADRANT_JITTER_TIDY_

3.1 Recipe Names

The names of recipes should be descriptive. Short obtuse names are not recommended since it should be obvious to the observer which recipe is associated with which observing mode. In general, recipe names are read from the file header, the location of which is specified by the instrument specific classes in the orac-dr. If required though, the recipe can be specified on the command line although this can cause problems if the user specifies the wrong observation numbers.

3.2 Recipe locations

orac-dr searches in two locations for the recipe files. First, the directory specified by the ORAC_RECIPE_DIR environment variable, if defined, is searched. This allows users of the pipeline to modify a standard recipe without editing the original. If the variable is not set or the recipe can not be found, the default location of $ORAC_DIR/recipes/$ORAC_INSTRUMENT is searched (although Orac-dr can sometimes be used to modify the value of ORAC_INSTRUMENT during initialization). The pipeline aborts if the recipe cannot be located.

2orac-dr does not enforce this rule though and it is possible to include Perl constructs in private recipes and for testing. It should not be done for production code.