### 2 USING ECHOMOP

2.11 Automation
2.12 Quick-look Mode
2.13 Error Arrays

echomop may be used in a variety of ways depending upon your expertise.

The most convenient method for normal use is to start the main ECHMENU task. This task provides a guided path through the processes of astandard reduction.

#### 2.1 Getting Started

echomop is prepared for use from the shell by typing the command:

% echomop

To start a reduction type:

at the command-line prompt.

echomop uses a disc-based ‘reduction database’ to store objects which may need to be passed between various reduction tasks. You will initially be asked to provide a name for this file, which will then be created in the current directory. This file is associated with a particular set of data frames (object, arc, flat etc.) thereby providing the ability to replay any aspect of the reduction at a later date. Reduction files can occupy a large amount of disk space and you may wish to delete them once the reduced spectrum has been obtained.

When running, ECHMENU will provide a default for the next task to be performed; this will usually be the correct one for a standard reduction. To accept the recommended next step, it is only necessary to press one of the accept characters followed by a carriage return. Recognised accept characters are ‘Y’, ‘+’, and ‘/’.

The simplest method of using echomop is via the task ECHMENU which has access to all the processing modules, along with a set of utilities for interactive tuning of parameters, and plotting of graphs of intermediate results. As a reduction progresses, the details and results of each task are stored in a disk file allowing the repetition or alteration of any aspect of the reduction at any stage. ECHMENU prompts for the name of this ‘reduction database’ file when it starts. If the name of an existing reduction-database is given then this file will be opened, otherwise the package will create a new file using the name provided. The name of the file may also be provided on the command line, e.g.:

Once the reduction-database has been opened, the main menu is presented. This menu consists of all the major steps in the reduction process, along with a set of utility options, and some more specialised options (e.g., 2-D distortion correction). An option is selected by typing its number followed by carriage return. Some options may also be selected by entering a keyword (or its first character) followed by carriage return, e.g.,

PLOT

or

P

would select the graph plotting utility. Some options consist of sets of different tasks which usually need to be run together. It is possible to run these sub-options individually by typing the number and sub-option number in the form main.sub-option (e.g., 1.2). echomop attempts to provide the most sensible option (for a standard reduction) as the default, and you can accept this simply by typing one of the accept characters (e.g., ‘Y’), plus a carriage return. Option 0 always provides HELP information on the default option, and then allows you to browse the HELP library for more detailed information.

Most options invoke processing modules. These modules will usually require the specification of a number of parameters which will be automatically prompted for by the program. It is possible to preview/edit all the parameters (including any hidden ones) for any option by entering its number prefixed by a minus sign. e.g., -3 would allow preview/edit of the parameters used by option 3.

NOTE: In general, once a parameter has been provided it will NOT be re-prompted for by any module which requires it. The modules will simply re-use the value already supplied. The -option strategy overrides this behaviour and allows you to change any parameter value at any point.

Any parameter can be provided on the startup command-line, in this case the parameter will not be prompted for.

#### 2.3 Graphic Display

Graphics display is controlled by the parameter:

soft=/device/

The fiGARO SOFT command

% soft options

may be used to get a list of available graphics devices.

echomop also supports both SOFT=NONE and SOFT=NULL which disable all interactive graphics facilities and save CPU time when such facilities are not required.

Hardcopy graphics is directed to /device/ using the parameter:

hard=/device/

and enabled (in preference to on-screen graphics) using the hidden parameter HARDCOPY when starting echomop tasks, e.g.:

#### 2.4 Image Display

Before proceeding with a reduction it is recommended that the data frame be examined on an imaging display to ensure that the orders are orientated as echomop expects (See Orientation of Spectra).

If an imaging graphics display is available then you can use the DISPLAY command-line parameter when invoking echomop tasks, e.g:

The image display will automatically be used to:

• over-plot order trace paths in Options 2 and 15.
• over-plot extracted object limits in Option 19.
• determine positions for ‘browse’ option in the plotter.

#### 2.5 Parameters and Prompts

