Arcs and objects have now been extracted into collapsed echellograms, 2D images with X being pixel number and Y being order number. ECHARC is used to identify arc lines. This writes wavelength calibration data as a 2D ARCE.X.DATA array and the ARCE.X structure is then copied to the OBJE.X structure using the XCOPY program.
ECHARC first does a 1D arc fit on three or more orders that you fit interactively. Then it enters an automatic mode where lines are identified in all the other orders, estimating wavelengths by fitting lines of constant order_number * wavelength between the interactively fitted orders. It is vital to interactively fit the extreme orders, it is worth interactively fitting four or more interactively fitted orders (not the minimum three), and if things start going wrong then they will probably stay wrong (use of Ctrl-C is recommended in this case). Care is usually rewarded.
The file ARLINES.ECH contains details of identified lines and if a fit fails a good policy is to restart using the results from the previous fit and perhaps selecting different interactively fitted orders, such as the ones that were worst in the automatic phase from the previous run. All the lines previously identified in the orders that are to be interactively fitted are still available so a re-run is not too time-consuming.
The DOWAVES keyword should always be false. If the ECHARC ``MONITOR" keyword is true, a graphical record of how the automatic mode is proceeding will be output to the device with logical name PGPLOT. For example, if you want monitor output on XWINDOWS, do
$ DEFINE PGPLOT XWINDOWS
$ ECHARC MONITOR
Here is a typical example of ECHARC.
$ ECHARC
(IMage) Collapsed echelle arc image to be fitted [ARC] - ARCE
(ARctype) Type of arc [THAR] -
(PREvious) Use arc lines from previous fit? [YES] - NO
(INTeractive) Number of orders to fit interactively [3] -
(ORDers) Order numbers ( 3 values) [82,75,68] -
(ORDERFit) Polynomial order for 1st fit [5] -
(SIgma) Arc line half width in pixels [3] -
(DOWaves) Write wavelength information to separate file? [NO] -
After a successful arc fit, use XCOPY to copy the ARCE.X structure to the OBJE.X structure.
$ XCOPY
(SPectrum) File requiring X data [] - OBJE
(ARc) File containing X data [] - ARCE
(OUTput) Name of resulting file [OBJE] -