Spectroscopy

 

Part II – Generating a profile using Visual Spec

 

Updated 2017 January 14

 

Contents

 

Spectroscopy, Part I – Using the SSON Transmission Grating Spectrograph

 

Spectroscopy, Part III – Analysing spectra using Visual Spec

 

Spectroscopy, Part IV - Resources

 

Spectroscopy, Part V – The Miles catalogue of spectra

 

Introduction

 

Visual Spec software can be downloaded from http://www.astrosurf.com/vdesnoux/  This website also provides access to tutorials on all aspects of using Visual Spec. A User Manual is available via the ‘?’ on the Menu tool bar.

 

For the purposes of this exercise we will be concentrating on the Balmer series of lines due to hydrogen listed in Table 1. You may of course choose your own file names but do;

- choose ones which easily relate to the operation you have just carried out

- remember to save the various formats in case you have to redo part of the exercise

 

Balmer Hydrogen line

Wavelength (Angstroms)

Alpha

6563

Beta

4861

Gamma

4340

Delta

4102

Table 1. Hydrogen lines

 

The objectives of this tutorial are to demonstrate;

- setting user preferences

- opening an image

- generating an intensity profile (binning)

- calibration

- correcting for camera response

- flattening profile

- measuring Signal to Noise Ratio (SNR)

- stacking profiles to improve SNR

- formatting the profile

 

Once you are familiar with the process the summary table at the end of this tutorial may suffice.

 

Setting user Preferences

 

These are accessed from the Menu tool bar via Options/Preferences, Figure 1. Note that new folders cannot be created here – that must be done using, for example, Windows Explorer. I selected ‘SSON images’ as my Working Directory by double clicking on it in the Preference window, set Image to fits and Profil(e) to spc and saved these in the usual manner by clicking on OK.

 

 

Figure 1. Preferences

 

Opening an image

 

Vspec buttons 1

Figure 2. Vspec buttons

 

The buttons for this section are shown in Figure 2. Vspec works with calibrated spectra (application of dark frames and flat fields – not to be confused with spectral calibration) so that process must therefore be done using other software. SSON provides calibrated images so this is not necessary. Images are opened using File/Open or the icon in the Image toolbar immediately below. For this tutorial I used image 1_330900 of Theta Aur (available here) obtained on 2014 November 5, Figure 3. As you can see the image is not quite horizontal so needs to be adjusted using the Image Rotation tool. The intensity of any part of the spectrum can be determined by moving the cursor along the image and noting the reading in the I box in the Menu tool bar. In this case the maximum intensity was just under 33000. Somewhere between half and two thirds maximum is satisfactory. If necessary the high and low image thresholds can be adjusted to better display the spectrum. Visual Spec requires the blue end of the spectrum to be to the left of the image and red to the right – if necessary use the Mirror image button to reverse the image.

 

Figure 3. Image of the spectrum of Theta Aur

 

Generating an intensity profile (binning)

 

There are probably several spectra in the image so it is necessary to select the correct one. The correct spectral image is selected using the Display reference binning zone binning button and dragging the box from the top of the image to position it over the spectral image. Adjust the height of the box by dragging the top line to the required position, Figure 4.

 

Figure 4. Spectral image delineated by the box

 

To obtain the spectral profile click on the Object binning button. The resulting profile is shown in Figure 5 - the Y axis has been expanded to better display the profile. To do this note the high and low intensity levels, click on the Scale Y button, Figure 6, enter the values in the Hi and Lo threshold boxes, click on Apply, and then OK Save the profile as 1_330900.spc .

 

Figure 5. Intensity profile

 

Vspec buttons 2

Figure 6. VSpec Scale Y button

 

Calibration

 

Because the spectrum was obtained using a transmission grating spectrometer the dispersion is non-linear, Figure 7, and therefore multiline calibration must be used for greatest accuracy. The lines listed in table 1 plus the zero order will be used. The Balmer Hydrogen lines can be identified in Figure 5 and in the SSON example, Figure 8.

 

Curved focal plane

Figure 7. Curved focal plane. Credit David Boyd.

 

 

 

Figure 8. Spectrum of That Aur indicating the Hydrogen lines

 

- select Spectrometry/Calibration multiple lines on the Menu tool bar

- select the first line (zero order) by dragging the vertical line across it with the left mouse button depressed

- enter 0 is in the text field to the right of the selected line and press return

- repeat for the other lines

- in the Non linear calibration window select Degre 2 and then Calcul

- the dispersion is shown together with the equation and deviation (d_lambda) – Figure 9

