The coefficient file will normally have been written by SDIST and if so must have been written by the version of SDIST that was modified to support ECHMASK.
The PERISCOPE keyword (see below) determines whether each order has two separate parts (corresponding to object and sky and due to the special periscope that samples object and sky at a wide spacing and brings them together on the slit) or one part corresponding simply to the slit). The data values in the mask are 10 * (true order number) + (sub-order number) where the sub-order number is 0 if there is no periscope fitted, 1 if this is the first part of an order and 2 if this is the second part of the order. The "first" and "second" parts of an order are defined so that the actual data values in the mask are monotonic along a vertical slice through it, i.e. they might go 412, 411, 402, 401 if the periscope is fitted and they might go 410, 400 if it is not fitted.
If PERISCOPE is NO then the user has the option of splitting the data in an order into object and up to two separate regions of sky. The object is assigned sub-order 1 and the sky is assigned sub-order 2. Note that this assignment may differ from when PERISCOPE is yes, since in that case there is no guarantee that sub-order 1 is object - it may be sky! There may be room for enhancement here.
E C H M A S K
Program name:
ECHMASK
Function:
Write a mask image that can be used for quick-look extraction of
orders from a raw echelle image.
Description:
The program reads a file that identifies where the orders are in
the image and sets the values in the mask to be zero if that pixel
in the mask does not lie in an order and to a number derived from
the order number otherwise (see below). It is guaranteed that
every order is extracted using the same number of rows, but of
course the position of these rows may vary along an order so one
can expect visible jumps in the extracted data, especially if too
fews rows are extracted to take all the data from the object.
The coefficient file will normally have been written by SDIST and
if so must have been written by the version of SDIST that was
modified to support ECHMASK.
The PERISCOPE keyword (see below) determines whether each order
has two separate parts (corresponding to object and sky and due to
the special periscope that samples object and sky at a wide
spacing and brings them together on the slit) or one part
(corresponding simply to the slit). The data values in the mask
are 10 * (true order number) + (sub-order number) where the
sub-order number is 0 if there is no periscope fitted, 1 if this
is the first part of an order and 2 if this is the second part of
the order. The "first" and "second" parts of an order are defined
so that the actual data values in the mask are monotonic along a
vertical slice through it, i.e. they might go 412, 411, 402, 401 if
the periscope is fitted and they might go 410, 400 if it is not
fitted.
If PERISCOPE is NO then the user has the option of splitting
the data in an order into object and up to two separate regions of
sky. The object is assigned sub-order 1 and the sky is assigned
sub-order 2. Note that this assignment may differ from when
PERISCOPE is yes, since in that case there is no guarantee that
sub-order 1 is object - it may be sky! There may be room for
enhancement here.
Parameters:
(>) COFILE (Character) The name of the coefficient file.
Default SDIST.
(>) PERISCOPE (Keyword) Whether or not the periscope is fitted.
Default YES.
(>) OBJWIDTH (Integer) The number of rows to be extracted on
behalf of the object per order. If PERISCOPE is
YES then object and sky are not distinguished
between and this width also applies to the sky.
If PERISCOPE is NO then this width applies
only to the object and the position of the sky
is specified using the S1* and S2* parameters.
If OBJWIDTH is specified as zero then the width
information from the coefficient file is used to
derive a sensible value. Default 0.
(>) OBJOFFSET (Float) The offset of the centre of the object
data from the centre of each order. If specified
as being non-zero and if OBJWIDTH is zero, the
derived width is adjusted to take account of the
offset. Default 0.
(>) S1WIDTH (Integer) The number of rows to be extracted on
behalf of the first region of sky per order.
This and the other S* parameters are prompted
for only if PERISCOPE is NO. If specified as
zero, it is assumed that no sky is to be
extracted and the remaining S* parameters are
not prompted for. Default 0.
(>) S1OFFSET (Float) The offset of the centre of the first
region of sky from the centre of the object data
(not necessarily from the centre of the order).
Default 0.
(>) S2WIDTH (Integer) These parameters are the same as
(>) S2OFFSET (Float) S1WIDTH and S2OFFSET but they refer to
the second region of sky if any.
Defaults 0.
(>) MSTART (Integer) The order number of the first
"spectrum" in the coefficient file. Default 1.
(>) MDELTA (Integer) +1 if order numbers increase as
"spectrum number" increased, -1 otherwise.
Default -1.
(<) MASK (File) The name of the output mask image. This
is created with only a .Z.DATA structure.
Default MASK.
Language:
FORTRAN
External variables used:
None
Prior requirements:
None
FIGARO A general data reduction system