ASTR 4880 Computer Lab Session 8

The goals of this session are

  1. Adding header keywords to our stellar spectrum
  2. Calculating the airmass for the stellar observation
  3. Calculating the heliocentric corrections for the stellar observation
  4. Constructing a wavelength calibration for the stellar spectrum

    1. Identifying the lines in the Th-Ar lamp spectrum
    2. Applying the wavelength calibration to the stellar spectrum

Log in to your astro1 account, change to your iraf directory, open an xgterm window, and type cl to start IRAF. Change to the directory where your data from 20091113 are stored. We'll continue working with the same data.

Editing the header of the stellar spectrum

Proceed in the same way as you did for the lamp spectra, but use different keyword and command files. In addition to the data you have already copied, the directory /mnt/vol01/ndm/CCD3/20091113/ now contains files named:

Copy them to your current directory and type page cmds.asth

Unlike the lamp spectra, this stellar one will be archived, and for this reason the full name of the original raw data file is to be included: 200911130017.FIT . Keywords for the star's right ascension and declination and their epoch are provided for. The sidereal time of the observation will be calculated by means of asthedit's built-in function, mst, and the effective airmass of the observation is calculated by means of another built-in function. The effective airmass is a weighted mean over the time of observation; it will differ from, for example, the time at mid-exposure if the exposure is long and the airmass is large, because the airmass is a nonlinear function function of time.

The new keywords file is similar to the one you made for the lamp, but with only one line and with more keywords on that line. Notice that, because the UT of the observation is earlier than 0:00, the observation date is given as 12 November. Because the new keywords file contains additional keywords, we will have to edit the colname parameter for asthedit accordingly. Load the astutil package and type epar asthedit .

PACKAGE = astutil
TASK = asthedit

images = 200911130017.fits Images to be operated upon
commands= cmds.asth File of commands
(table = keywds.tbl) File of values
(colname= fname ut exptime datatype dateobs object ra dec epoch observer) Column names in table
(prompt = asthedit> ) Prompt for STDIN commands
(update = no) Update image header?
(verbose= yes) Verbose output?
(oldstyl= no) Use old style format?
(mode = ql)

Inspect the output for reasonableness. When you are satisfied, type asthedit update+ to enable updating of the image header.

Calculating the heliocentric corrections

Although we often speak of just "the heliocentric correction," in fact there are two corrections, which are calculated by the task rvcorrect. Both carry out a transformation from the moving refence frame of the Earth to the quasi-stationary frame at the center of mass of the solar system. These calculations require the time and date, the latitude and longitude of the observatory, and the right ascension and declination of the star at a specified epoch. For some types of research, these calculations must be highly precise. Procedure
  1. Store the observatory location information. This has to be done only once. This information can be found, for many if not all observatories, in Section J of the Astronomical Almanac. Other methods of storing the data exist, but this is the simplest.
  2. epar observatory

    PACKAGE = noao
    TASK = observatory

    command = set Command (set|list|images)
    obsid = ritter Observatory to set, list, or image default
    images = List of images
    (verbose= yes) Verbose output?

    (observa= obspars) Observatory identification
    (name = Ritter Observatory) Observatory name
    (longitu= 83.61) Observatory longitude (degrees)
    (latitud= 41.65) Observatory latitude (degrees)
    (altitud= 200.) Observatory altitude (meters)
    (timezon= 5.) Observatory time zone
    override= obspars Observatory identification
    (mode = ql)

    In any task requiring observatory information, the parameter value obspars directs IRAF to obtain the parameters from the observatory task.
  3. epar rvcorrect

    PACKAGE = astutil
    TASK = rvcorrect

    (files = ) List of files containing observation data
    (images = 200911130017.fits) List of images containing observation data
    (header = yes) Print header?
    (input = yes) Print input data?
    (imupdat= no) Update image header with corrections?

    (epoch = INDEF) Epoch of observation coordinates (years)
    (observa= obspars) Observatory
    (vsun = 20.) Solar velocity (km/s)
    (ra_vsun= 18.) Right ascension of solar velocity (hours)
    (dec_vsu= 30.) Declination of solar velocity (degrees)
    (epoch_v= 1900.) Epoch of solar coordinates (years)

    (year = ) Year of observation
    (month = ) Month of observation (1-12)
    (day = ) Day of observation
    (ut = ) UT of observation (hours)
    (ra = ) Right ascension of observation (hours)
    (dec = ) Declination of observation (degrees)
    (vobs = 0.) Observed radial velocity
    (hjd = ) Helocentric Julian Day (output)
    (vhelio = ) Helocentric radial velocity (km/s) (output)
    (vlsr = ) Local standard or rest radial velocity (km/s) (output)
    (mode = ql)

    This task permits data entry through a text file (first parameter), through an image header (second parameter, the method demonstrated here), through the third set of task parameters, or by keyboard input (if files = stdin). The solar motion is used to calculate the object's velocity relative to the local standard of rest, if a velocity relative to the Earth is given. In this class, we will not use this feature.

    The image name in the second line should be the most recently processed version of the star image.

    The verbose output specified in the given parameters will result in all the input information being printed. The output will include the value of the VHELIO and HJD keywords. With imupdat = yes these keywords will be added to the image header. When comfortable with the results, type: rvcorrect imupdat+