- save the profile as 1_330900.calibrated_multiline.spc

 

Figure 9. Spectrum calibration

 

As the cursor is moved across the profile both the pixel coordinate and wavelength are displayed in the x;l box on the Menu tool bar.

 

Theta Aur is a double star of spectral types, A0pSi and F2-5V. For the purposes of this exercise I selected (Tools/Library) the nearest type, a0i, from the library and dragged the file onto the spectrum. Figure 11 shows the reference library spectrum overlaying that for Theta Aur. The various hydrogen lines can be seen to match.

 

 Figure 11. Library spectrum overlaying that for Theta Aur

 

Correcting for camera response

 

In Figure 11 it can be seen that the shape of the observed spectrum does not match that of the reference star. This is due to the varying response of the camera over the range of wavelengths. To correct for the camera response first select a range of wavelengths from around 3000 to 10000 Angstroms;

- position the cursor between the zero image and the rising response curve

- click the left mouse button and a vertical dotted line will appear

- hold the left mouse button down and drag the cursor to the right of the response curve

- select Edit/Crop. The result is shown in Figure 12

 

Figure 12. Cropped response curve overlaid with library spectrum

 

The next step is to divide the observed profile by the reference profile;

- select ‘Intensity’ as the active profile in the box at top left of the screen

- select Operations/Divide profile by a profile

- select a0i from the Selection window, Figure 13

- click on OK and a corrected profile will be overlaid, Figure 14

 

Figure 13. Selection window

 

Figure 14. Profile corrected for camera response (plus calibrated and a0i profile from library)

 

The corrected profile show ‘emission’ lines where the original showed hydrogen absorption lines. To tidy up the plot select this profile;

- click on the Erase graphic icon

- select Division as the active profile from the list in the box at top left of the screen

 

Vspec only works with Intensity profiles so the Division profile needs to be converted to that format.

- select Edit/Replace

- in the drop down box select Intensitie

- click on OK

 

Vspec buttons 3

Figure 15. Buttons for next section

 

Now we need to convert this profile to a smooth useable camera response curve and remove the ‘emission’ lines;

- Select Radiometry/Compute continuum

- click on the Point/Zone icon

- move the cursor along the profile selecting points but missing the lines, Figure 16

- select Execute and a Continuum window will appear, Figure 17

 

Figure 16. Selecting the continuum

 

Figure 17. Continuum window

 

Varying the value in the box below the slider and the position of the slider should vary the smoothness of the curve.

- click on OK in the Continuum window

- delete contents of display window and bring up just the Fit.intensity profile

- convert Fit.Intensity profile to an Intensity profile by selecting Edit/Replace, Figure 18

- save as 1_330900_response_multiline.spc

- close the response profile (if you leave it open Vspec does not appear to work correctly)

 

Figure 18. Replace window

 

- open the calibrated and camera response profiles, Figure 19

 

Figure 19.Original and continuum profiles

 

- copy the response profile and paste it on to the calibrated profile, Figure 20

- crop from approx 3000 to 10000 Angstroms

 

Figure 20. Continuum pasted onto original profile

 

- select intensity as the active profile

- select Operations/Divide profile by a profile

- select 1_330900_response.spc  (the response profile appears in the window), Figure 21 and then OK

 

Figure 21, Division Selection window

 

