Preparation

Create a directory where the output should go. Inside that directory, make a directory called Raw, place a nights worth of data in that directory.

Beyond this, everything should be handled by the routines.

Running this all at once

hamspec_pipeline will run the entire set of steps listed below.
  1. If the code has been run before, but you want to run with changes, there is a /clobber option.
  2. If the setup has been made and you want to use it, but want to rerun everything else, use the /usesetup flag. This flag will still skip the setup process even with the /clobber flag.
  3. The stretch=value keyword can be used to recompute the arc solution but with a stretch. To determine the stretch, you will need to compare the one-dimensional arc spectrum made from the arc frames with the archival spectrum. The instructions are in the discussion of how to fix an order

Steps

Each of the steps below is listed in the file hamspec_pipeline.pro. In principle, that code should produce the final output. However, there are places where our automation could fail.

  1. hamspec_strct,strct Create data structures, for book keeping, makes additional directories.
  2. hamspec_setup Continues data frame classification - summary of output in ASCII files. One of the key outputs is a grouping of files into setups. Frames with similar deckers, echelle tilts, and cross-disperser tilts. This can be changed by exiting the ASCII files and rerunning hamspec_setup, the file will be read instead of generating new values.
  3. hamspec_wrstrct Write structure to disk
  4. hamspec_mkmflat Makes a pixel flat, see for details, this can be skipped if you use the archived flat we have made.
  5. hamspec_mkflats,strct,setup#,'TFLT' This makes a trace flat. This is needed to trace out the order locations and decide what is going to be extracted. The strct is the output of hamspec_strct. The setup# is a integer for each observational setup.
  6. hamspec_edgeflat Finds the slit edges in the trace flat
  7. hamspec_normflat Normalizes the trace flat
  8. hamspec_mkarc Makes the final arc image. This intelligently combines frames taken with different filters.
  9. hamspec_fitarc This does an initial fitting of the arc frame, order by order. For some orders, there are no good lines, and these are skipped. This uses a reference arc taken at a specific set of tilts, and cross-correlates that reference with the data. The resulting fits are used to identify more lines.
  10. hamspec_fit2darc Uses previous line identifications, but not the resulting fits, to construct a two-dimensional model of wavelength as a function of pixel position and order number. Currently, this code does not always produce good results, we have a method for fixing bad orders.
  11. hamspec_tracearc Traces out arc across the dispersion direction. This is to map out pixels in an order at a constant wavelength.
  12. hamspec_fittrcarc
  13. hamspec_mkaimg
  14. hamspec_slitflat Apply above results to flat.
  15. hamspec_loopobjs Loops through each object exposure, processes the frame, finds the object and does the extraction.

Co-adding observations

If you observe the same object multiple times, an additional step must be run.

hamspec_combspec which requires the structure, the setup#, the object id, and optional integer list of images (0,1,2, etc.).

Go to the Start
Last modified: Mon Jun 10 13:26:09 PDT 2013