IRAF EXERCISE VII – Spectroscopic Reductions in IRAF

advertisement
Name _____________________________________________________ Date ________________
IRAF Exercise VII – Spectroscopic Reductions in IRAF
(a brief introduction)
[Adapted from a lab by Andrew Walker and Dr. S.L.H. Yang, University of Victoria]
The data reduction and subsequent anaysis of spectra require several initial steps:
 Pre-processing (already done for this exercise)
 Converting 2-D spectrum to 1-D (already done for this exercise)
 Continuum fitting (you will do)
 Wavelength Calibration (you will do)
Images needed
/astro/classes/Astro_480/exercises/exercise7/spectra_reduction.tar.gz (plus: irafdmp5698.pdf and
thar_lines.dat)
There are more images than required for this exercise in the tarball. You will need only 1 beta Cephei
spectrum and 1 Th-Ar arc wavelength calibration spectrum.
Getting familiar with the spectra and observations
Here is a handy little Linux command that lets you pull out specific information from the image
headers (commanded within IRAF):
ecl> imhead betcep* lo+ | grep ‘EXPTIME’
01. <1 pt> What was the range of exposure times for these spectra? _______ to _______ seconds.
02. <1 pt> If these spectra are all of the same star, taken on the same night with the same instrument
set up, why would the exposure times have such a large range?
03. <2 pts> Get a list of the hour angles HA for the observations. You will see that they range from
approximately -02:29 to +07:56. The second hour angle implies that the star was ~30 degrees
below the horizon. How could it possibly be observed?
04. <2 pts> The observations were made on the 1.2-meter telescope at the Dominion Astrophysical
Observatory (DAO) located north of Victoria, BC. The 32121H grating and SITe-4 chip were
used. Find the following information:
a. Grating order: _____ zeroth _____ 1st _____ 2nd _____3rd
b. Projected slit width in microns: ________
c. Pixel size in microns: ________
d. Central wavelength in Ångstroms: ___________
2/15/16
106741939
1
05. <2 pts> Before undertaking any subsequent IRAF tasks, we need first to find out what processes
have already been completed. How would you go about finding this information? What has
already been done?
The next steps
Taking a look at the spectra using SPLOT
Display some of the stellar spectra using the task SPLOT. Experiment with this task to get a feel for
what it does. The letter commands are different from those used in IMEXAMINE. You can expand a
region of a spectrum by typing a and then a again (you will be prompted). See what b, c, d, e, and g
do. Type q to quit.
Choose one of the beta Cephei (betCep) spectra to work with. Some of the betCep spectra have
maximum counts of approximately 1.5E5, while others have maximum counts of approximately
1.75E5. If one has a choice, it is best to choose one with high counts.
Spectrum chosen: __________________________________________
Choose a corresponding Th-Ar arc spectrum. The listing of arc spectra contain all of the arcs for all of
the stars observed during that night, and you need to choose one to go with the star’s spectrum you just
chose. Normally, one would choose the calibrating arc that was taken either just before or just after the
corresponding object spectrum. In this case, however, we do not have copies of the log book and the
image headers for the arcs do not enlighten us as to which arc we should use (observation time for all
of them is exactly the same). Judicious use of imhead and grep will avoid your having to look at
every single image header to find the right one. [HINT: Take a look at the file numbers for both the
stellar and arc images.]
Arc spectrum chosen: ______________________________________
Examine the arc using SPLOT.
Continuum fitting (your job)
Having a pre-proccessed, 1-D spectrum we are ready to fit the continuum. The task
NOAO.ONEDSPEC.CONTINUUM has many parameters, but nearly all of them can be left unchanged.
Other than the input and output image names, you will probably want to alter only function and
order, parameters which determine the function used to fit the continuum. The best function and
order to use will depend on the shape of the continuum, and are best determined by trial and error. Be
sure to UNLEARN tasks and check all parameters for appropriate settings.
2
Figure 1: Suggested starting
parameter values for task
continuum.
The continuum task offers many options to choose from in order to obtain a well fitted continuum (one
that will be “flattened” when the spectrum is divided by the fit). Some of the more useful ones are:
?
f
s
t
z
q
- gives help
- fits the continuum with the currently set function type and order
- sets sample range
- resets sample range to full spectrum
- deletes sample region nearest cursor
- leaves the continuum task and creates the output file
:function - sets the function type, one of {legendre, spline3, spline1, chebyshev}; you should try
different functions interactively to get the best fit.
:order
- sets the fitting function order, where order is a number; change the order interactively
to get the best fit.
Try different functions and orders within
those functions to see how they “work.”
Can you replicate the spectrum seen in
Figure 2?
Figure 2
3
Wavelength calibration (your next job)
This step is done with your chosen ThAr arc spectrum. Before your stellar spectrum can be used, you
need to calibrate the pixel number with the wavelength it represents. This is done using arc spectra and
the noao.onedspec.identify task. This is one of those complex tasks with many hidden
parameters. See Fig. 3 for suggestions on what values to set.
Figure 3. The
parameter values
shown here are
examples. You must
read through the help
page on this task and
set appropriate values
for the job you need to
do. Our line list is in
the file: thar_lines.dat
If referencing a
coordinate list doesn’t
work, then use the
image with the ThAr
lines identified and
enter the values by
hand using file:
irafdmp5698.pdf
As with the task continuum, there are numberous options inside the identify task, the possibly
more useful being:
?
f
m
d
z
r
q
- help!
- fits the dispersion relation
- enter wavelength for feature nearest cursor
- delete feature nearest cursor
- zoom feature near cursor (may not work?)
- redraws graph
- leaves the identify task and saves the fitted dispersion relation
Confusion will undoubtedly arise as you first work through this. Zoom in on an emission line to find
its width in pixels. Try different values for the parameters. Read PHELP IDENTIFY. After you have
marked (m) at least 4 – 5 lines clear across the arc spectrum, then type f to fit a dispersion relation to
it. Another graph pops up showing the residuals of the fit. Evaluate the fit based upon the range in
values for the residuals. The best method for redoing what seems to be a bad fit (maybe a higher order
4
fit or a different function?) is to quit (q) and NOT save the feature data to the database (found in
directory database, file idfilename. Then, tweek some parameter values and re-identify.
Now that you have determined the dispersion relation for the arc spectrum, you have to apply it to the
stellar spectrum. First, you will need to run REFSPEC to inform IRAF that the stellar spectrum is to
have the same dispersion relation as the arc. Change the parameters with epar in the following way
(Fig. 4):
Figure 4.
Suggested
parameter values
for task
refspec.
Verbose should
be changed to
“yes.”
IRAF needs to be told to convert the flux in the spectrum as a function of pixel number to a flux versus
wavelength. This is done using dispcor with the parameters set as shown in Fig. 5:
Figure 5.
Suggested
parameter values
for task dispcor.
Conserve flux
value should be
‘no’ and ignore
apertures value,
‘yes.’
The result should
5
be a wavelength calibrated spectrum of the star beta Cephei. For multiple spectra (say, all the rest of
the ones in this directory), you would need to follow this procedure for each of the spectra. There are
several ways within IRAF to perform the same task on several images at once in order to achieve this
more efficiently. You have been introduced to some of them in this course.
06. <2 pts> Give one way that IRAF can be told to process a whole list of images.
07. <10 pts> Attach your continuum-normalised, dispersion-corrected plot to these exercise sheets,
or email the plot to your TA. It may take an image-capture to do so.
[NOTE: IRAF can convert a plot to an ascii file with columns of x and y values. We will have to find
that task!]
6
Download