Analyzing Slit Spectra with Visual Spec David Barnaby 26 June 06 In Spring 2006, I taught Observational Astronomy, a course designed for physics majors in their junior or senior year. By the time I get them, they have studied the characteristics of stars, including stellar classification. My job is to teach them a little about various aspects of observing, including telescope controls, image reduction, electronic detectors, and spectral analysis. This year I was fortunate that our department head purchased an SBIG CCD camera and matching spectrometer. Thus, I assigned a lab where the students took spectra of stars, and then derived the stars blackbody temperatures and identified the elemental species producing absorption lines. In this way, they could see first hand the complexity in collecting and reducing spectra, and verify what they had already learned about the similarity of HR diagrams to color-magnitude diagrams. Because they had spectral images, I had to come up with some software for analyzing spectra, including extraction, calibration, measurement, and Plank-curve fitting. I hit upon Visual Spec, also known as VSpec. This product is free for download from the internet and runs on PCs. It was developed in France but has a version translated to English. Even so, French words pop up from time to time, especially in the dialog boxes. There is not a help file, but VSpec comes bundled with a good manual, which is about 150 pages in length and in PDF. I showed the cover of this manual in my talk. I then ran VSpec. Its GUI is somewhat HOU like, and so the students navigated it fairly quickly. The first step is to open an image containing a spectra. At this point, VSpec looks rather like an image processing package ... but don't be fooled, since it is NOT! You should have already reduced the image using an image processor. About the only image processing thing you can do inside VSpec is to change the stretch (i.e., the gain and offset) to bring out detail you want to see. VSpec assumes that the slit of your spectrogram is parallel to the columns, so if does not appear that way, use an image processing package to rotate the image appropriately before opening the image with VSpec. Using either the Spectrometry menu or the icon button, turn on the bounding box. By default, this box is the length of the image and 20 pixels tall. Slide the box down to where you want to collect a spectral profile. At this point, you can select the profile to be saved as an intensity profile for a science object, or as a reference profile, presumably for spectral calibration. Hitting either of those buttons produces a spectral profile, which is created by binning all 20 rows along any column, so producing a profile with relatively high signal-to-noise ratio. If you save your work now, you normally save as a VSpec spc file. You can save up to 4 spectral profiles in an spc file. You can also export a profile as an Excel worksheet. If you later open an spc file with a text editor, you'll see it simply consists of up to 4 ASCII tables, which you can easily read. At some point, you need to spectrally calibrate. I showed a profile taken of the light-polluted sky over Bowling Green, KY. This has lines of mercury, sodium, and oxygen, among others. The fastest calibration is a 2 point, in which two lines are selected and identified with wavelengths (in Angstroms). I demonstrated this. However, if one can identify more than two lines, VSpec permits you to create spectral calibrations with 2nd-, 3rd-, or 4th- order polynomials. You can save the dispersion law and you can save the spectral line table from these fits. After this, raw spectra that you open will have this spectral calibration applied. I showed one such calibrated spectral profile for Regulus, a B7V star. Being close to an A0, it beautifully shows the Balmer series, and these hydrogen lines are about the only obvious lines. I showed that under Tools is the Elements table, an exhaustive table of the rest frame wavelengths of elemental and ionic species, and that you can sort this by element and wavelength. Finally, I demonstrated fitting a Plank-curve to the spectra. First, you have to remove the spectral response of your instrument. Under Photometry/Flux Conversion is a table naming about 15 stars with carefully calibrated spectra. Choose one close to your star in spectral and luminosity class. Out comes the spectral response curve for that star. I had my students divide their spectra by the instrumental response curve using the Photometry/Flux Calibrate tool. The result looked messy, but contained a very nice Plank tail to a black-body curve. Then, the students made their best least-squares fit (by eye) using the Photometry/Plank tool. This just overlays a Plank curve of unity amplitude, but the amplitude can then be adjusted with the up-down arrows on the right-hand side of the graph. The students had to adjust both black-body temperature and amplitude to make the best fit possible to the Plank tail. Most got something around 12,000K, which is not so far from the accepted value. I could have had them subtract their best Plank curve from the normalized stellar spectra, but I ran out of time. There are many other other features in VSpec, including continuum fitting, heliocentric removal, and spectral line fitting tools, but I have not explored these yet. VSpec is free, and you can find it at http://www.astrosurf.com/vdesnoux/. Bon apetit!