The spectrum corrected for camera response is displayed (together with the original and camera response profiles, Figure 22. Note that the Y axis values may need changing to display the corrected spectrum.

 

Figure 22. Original, camera response and corrected profiles.

 

- delete contents of display window and bring up just the Division profile

- convert the Division profile to an Intensity profile by selecting Edit/Replace, Figure 18

- save profile as 1_330900_corrected.spc

 

Flattening the profile

 

The profile can be flattened by removing the continuum.

- open corrected profile

- select Radiometry/Continuum division

- click on the Point/zone icon

- move the cursor along the profile selecting points but missing the lines

- execute

- smooth curve

- adjust the Y axis to a Hi threshold of 1.05 and a Lo threshold of 0.85

- save profile, Figure 23, as 1_330900_final.spc

 

Figure 23. Final profile

 

Figure 24. Theta Aur profile with Hydrogen lines indicated

 

In Figure 24 the Balmer Hydrogen lines are labelled and their measured wavelengths compared with the actual wavelengths in Table 2. Considering that the dispersion is of the order of 9Angstroms/Pixel this is a very good agreement.

 

Balmer Hydrogen line

Actual Wavelength (Angstroms)

Measured Wavelength (Angstroms)

Alpha

6563

6564

Beta

4861

4854

Gamma

4340

4339

Delta

4102

4106

Table 2. Actual and computed wavelength comparison.

 

Figure 24 can be compared with Figure 25 taken from the SSON TGS User’s Guide . The original image was taken using the same exposure time, four seconds, and offset, 500.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 25. Example profile from SSON TGS User’s Guide

 

Measuring Signal to Noise Ratio (SNR)

 

In his book ‘Astronomical Spectroscopy for Amateurs’ Ken M. Harrison states that a Signal to Noise Ratio (SNR) of 50 is good but for Pro-Am collaboration >100 would be acceptable. SNR can be measured using Visual Spec;

- open a profile corrected for camera response

- hold down the left mouse button and drag the mouse to select a small section of the profile devoid of lines, Figure 26

 

Figure 26. Profile selection for SNR determination

 

- select Spectrometry/Computational preferences, then SNR and OK

 

The SNR value is displayed and the process can be repeated a number of times to obtain an average value, Figure 27.

 

Figure 27. SNR values using profile corrected for camera response

 

Stacking profiles to improve SNR

 

To improve the SNR several intensity profiles can be stacked;

- open the profiles, calibrated and corrected for camera response, to be stacked

- select Operations/Compose

- the other open profiles are added to the active profile

- save this profile under a new name

 

For the purposes of this exercise the profile was saved under four new names, 1_330900_corrected_a, b,c and d. These were opened and summed, d being the active profile.

 

The stacked profile, overlaid with one of the camera response corrected profiles is shown in Figure 28. The SNRs for a single profile are >50 but those for the stacked profile are little changed on average. 

 

Figure 28. SNR values using profile corrected for camera response

 

SNR was also measured using profiles corrected for camera response and flattened to remove the continuum, Figure 29. The first three values are for a single image and the second three for a stacked image. The second set, on average, are much higher than the first.

 

Figure 29. SNR values using profile with continuum removed.

 

Formatting the profile

 

The profile can be formatted in various ways. As previously demonstrated both the X and Y axis can be varied using the threshold and crop features. You can also;

- add axis labels

- add a title

- change the font

- change the background colour

 

Remember to save the final result as a bmp file, Figure 30, or all your efforts will be lost on closing the spc file. All the features mentioned here, and others, are explained in detail in the Visual Spec tutorial at http://www.astrosurf.com/vdesnoux/tutorial4.html

 

1_330900_final

Figure30. Formatted profile

 

Summary table

 

Generating a profile using Visual Spec

 

 

 

 

Mandatory

Image = image name

Optional

Profile = profile name

 

 

File

Action

 

 

Generate profile

imageID.fts

Open

 

Rotate to horizontal

 

Zero image to left

 

Adjust thresholds

 

Position Binning Zone

 

Object Binning

 

Adjust Y axis

ImageID.spc

Save

 

 

Calibrate profile

 

Calibrate (multiple lines)

 

- select 1st line, Enter

 

- select 2nd line, Enter

 

- select additional lines

imageID_calibrated.spc

Save

 

 

Correct for camera response

- generate Response profile

 

Drag library profile onto calibrated profile

 

Crop, 3k to 10k Å approx

 

Select Intensity as active profile

 

Divide calibrated profile by library profile

 

Erase plots

 

Select Division as active profile

 

Edit/Replace as intensity profile

 

 

- smooth Respone profile

 

Select Radiometry/Compute continuum

 

Click on Point/Zone icon

 

Select points on profile (missing lines)

 

Select Execute

 

Smooth curve

 

Erase plots

 

Select Fit.Intensity profile

 

Edit/Replace as intensity profile

imageID_response.spc

Save

 

Close Response profile

 

 

- correct profile for camera response

ImageID_response.spc

Open

imageID_calibrated.spc

Open

 

Copy response profile on to calibrated profile

 

Crop

 

Select Intensity as the active profile

 

Select Operations/Divide profle by a profile

 

Select response intensity profile as divisor, OK

 

Adjust Y axis

 

Erase profiles

 

Select Division profile

 

Edit/Replace as Intensity profile

imageID_corrected.spc

Save

 

 

Flatten profile

 

- generate continuum profile

imageID_corrected.spc

Open

 

Select Radiometry/Continuum division

 

Click on Point/Zone icon

 

Select points on profile (missing lines)

 

Select Execute

 

Smooth curve

 

Adjust Y axis

imageID_final.spc

Save

 

 

Contents