Wavelength calibration (1) Th-Ar line identifications

In the night of data we are processing, the stellar observation, number 17, is flanked by Th-Ar spectra, image numbers 16 and 18. In a previous session, you should already have subtracted the median bias from all three images. Now, extract the Th-Ar images with apsum as you did the stellar image, with the flat as a reference and no interactive options set.

PACKAGE = echelle
TASK = apsum

input = 16b.fits List of input images
(output = 16bx.fits) List of output spectra
(apertur= ) Apertures
(format = echelle) Extracted spectra format
(referen= flatredb) List of aperture reference images
(profile= ) List of aperture profile images

(interac= no) Run task interactively?
(find = no) Find apertures?
(recente= no) Recenter apertures?
(resize = no) Resize apertures?
(edit = no) Edit apertures?
(trace = no) Trace apertures?
(fittrac= no) Fit the traced points interactively?
(extract= yes) Extract apertures?
(extras = no) Extract sky, sigma, etc.?
(review = yes) Review extractions?

(line = INDEF) Dispersion line
(nsum = 10) Number of dispersion lines to sum or median

(backgro= fit) Background to subtract (none|average|fit)
(weights= variance) Extraction weights (none|variance)
(pfit = fit1d) Profile fitting type (fit1d|fit2d)
(clean = yes) Detect and replace bad pixels?
(skybox = 1) Box car smoothing length for sky
(saturat= INDEF) Saturation level
(readnoi= 8) Read out noise sigma (photons)
(gain = 6) Photon gain (photons/data number)
(lsigma = 4.) Lower rejection threshold
(usigma = 4.) Upper rejection threshold
(nsubaps= 1) Number of subapertures per aperture
(mode = ql)

Your extracted spectrum should include 4 summed apertures. Printed copies of similar spectra with selected lines identified will be provided, or a larger spectral atlas of the Th-Ar lamp can be found here (PDF, 605 KB). In that atlas, our apertures correspond to apertures 1 - 4. Use the given line identifications as a guide in what follows.

In the echelle package: epar ecidentify

PACKAGE = echelle
TASK = ecidentify

images = 16bx.fits Images containing features to be identified
(databas= database) Database in which to record feature data
(coordli= linelists$thar.dat) User coordinate list
(units = ) Coordinate units
(match = 1.) Coordinate list matching limit in user units
(maxfeat= 100) Maximum number of features for automatic identification
(zwidth = 10.) Zoom graph width in user units
(ftype = emission) Feature type
(fwidth = 7.) Feature width in pixels
(cradius= 8.) Centering radius in pixels
(thresho= 10.) Feature threshold for centering
(minsep = 2.) Minimum pixel separation
(functio= chebyshev) Coordinate function
(xorder = 4) Order of coordinate function along dispersion
(yorder = 2) Order of coordinate function across dispersion
(niterat= 0) Rejection iterations
(lowreje= 3.) Lower rejection sigma
(highrej= 3.) Upper rejection sigma
(autowri= no) Automatically write to database?
(graphic= stdgraph) Graphics output device
(cursor = ) Graphics cursor input
(mode = ql)

This task uses the interactive curve fitting package to fit a polynomial - here, a cubic - to the feature wavelength as a function of feature positions in pixels. Simultaneously, it also fits a polynomial of lower order - here, linear - to the feature wavelength as a function of order number. The fit is two-dimensional. The true order number of each aperture is determined in the course of the fitting and is given in the final output to the database as an offset, or difference between the aperture number and the order number. In our case, the offset comes out to be 32. For example, Hα, in our aperture 2, lies in order 34 of the échelle.

Choose an identified line, zoom in on it with the w menu, and type m to mark the feature. A prompt will appear in the yellow bar at the bottom of the graphics window, at which you should type the wavelength given in the printout. Do the same for the remaining features, and then move on to the next aperture with k (j takes you to the previous aperture and o to an aperture number of your choice).

When you have marked all the lines and checked for any typographical or other errors, type f to enter the curve fitting package. If you have any gross outliers, check for obvious errors and fix them as needed. Your final rms for the fit should be in the neighborhood of 0.02 Å. When satisfied, type q and agree to write the results to the database.

Your database directory will now contain a text file whose names starts with 'ec' and that contains a feature list and the result of the polynomial fitting.

Wavelength calibration (2) Dispersion correction of the stellar spectrum

To be continued ...

Return to ASTR 4880 home page

Latest update (by NDM): 11/22/09 22:03