Search
Text Size:
Smaller Text Normal Text Larger Text

Facebook page

Twitter profile

YouTube channel

FIEStool and IRAF
FIEStool usage: How to get a working 'master_waveref'
FIEStool usage: What ThAr lines to use for a quick wavelength solution

FIEStool and IRAF

FIEStool is a front end to IRAF. Whereas operation of the tool requires very little knowledge of IRAF, there are notably 3 tasks for which some IRAF knowledge is required. In this section i write some handy hints, which might get you going....

  • - The manual order definition

      IRAF task: noao.echelle.apfind

      Start 'FIEStool.py'. Press 'Calibs'. After defining the order-definition frame, press 'Find order locations'.

      There might be a question on one of your terminals 'how many apertures to find?', to wich you may answer something in the order of 70.

      Point the cursor to any missing (unlabelled) apertures and press 'm' to add each to the list of apertures. Delete wrong or 'double' apertures with 'd'.

      Ordering the apertures:
      Once all apertures are labelled, move the cursor to the first (leftmost) aperture, press 'a' to set the 'ALL flag', then press '.' at the first aperture to select it, then press 'o' and specify that the first order should get number 1. Press 'a' again to unset the 'ALL flag'.

      Check that the order numbering is continuous and that no single aperture is labelled twice (delete and reorder if necesary).

      Handy keystrokes:
      - 'w' 'k'     set right edge of zoom window
      - 'w' 't'     set top edge of zoom window
      - 'w' 'j'     set left edge of zoom window
      - 'w' 'b'     set bottom edge of zoom window
      - 'w' 'a'     unzoom

      - ':nsum 10'     sum the plotted cross-cut over 10 lines
      - 'm'     mark aperture closest to cursor
      - '.'     select aperture closest to cursor
      - 'a'     toggle the 'ALL APERTURES flag'
      - 'd'     delete aperture closest to cursor, or all apertures if the 'ALL flag' is set
      - 'o'     give the aperture closest to the cursor a new number, or all apertures if the 'ALL flag' is set
      - 'c'     center the aperture(s)
      - '?'     get help info
      - 'q'     end task

  • - The manual interlaced order definition

      This applies to the simultaneous-ThAr mode only. The task is similar to the one described above.

      The target-fiber order definition will be displayed, and the user needs to shift the apertures towards their correct positions for the interlaced echellogram.

      To do:

      • zoom to the first order, e.g. with 'w' followed by 'x'
      • press the ALL key 'a'
      • place the cursor on the peak position of the first order
      • press 's' to shift all orders
      • press 'g' and 'c' to recenter all shifted orders
      • check that all orders are properly centered!!
      • press 'q' to quit and save. If you are not happy with the result, just repeat the task, it will start from the beginning every time.

      It is very important that the very same orders are used for the aperture definitions of the echellograms of the target and simulThAr fibers.

  • - The first wavelength solution

      IRAF task: noao.echelle.ecidentify

      This IRAF task has 2 layers: line-identification and the fitting of the wavelength solution.

      Line-identification, handy keystrokes:
      - for zooming, see above
      - ':thres '         check current threshold value
      - ':feat'         check number of identified lines - ':thres 10000'     set threshold to 10000
      - ':maxfeat 700'     set maximum number of lines to find to 700
      - 'm'     mark line closest to cursor
      - 'd'     delete line closest to cursor
      - 'j'     go to next order
      - 'k'     go to previous order
      - 'f'     fit the wavelength solution
      - 'l'     match lines from line list (only do this after the first fit of the wavelength solution)
      - '?'     get help info
      - 'q'     end task

      Fitting of the wavelength solution, handy keystrokes:
      - 'x'     change X axis, use either 'pixel' (wavelength direction) or 'order' (cross-disp direction)
      - 'niter 1'     set number of fit iterations to 1
      - 'xord 4'     set the number of polynomial terms in wavelength direction to 4
      - 'yord 4'     set the number of polynomial terms in cross-disp direction to 4
      - 'd'     delete point closest to cursor'
      - '?'     get help info
      - 'q'     end task

      What to do in what order, an example:
      - define the width of the ThAr lines, a correct value may significantly improve the RMS of the wavelength solution
            type   ':fwidth 3'   for high-res
            type   ':fwidth 6'   for med-res
            type   ':fwidth 10'   for low-res unbinned
            type   ':fwidth 6'   for low-res binned x2

      - type ':thres 1000' to set threshold to low value 1000
      - type ':maxfeat 1000' to set maximum number of lines to high value
      - mark about 12 lines manually, 4 at low orders, 4 at intermediate orders 4 at high orders. See section below this page for suitable lines.
      - press 'f' to make a first crude wavelength solution
      - press 'q' to end fitting

      - type ':thres 20000' set threshold to high value 20000
      - press 'l' to find bright lines in line list
      - type ':feat' to check number of identified lines (should be more now)
      - press 'f' to make a new better wavelength solution
      - press 'x' and look at the fit for both 'pixel' and 'order' directions.
      - type 'xord 4' to set correct polynomial terms
      - type 'yord 4' to set correct polynomial terms
      - press 'f' to refit
      - press 'q' to end fitting

      - type ':thres 5000' to lower the threshold
      - press 'l' to add less bright lines in line list
      - type ':feat' to check number of identified lines (should be even more now)
      - press 'f' to make a new better wavelength solution
      - press 'x' and look at the fit for both 'pixel' and 'order' directions.
      - type 'xord 4' to set correct polynomial terms
      - type 'yord 4' to set correct polynomial terms
      - press 'f' to refit
      - press 'q' to end fitting

      - set the threshold even lower and refit until you have identified about 500-1000 lines
      - finally press 'q' to end

  • - Writing the reduced 2D FITS frames into 1D FITS files

      IRAF task: imcopy

      At the end of the reduction, FIEStool can merge the reduced spectral orders, in which case the output frames are 1D and can be read in by most reduction packages. However, if the end result of the FIEStool reduction is a FITS file in 2D echelle format (orders not merged), then only IRAF knows how to handle the wavelenght format, as there is yet no FITS standard for 2D echelle wavelength solutions.

      To make such 2D frames readable by other packages we will provide a simple script in the near future. For now, please start up IRAF manually and copy the orders of the 2D file to a single 1D files. These 1D files will be understood by all reduction packages.

      Start IRAF by typing 'ecl' or 'cl'
      - check the dimension of the frame
        imhead FIqk260075_step009_wave
      - imcopy FIqk260075_step009_wave[*,1] FIqk260075_step009_wave_01
      - imcopy FIqk260075_step009_wave[*,2] FIqk260075_step009_wave_02
      - imcopy FIqk260075_step009_wave[*,76] FIqk260075_step009_wave_76
      - imcopy FIqk260075_step009_wave[*,77] FIqk260075_step009_wave_77


