Finding the bad orders.

If, after running hamspec_fit2darc, the resulting RMS is large, say, greater than 0.5, the problem could be that certain orders have bad line identifications. The code produces a postscript file that shows the details for each order, including a plot of the solution and some numbers detailing the scatter around the fit.

By examining the postscript, orders with large scatters can be found, and those can be tweaked. Also, orders where a large number of lines are rejected should be examined, rejected points are in red.

Running hamspec_tweakarc

The syntax is
hamspec_tweakarc, 'Arcs/Fits/Arc_01_fit.idl', [72], 'hamspec_dewar4_thar4.idl', $ linlist = getenv('XIDL_DIR')+'/Spec/Arcs/Lists/ham_dewar4_thar.lst'

  1. The string 'Arcs/Fits/Arc_01_fit.idl' is the file containing the arc solution for setup number 1, so other setups will have different values (02, 03, etc.)
  2. The list [72] contains the orders to be tweaked.
  3. 'hamspec_dewar4_thar4.idl' is the archived solution. The one above is for post March 2013.
  4. 'linelist = ....' is an archived list of lines tailored for this lamp and dewar.

The code will bring up a window displaying the one-dimensional arc spectrum for the combined data for this observation (in black) and an overlay of the archived solution in green. This is actually a three step process, and below each step is discussed in detail.

  1. First, match the data and the archived arc using the shift and stretch parameters. The shift will move the positions, in pixels, of the archived data. The stretch will, of course, expand or contract the archived spectrum. This number is also in pixels, and works such that a positve stretch maps the archival spectrum and stretches to 4096 + the stretch value back into the observed arc.
  2. Once the green spectrum and the black spectrum line up, click the apply button. This is a small checkbox at the top. The green spectrum will now dissappear and the x-axis will change from pixels to Angstroms. Then hit the L key. This will find emission lines and match them up with those in the linelist, using the archived mapping between pixel and wavelength, after adjusting that mapping by the stretch and the shift. Delete lines that are assigned to insignificant features or saturated ones.
  3. After selecting a list of lines, there is now the option to fit a model, using the F key. This will bring up a new window on top of the existing window. The resulting root-mean square deviation should be small, less than 0.01 Angstroms. The R key will show the residuals. The D key will delete lines, while the u and d keys will change the order of the fit. In general, a third order is sufficient. When the fit is finished, quit using the Done button on the top of the window, or type the q key.
  4. Step two can be repeated after performing the fit, in an attempt to find more lines using the updated solution. Otherwise, when sastified the final list of lines, quit using the q key or the Done button on the top of the window.
Note - if the stretch is larger than a couple of pixels, hamspec_fitarc should be rerun. That code does not solve for the stretch currently. Simply rerun hamspec_fitarc with the keyword stretch=value.
Go to the Start
Last modified: Mon Jun 10 13:17:36 PDT 2013