ASTR 3520 Aperture Extraction example


    hedit pcyg-dark.fits field=DISPAXIS value=1 add+
    hedit cal3.fits field=DISPAXIS value=1 add+
    noao
    twodspec
    apextract
    apall pcyg-dark.fits output=pcygmdarkap.fits
    apall cal3.fits output=cal3a.fits
    onedspec
    identify cal2.fits coordlist='linelists$henear.dat'
    hedit pcygmdarkap.fits REFSPEC1 "cal3a.fits" add+
    dispcor pcygmdarkap.fits pcygmdarkcalspec.fits
    splot pcygmdarkcalspec.fits

Extracting your Aperture


Selecting your aperture
Selecting your aperture: zoomed in. Make sure you include the whole thing, and fit the background using b. When you are through, press q
The next step is fitting the aperture trace
Look at the residual for that attempt (use j to get residual plots)
As you go to higher orders (using the command :order n where n is an integer), the residual pattern changes
Finally, a residual pattern that appears relatively random - this is your goal
You can tell the fit is fairly good
A 2nd order spline fit is about as good as a 5th order Chebyshev polynomial in this case, but either choice is OK
This shows the fit divided by the linear part of the fit to show you nonlinear components. When you're through press q

Identifying Calibration Lamp Lines


My successful line identification. (compare to the NOAO spectrum corresponding to my fit, the resemblance is excellent)
Don't get discouraged - it took me nearly an hour of dozens of iterations to complete this successfully. You should use the IRAF HeNeAr linelist linelist$henear.dat instead of the SBO line list.
A few tips:
 1. Fit few points at first using m
 2. quickly fit using f and check with q,l in the identified lines.
 3. If the fit doesn't look right, use i to initialize and start over
 4. Use a 2nd-order polynomial, not a spline
 5. ***When comparing to SBO plots, zoom in fairly deep. The SBO plots are scaled very poorly
  If the SBO plots fail for you, try the Kitt Peak spectral atlas
You want your fit to be approximately linear.
Your residuals should look approximately like noise. If you recognize a pattern, you should use a higher order fit. You can delete outliers that will mess up the fit using d

Extracted spectra


Before dispersion correction (dispcor)
After dispersion correction using the correct lamp
Zoomed in on H-alpha

There is still significant instrument response that has to be flat-fielded out. That is currently reserved for another exercise.


ASTR3520 home

Page written by