FIEStool usage: How to get a working 'master_waveref'

When you use FIEStool to make a new wavelength calibration, all previous wavelength solutions will be erased, except for the 'master_waveref' one. This 'master_waveref' solution will supply a first-guess solution so that you do not have to manually identify all the ThAr lines again.

However, if you do not have a 'master_waveref' solution yet, you need to interactively identify some ThAr lines. Here some guidelines on how to make a 'master_waveref' if there is absolutely nothing:

  • FIEStool.py
  • 'Settings' --> 'Edit all settings'
  • Define all necesary boxes; in particular

        Wavelength reference frame = ".../master_waveref.fits"
        Master wavel. ref. frame = ""     (empty)

  • 'Save settings'; 'Close window'
  • 'Calculate calibration frames'
  • 'Find wavelength solution'     this will take you a tedious while ...
  • Change the following settings:

        Wavelength reference frame = ".../waveref.fits"
        Master wavel. ref. frame = ".../master_waveref.fits"

  • 'Find wavelength solution'     this will go quickly now !!
  • Close the Calib-frames window
  • 'Settings' --> 'Edit all settings' --> 'Save settings'; 'Close window'
  • 'Settings' --> 'Save current settings as default'

    The last 2 items are important, or else you may lose all the hard work when starting a new "FIEStool -c" session.


    FIEStool usage: What ThAr lines to use for a quick wavelength solution?

    Having to point to various ThAr lines in the IRAF identify task is tedious. Point at the following lines, and the solution is found properly and quickly:
    order 154 (aperture ~04):   3718.2,   3719.4,   3729.3 Å
    order 153 (aperture ~05):   3718.2,   3719.4,   3729.3 Å
    order 120 (aperture ~38):   4726.9,   4735.9,   4764.9,   4778.3 Å
    order 80 (aperture ~78):   7124.6,   7147,   7168.9 Å
    order 79 (aperture ~79):   7207,   7208 Å

    Then fit, and use the ':threshold', ':maxfeat', and 'l' commands to identify more lines.
    The final fit should be with ':xor 4' and ':yor 4'.     Use ':niter 1'.
    Also, the ':fwidth' parameter might have to be tuned for different resolutions.


    Accuracy of the wavelength solution

    IRAF reports an RMS on the wavelength solution. Typical values that can be achieved with the 600 brightest lines of a non-overexposed frame:

    Accuracy of wavelength solution
    Fiber identify.fwidth RMS [Ångstrom]
    high-res 3 0.0013
    med-res 6 0.0015
    low-res unbinned 10 0.0020
    low-res binned x2 6 0.0050


    More hints to follow ...

    See the FIEStool manual.
    See the FIES ThAr atlas.
  • Back to top Last modified: April 19 2023