Next: Recipe Names
Up: ORAC-DR - Programmer's Guide
Previous: Overview
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:
- The recipe must contain documentation in the Perl POD syntax
(see e.g. the PERLPOD manpage). This documentation is used
by the oracman command and for the automated documentation system.
At the very least, recipe documentation should include NAME
and DESCRIPTION fields. The NAME field should use
the standard Perl format of
RECIPE_NAME - purpose
so that the POD translators can correctly determine this information
when generating LATEX and HTML code.
- To simplify the readability of recipes for non-programmers and
to separate the recipe language from the programming language
used to implement the primitives, no computer code should be visible
in the recipe.2
- Recipes are in plain text, and are easily modified by both support
scientists and users with the aid of a text editor. This also means
that is should be easy to support a GUI based drag-and-drop-type
recipe builder at a future date.
- For most instruments, it is required that a HELLO
primitive be included at the start of every recipe. This is used
to guarantee that certain initialization steps are always
executed. See individual instrumentation documentation to see whether
a HELLO primitive is required.
- The comment character is a #. All text after a # is ignored by
the recipe parser.
- Configuration options can be passed into primitives by the use
of a KEYWORD=value syntax. The recipe parser automatically
converts these values into arguments suitable for the primitives.
- A TIDY primitive is required at the end of most
recipes. This can be used to remove intermediate files at the
end of a recipe and any other tidying operation It usually calls the
_DELETE_TEMP_FILES_ primitive. It must make sure that
files required for subsequent group processing are not deleted.
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_
Next: Recipe Names
Up: ORAC-DR - Programmer's Guide
Previous: Overview
ORAC-DR -- Programmer's Guide
Starlink User Note 233
Tim Jenness, Frossie Economou, Brad Cavanagh
Joint Astronomy Centre, Hilo, Hawaii
June 2004
E-mail:ussc@star.rl.ac.uk
Copyright © 2004 Particle Physics and Astronomy Research Council