Most of the user-input information required by echomop is obtained using the ADAM parameter system. This standard method for getting values leads to a consistency of user-interface between all ADAM-based tasks. However, in some cases it is more convenient to present the user with a menu and this approach is used for the top-level selection of processing steps, and also during interactive graphic steps. When an ADAM parameter is prompted for, the default value (used if the response is carriage-return only) is indicated enclosed in single quotes and back slashes (/’ ’/). Instead of entering a value you may also use the following special responses which are processed by the ADAM parameter system:

• — provides information on parameter type, minimum and maximum allowed values etc.
• — provides same information as above and then allows you to browse the HELP library.
• — requests an abort of the task.
• — causes all subsequent parameters to adopt their default values without further prompts. (May also be appended to a value response, e.g., 10\ would set the current parameter to 10 and switch off any further prompting).

#### 2.6 Tuning Parameters

echomop tasks use a number of ‘hidden’ parameters. These will not normally need to be changed, but provide flexibility when processing problem data. They are also used by ECHMENU to configure itself for ‘quick-look’ extraction. ECHMENU Option 23 allows you to interactively examine and alter these parameters. Parameter values may also be supplied on task command-lines. echomop tasks always report any TUNE_ parameters which have been set to non-default values.

#### 2.7 Processing Steps

The reduction cycle has been split into a set of steps, most of which perform some form of image analysis. The results of these analysis steps provide various function fits and data describing the features of the image. All these steps take place before any extraction of data from the raw image. The extraction is performed in a single step taking into account the previously established data characteristics. This provides for the efficient processing of multiple data frames where the same object has been observed, as many of the processing steps need only be done once, for the first frame of the series.

All the discrete processing steps are available as both individual tasks (providing efficient execution of single steps), and as options from a menu-driven control task (providing automatic processing and context-sensitive assistance).

To run a particular step you can:

• type the task name at the command line, e.g.:
% ech_linloc

NOTE: that when using the individual tasks the strategy for selecting single order/all order operation is different. Individual tasks which can operate on single orders all utilise the parameter:

IDX_NUM_ORDERS

with which you should specify the number of the order to process, or a zero to indicate that all orders are to be processed in turn.

#### 2.8 Repeating Steps

In many cases the automatic sequence of steps provided by the ECHMENU main menu defaults will be enough to complete the reduction. In some cases however, it may be necessary to restart the reduction at a particular stage, maybe using a different raw image, different degree of polynomial etc.

ECHMENU allows the selection of any valid step of a reduction at any stage. If the step requested needs results from steps which have not yet been performed then you will be informed of this and the default next step will be set back to the step which generates the required information. If a single step task is invoked before all its input requirements are available (e.g., order tracing before order location) then the task will abort with a message indicating which task needs to be run in order to provide the necessary pre-requisites.

#### 2.9 Standard Steps

The following steps constitute a standard reduction as implemented by the monolithic ECHMENU task. You can follow this sequence by hitting Y and carriage-return at each main menu prompt, and supplying data frame names and parameters values when prompted.

• 1 — Start a reduction (ech_locate).
• 2 — Trace the orders and fit polynomials (ech_trace).
• 3 — Clip trace polynomial fits (ech_fitord).
• 4 — Determine dekker limits and sky/object channels (ech_spatial).
• 4.1 — Determine dekker limits (ech_dekker).
• 4.2 — Determine object and sky channels (ech_object).
• 5 — Model flat-field per-pixel balance factors (ech_ffield).
• 6 - Model sky background (ech_sky).
• 7 — Model object profile (ech_profile).
• 8 — Extract object and arc spectra (ech_extrct).
• 9 — Locate arc lines and fit Gaussian profiles (ech_linloc).
• 9.1 — Determine average arc line FWHM (ech_fwhm).
• 9.2 — Locate arc line candidates (ech_lines).
• 10 — Identify arc lines and fit wavelength scales (ech_idwave).
• 11 — Model blaze profile and apply to object spectrum (ech_blaze).
• 12 — Scrunch object spectrum (ech_scrunch).
• 12.1 — Fit arc-line FWHMs as a function of wavelength (ech_fitfwhm).
• 12.2 — Calculate wavelength scale (ech_wscale).
• 12.3 — Scrunch extracted object orders (ech_scrobj).
• 12.4 — Scrunch extracted arc orders (ech_scrarc).
• 14 — Write results file (ech_result).

