en:praktikum:sternspektren

This is an old revision of the document!


N1 - Stellar spectra of different spectral types (DADOS)

The aim of this observation is to obtain an overview of different spectral types. Thus, we will give you the coordinates and the apparent magnitude of four stars of different spectral type that are well visible during the night of your observation. Take spectra of these stars in order to classify them by means of the spectral lines and the shape of the continua. From the deviation of the absorption lines in the spectra from their rest wavelength, you can calculate the radial velocity of the star towards or away from us by using the Doppler effect.

Nightly observations at the OST in Golm with the DADOS spectrograph are required. The scientific and technical background for this observation are presented in the seminary talks. A list with objects will be provided by us.

Note: The following exposures are needed for every star:

  • the stellar spectra
  • calibration spectra with a discrete light source
  • calibration spectra with a continuous light source (flatfield)
  • darkframes for the exposures of the stellar spectra and the continuous light source

The calibration exposures are needed to calculate the pixel scale (wavelength calibration) and to remove the instrument signatures and possible artifacts.

The scripts needed for the data reduction can be found on the Laboratory computer in the directory ~/scripts/n1_dados.

The first tasks are to login to the Laboratory Computer and to copy the observational data (FITS files), including darkframes, and the additional calibration exposures from the directory ~/data/<date> to your own directory ~/<semester>/<group>. There are different tools to view the FITS files (two dimensional CCD images or data tables). ds9 is easy to handle and can be started from the terminal via:

 ds9 filename.fit 

Tasks:

  • determine the range of CCD rows that contains the stellar spectrum
  • determine the range of CCD rows that can be used as background. Important: The background region must be outside the spectrum, but still within the used slit of the spectrograph. If the latter cannot be distinguished from the black background, compare with the images of the lamp spectra.

Basic principle

This script finds the maxima of the emission lines in the discrete calibration spectrum, marks them, and identifies their pixel number (i.e. position of the maximum). These numbers are correlated to the wavelengths of those emission lines to have the conversion scale between the pixel and the wavelength.

Parameter

The required script (1_findcaliblines.py) is written in Python. Edit the file using a text editor of your choice (i.e. kate or emacs) and adjust the path to the exposure of the discrete light source (the black lamp that emits the line spectrum) as well as the CCD rows that should be extracted. Two row ranges are requested. One that contains the calibration spectrum and hence should lie within the slit, while the second one is designated for a background region and therefore needs to lie outside the slit:

# name of the file with the wavelength calibration spectrum 
calibFileName   = "calib_wave.FIT"

# region (rows on the image) containing the calibration spectrum
specRegionStart = 495
specRegionEnd   = 600

# background region (rows on the image), which needs to be outside of the slits
bgRegionStart   = 0
bgRegionEnd     = 200

The calibration is designed such that lines of mercury and argon are identified. The strongest lines that can be expected are marked in the following plot.

Emission spectrom of our calibration lamp. The strongest mercury and argon lines are identified.

Execution of the script

Now run the script by executing:

 ./1_findcaliblines.py

Afterwards the following window will be displayed on the screen, showing the mercury and argon emission line spectrum. All lines that were identified by the script are highlighted by a red circle. Now, all lines with known wavelengths need to be marked. For this task, the above example spectrum can be very useful. The script runs through a list of predefined lines. The wavelength of the current line is displayed in the upper part of the window. The line corresponding to this wavelength can now easily marked by clicking into the corresponding red circle with the left mouse button. This circle should now appear blue and the corresponding wavelength is written next to the line peak (see below). If a wavelength is displayed that does not correspond to any of the highlighted lines, this wavelength can be skipped with a right click. At least four lines need to be marked to facilitate a successful wavelength calibration. If all useful lines are marked, this procedure can be completed by pressing the Q key on the keyboard.

Calibration plot without marked lines
Calibration plot with seven marked lines

Error output

Subsequently, the calibration curve will be plotted by the script (see below). If the calibration procedure is successful, the calibration curve will be nearly linear.

Calibration curve for our DADOS spectrograph

By default the following files are then created:

  • calibration_spectrum.dat - containing the correlated pixel to wavelength scale
  • calibration_selection.pdf - a plot showing the selected lines for the wavelength calibration (please add this plot to your report)
  • calibration_fit.pdf - a plot of the wavelength calibration (i.e. calibration_spectrum.dat, please add this plot to your report)

Error handling

Check the plots for possible errors. Especially, if the calibration_fit.pdf does not appear to be linear, edit the script, and run it again. Errors sources could be:

  • wrongly marked lines
  • a non standard wavelength range or another calibration lamp. The wavelengths of additional calibration lines can be identified with the help of the NIST Database. Those wavelength need be added to the variable linelist in the script.

Basic principle

The next step after the determination of the calibration curve is the reduction of the stellar spectrum. First, the darkframe is subtracted from the spectrum, then the spectrum is divided by the flatfield, and, lastly, the wavelength calibration is performed. It also exist the possibility to mark spectral lines in the spectrum.

Parameters