The demonstration provided by ech_demo follows this overall sequence and the reader is encouraged to try it before using echomop in earnest. Steps 9 through 12 would be omitted if no wavelength calibration was required. Step 5 would be omitted if no flat field was available. In cases where multiple object frames have been taken, it would be efficient to use only steps 6, 7, 8, 11, 12 for additional frames. A quick-look extraction may be performed as soon as step 4 has been completed (using Option 19).

#### 2.10 Accessing Single Function Sub-options

Many of the ECHMENU main menu tasks consist of a number of independent functions which are automatically invoked. For example Option 12 consists of 4 sub-options. The ECHMENU program allows the selection of any sub-option directly, e.g.:

12.3

would select Option 12.3 (Scrunch extracted object order) explicitly.

To check if sub-options are available, the context specific HELP for the option should be viewed (type 0 at the main menu prompt). Some sub-options are individually accessible when using the single purpose tasks (e.g., ech_scrarc).

#### 2.11 Automation

echomop provides automation to many aspects of échelle data reduction which have traditionally required substantial interactive assistance:

• Order location
• Cosmic-ray pixel identification
• Object/Sky pixel classification
• Arc line identification

The provision of these features permits the completely automatic reduction of échelle data frames. To help ensure the success of automatic reduction runs, special attention should be made to ensure that the following conditions are satisfied:

• A bright continuous spectrum image is provided for order tracing.
• The trace/arc/object images supplied are the correct ones. For instance supplying the wrong arc image will cause problems if the orders are in different places on the detector.
• Constraints placed on the expected range of wavelength and dispersion are wide enough. e.g., if in doubt about the dispersion being 0.2 or 0.3 Angstroms per-pixel, provide limits of MIN_DISPERSION=0.1, MAX_DISPERSION=0.5.

#### 2.12 Quick-look Mode

Invoking ECHMENU with the TUNE_QUICK=Y will cause the automatic setting of tuning parameters to values designed for fastest processing.

The following algorithmic optimizations will be used:

• order tracing will use centre-of-gravity to locate the centre of the order.
• a maximum of 200 trace sample points per order will be measured.
• criteria for clipping points from the trace fit will be set at 1-pixel maximum deviation, and up to 5 pixels may be clipped per iteration.
• extraction will use the simple version of the 1-D algorithm which is faster than optimal/weighted extraction.
• arc-line identification will assume the data is arranged with wavelength increasing with X-pixel number.

#### 2.13 Error Arrays

echomop can deal with errors from the following variety of sources:

• Errors on the flat-field frame which should be provided in the flat-field frame error array. If no error array is provided then estimates using root-n statistics are used.
• Errors due to the readout-noise on CCD type detectors. The readout noise value is supplied as a parameter and is applied to the whole frame when calculating the variances on extracted pixels.
• Linear error sources determined may be treated by providing an error array associated with the object data frame. The values should represent an error source that does not vary with the intensity of the particular pixel involved. An example of this type of error source would be the bias subtraction. If many bias frames are available, then the error for each detector pixel can be determined. Supplying these errors as the object error array would then cause them to be correctly included in the variance calculations during extraction.
• Multiplicative errors such as those due to errors on the balance factors (from the flat field) may be taken into account by incorporating the appropriate values in the error array supplied with the flat-field frame. It is up to you to ensure these variances correctly represent the combined effect of both the flat-field noise and any additional multiplicative error source(s).
• Errors due to sky modelling and subtraction are calculated and processed internally by the extraction task.
• Errors due to detected cosmic-ray hits are treated by ignoring the contaminated pixel and rescaling the variance on the remaining pixels in that (wavelength) increment.
• All output spectra have an error array associated with them, these error arrays always contain the variance for the parallel entry in the data arrays.