This associated script is named 2_extractspectrum.py. The script has a number of parameters, similar to the previous scripts, along with some additional parameters. The parameter section usually looks similar to this:

 ### science spectrum file ###
 # file with stellar spectrum
 science        =  'star.FIT'
 # directory of the darkframe for the stellar spectrum
 darkframe_dir  =  'darks/??s/'
 # flatfield directory
 flatfield_dir  =  'flats/'
 # directory of the darkframe for the flats
 flatdark_dir   =  'darks/??s/'
 
 
 ### Data that should be extracted  ###
 # region containing the science spectrum
 specRegionStart = 495
 specRegionEnd   = 590
 
 # sky background region (inside the slit)
 bgSkyStart   = 96
 bgSkyEnd     = 104
 
 
 ### Plot range ###
 # set the variables to '?' for an automatic resizing
 lambdamin = '?'
 lambdamax = '?'
 #lambdamin = 3500.
 #lambdamax = 5000.

Comments on these parameters::

  • The variables specRegionStart and specRegionEnd define the range of CCD rows that will be extracted. These rows need to be chosen such that the stellar spectrum is completely covered.
  • The sky background needs to be subtracted. So, as before, a range of rows within the slit but outside the spectrum must be chosen. If possible, the number of rows should be the same for both, i.e. (specRegionStart - specRegionEnd) = (bgSkyStart - bgSkyEnd).
  • The options lambdamin and lambdamax can be used to restrict the plot range. If these variables contain a ? the plot range will be determined automatically.

Additional parameter

Execution of the script

Now run the script:

 ./3_createspectrum.py

The following files are then created:

  • stern_spectrum.dat - with the tabulated spectrum
  • stern_spectrum.pdf - showing the plotted spectrum
  • flatfield.pdf - showing the plotted flatfield (please add this plot to your report)

Identification of spectral lines

Line identifications for known spectral lines can be plotted by means of a file containing these information. An example file (absorption_lines) can be found in the scripts directory. This file contains some but not all important spectral lines that are visible in the variety of stars, which we observe. Therefore, it is required to search for additional spectral lines and the corresponding transitions for example in the NIST Database. A how-to for this can be found here. Moreover, it is recommended to create an individual line-identification file for each of the observed stars.

To identify lines in the stellar spectrum, copy the relevant lines into the separate file. The format of that file should look like (wavelength in Å | identifier):

 3888.052	HI
 3970.075	HI
 4861.38	HI
 6562.88	HI
 5801.33	5811.98	CIV

As can be seen from the last entry, also ions with multiplet transitions can be included. Line identifications that can be not assigned to any spectral line need to be removed from the corresponding file.

The file can then be referenced in the Python script:

 # file containing line identifications
 lineFile = "directory/line_list_for_starname.dat"

Rerun the script to obtain a plot with adjusted line identifications.

Due to the Doppler effect the relative velocity of a star towards or away from us results in a wavelength shift. This shift can be measured with the help of the absorption lines that are found in the spectrum. Please, ask the supervisors to create fits files of you spectra, first. We need to plot the fully calibrated spectrum in MIDAS.

 $inmidas
 crea/graph
 plot stern_spectrum

The following commands can be used to select a certain range in x (xlow < x < xhigh) or y (ylow < y < yhigh) in the plot to zoom in on one spectral line:

 set/gra xa=xlow,xhigh
 set/gra ya=ylow,yhigh

While determining the spectral type you already identified several absorption lines. For those we want to measure the central wavelength. This can be done by fitting the line with a Gaussian function.

 center/gauss gcursor,2 ? absorption

To do the fit of the function click left and right of the absorption line with the left mouse button, to quit press the right mouse button. In the terminal you will find the fit parameters like “CENTER” (central wavelength of the line core) or “FWHM” (Full Width at Half Maximum), which gives you the width of the Gaussian function. Re-do the measurement several times to be sure to set good limits for the Gaussian fit and to get a feeling of the error in the measurement. This should be done for at least five single absorption lines. Do you see a difference in the accuracy of the measurent of the central wavelength of different lines? Discuss the reason in the report. With the help of the Doppler formula you can then calculate the relative velocity of the star from the shift of the central wavelength of the absorption lines in respective to their rest wavelength given in the linelist (absorption_lines).

A usual report is to be handed in. It needs to describe the theoretical basics (spectral types & formation of stellar spectra & Doppler effect), identify distinctive spectral lines for each spectral type, and (shortly) describe and discuss the typical characteristics (i.e. the specific lines per spectral type) of each spectral type. Estimate the spectral type of the stars. Discuss your results and compare them to the known features for a certain spectral type from the literature. Address shortcomings in your results and discuss possible causes. Please include all plots from the data reduction in the appendix of your report.

After identifying the spectral type, the radial velocity of the star towards us should be measured (including an error calculation) and discussed. In the appendix of your report you should include a table with the rest wavelength, the measured wavelength, the wavelength shift and the resulting radial velocity of at least five absorption lines as well as an averaged radial velocity together with an error.

Remark: This web page can be helpful in the process of the identification and the classification of spectra and their characteristics. Here you can also find another spectral atlas, which helps to identify the spectral type. This figure taken from Fundamental Astronomy by Karttunen et al. can also be helpful to classify the spectra.

Overview: Laborytory Courses

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • en/praktikum/sternspektren.1541525702.txt.gz
  • Last modified: 2018/11/06 17:35
  • by schaffenroth