Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| en:praktikum:sternspektren [2021/07/29 19:01] – [Report] dagruner | en:praktikum:sternspektren [2024/12/10 11:00] (current) – rhainich | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== N1 - Stellar spectra of different spectral types (DADOS) ====== | ====== N1 - Stellar spectra of different spectral types (DADOS) ====== | ||
| - | /* | + | <WRAP center round info 60%> |
| - | <WRAP center round alert 60%> | + | These instructions are currently being revised as part of the move to enhanced evaluation software. However, the manual is currently |
| - | This manual is currently | + | |
| </ | </ | ||
| - | */ | ||
| 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. | 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. | ||
| - | */ | ||
| - | |||
| - | |||
| - | /*The aim of this observation is to obtain an overview of different spectral types. Thus, choose at least one star of each spectral type (O, B, A, F, G, K, M, special classes after consultation) that is well visible ($m_\mathrm{V} \le 9\,$mag). Take spectra of these stars in order to classify them by means of the spectral lines and the shape of the continua. To find suitable stars, use pages like [[http:// | ||
| ===== Observation ===== | ===== Observation ===== | ||
| - | 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. | + | Nightly observations at the OST in Golm with the DADOS spectrograph are required. The //DADOS// with a 900 lines/mm grid is currently used in combination with the //QHY 268M//. 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: | **Note**: The following exposures are needed //for every// star: | ||
| - | * the stellar spectra | + | * stellar spectra |
| * calibration spectra with a discrete light source | * calibration spectra with a discrete light source | ||
| * calibration spectra with a continuous light source (flatfield) | * calibration spectra with a continuous light source (flatfield) | ||
| - | * darkframes | + | * darkframes |
| The calibration exposures are needed to calculate the pixel scale (wavelength calibration) and to remove the instrument signatures and possible artifacts. | The calibration exposures are needed to calculate the pixel scale (wavelength calibration) and to remove the instrument signatures and possible artifacts. | ||
| Line 29: | Line 22: | ||
| ===== Data reduction ===== | ===== Data reduction ===== | ||
| - | The scripts needed for the data reduction can be found on the [[en: | + | The scripts needed for the data reduction can be found on the [[en: |
| {{section> | {{section> | ||
| - | ==== Selection and inspection of the data ==== | ||
| - | The first tasks are to login to the [[en: | + | === Preparations === |
| + | |||
| + | The first tasks are to login to the [[en: | ||
| + | |||
| + | === Data reduction === | ||
| + | The **1_masterimages.py** script is available for data reduction. This script combines the individual images into corresponding ' | ||
| + | |||
| + | The following variables need to be set in the script: | ||
| + | <code Python> | ||
| + | ### | ||
| + | # Path to the directories with the images | ||
| + | # | ||
| + | # | ||
| + | path_darks: str = '?' | ||
| + | |||
| + | # Flat darks: | ||
| + | path_flat_darks: | ||
| + | |||
| + | # | ||
| + | path_flats: str = '?' | ||
| + | |||
| + | # Darks for wavelength calibration exposures: | ||
| + | path_wavelength_darks: | ||
| + | |||
| + | # | ||
| + | path_wavelength: | ||
| + | |||
| + | # | ||
| + | path_spectra: | ||
| + | </ | ||
| + | |||
| + | '' | ||
| + | |||
| + | In addition, the variable '' | ||
| + | |||
| + | ==== Selection and inspection of the data ==== | ||
| + | There are several tools for viewing 2D images in FITS format. //ds9// is easy to use and can be started from the terminal: | ||
| - | ds9 filename.fit | + | |
| Tasks: | Tasks: | ||
| - | * determine the range of CCD rows that contains the stellar spectrum | + | * determine the range of camera chip 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. | + | * determine the range of camera chip 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 |
| Line 47: | Line 75: | ||
| === Basic principle === | === Basic principle === | ||
| - | This script | + | The script |
| === Parameter === | === Parameter === | ||
| - | The required | + | The corresponding |
| - | + | ||
| - | # name of the file with the wavelength calibration spectrum | + | <code Python> |
| - | calibFileName | + | # region (rows on the image) containing the calibration spectrum |
| - | | + | specRegionStart = 495 |
| - | # region (rows on the image) containing the calibration spectrum | + | specRegionEnd |
| - | specRegionStart = 495 | + | |
| - | specRegionEnd | + | |
| - | + | ||
| - | # background region (rows on the image), which needs to be outside of the slits | + | |
| - | bgRegionStart | + | |
| - | bgRegionEnd | + | |
| + | # background region (rows on the image), which needs to be outside of the slits | ||
| + | bgRegionStart | ||
| + | bgRegionEnd | ||
| + | </ | ||
| + | |||
| 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. | 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. | ||
| - | [{{ : | + | [{{ : |
| - | /* | + | ++++ Old Hg & Ar calibration |
| - | The five strong lines of mercury in the used wavelength range can be cross-correlated with the pixel positions of these lines. Our ST-8 camera usually covers a wide spectral range such that not only the strong | + | [{{ : |
| - | */ | + | ++++ |
| === Execution of the script === | === Execution of the script === | ||
| Now run the script by executing: | Now run the script by executing: | ||
| - | ./ | + | python 2_findcaliblines.py |
| - | Afterwards | + | After running the script, |
| <WRAP group> | <WRAP group> | ||
| <WRAP half column> | <WRAP half column> | ||
| - | [{{ : | + | [{{ : |
| + | </ | ||
| + | |||
| + | <WRAP half column> | ||
| + | [{{ : | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ++++ Old Hg & Ar calibration | | ||
| + | <WRAP group> | ||
| + | <WRAP half column> | ||
| + | [{{ : | ||
| </ | </ | ||
| Line 87: | Line 125: | ||
| </ | </ | ||
| </ | </ | ||
| + | ++++ | ||
| + | /* | ||
| ++++ Error output | | ++++ Error output | | ||
| Line 99: | Line 139: | ||
| This message can be ignored, since it has no impact on the calibration result. | This message can be ignored, since it has no impact on the calibration result. | ||
| ++++ | ++++ | ||
| + | */ | ||
| Subsequently, | Subsequently, | ||
| - | [{{ : | + | [{{ : |
| + | |||
| + | ++++ Old Hg & Ar calibration | | ||
| + | [{{ : | ||
| + | ++++ | ||
| By default the following files are then created: | By default the following files are then created: | ||
| Line 119: | Line 164: | ||
| === Basic principle === | === Basic principle === | ||
| - | The next step after the determination of the calibration curve is the reduction of the stellar | + | Once the wavelength-pixel mapping has been determined, |
| === Parameters === | === Parameters === | ||
| - | This associated script is named '' | + | This associated script is named '' |
| - | ### science spectrum file ### | + | <code Python> |
| - | | + | # Name of the object |
| - | | + | object_name: |
| - | # directory | + | |
| - | darkframe_dir | + | |
| - | # flatfield directory | + | |
| - | | + | |
| - | # directory of the darkframe for the flats | + | |
| - | | + | |
| - | + | ||
| - | + | ||
| - | ### Data that should be extracted | + | |
| - | # region containing the science spectrum | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | # sky background region (inside the slit) | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | + | ||
| - | ### Plot range ### | + | |
| - | # set the variables to '?' | + | |
| - | | + | |
| - | | + | |
| - | # | + | |
| - | # | + | |
| - | Comments on these parameters:: | + | ### |
| - | * The variables '' | + | # |
| - | * 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) | + | # |
| - | * The options '' | + | # |
| + | spec_region_start: | ||
| + | spec_region_end: | ||
| + | # Sky background region (inside the slit) | ||
| + | background_sky_start: | ||
| + | background_sky_end: | ||
| - | ++++ Additional parameter | + | ### |
| + | # Plot range | ||
| + | # | ||
| + | # Set the variables to '?' | ||
| + | lambda_min: str | float = '?' | ||
| + | lambda_max: str | float = '?' | ||
| + | flux_min: str | float = '?' | ||
| + | flux_max: str | float = '?' | ||
| - | **Reduction method:** | + | ### |
| - | The variable '' | + | # |
| + | # | ||
| + | # | ||
| + | normalize: bool = False | ||
| + | </code> | ||
| - | ### Image reduction mode ### | + | Comments on these parameters:: |
| - | #mode = 'mean' | + | The name of the observed star can be specified in '' |
| - | mode = 'median' | + | |
| - | **Line identifications: | ||
| - | The line identifications can be switched on and off via the variable '' | ||
| - | |||
| - | ### Idents ### | ||
| - | # plot idents yes or no | ||
| - | | ||
| - | # | ||
| - | |||
| - | The file with line identifications, | ||
| - | |||
| - | # file containing line identifications | ||
| - | | ||
| - | # or | ||
| - | | ||
| - | |||
| - | See below for an explanation how to adjust the line identification file for the individual stars. | ||
| - | |||
| - | **File names:** | ||
| - | It also exists the possibility to change the names of the output files as well as to adjust the names of the files from the first step of the data reduction that are now needed as input for the wavelength calibration. | ||
| - | |||
| - | ++++ | ||
| === Execution of the script === | === Execution of the script === | ||
| Now run the script: | Now run the script: | ||
| - | ./ | + | python 3_extractspectrum.py |
| - | The following files are then created: | + | The following files are generated by default: |
| - | + | ||
| - | * 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 === | === Identification of spectral lines === | ||
| - | Line identifications for known spectral lines can be plotted by means of a file containing these information. | + | Line identifications for known spectral lines can be plotted by means of a file containing these information. |
| - | + | ||
| - | 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): | + | |
| - | + | ||
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | 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 | + | |
| - | + | ||
| - | The file can then be referenced in the Python script: | + | |
| - | + | ||
| - | # file containing line identifications | + | |
| - | | + | |
| - | + | ||
| - | Rerun the script to obtain a plot with adjusted line identifications. | + | |
| - | + | ||
| - | /* | + | |
| - | + | ||
| - | ==== Radial velocity determination ==== | + | |
| - | 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. | + | |
| - | | + | |
| - | | + | |
| - | 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: | + | |
| - | | + | |
| - | | + | |
| - | 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. | + | |
| - | | + | |
| - | 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 " | + | |
| - | + | ||
| - | */ | + | |
| - | + | ||
| - | /*Dazu klickt man die beiden Punkte an, an denen der linke und rechte Linienflügel ins Kontinuum | + | |
| - | übergehen. Die Fitparameter wie “CENTER” (Wellenlänge des Linienkerns in Å) oder “FWHM” | + | |
| - | (Full Width at Half Maximum, Halbwertsbreite in Å) werden in der Konsole angezeigt. Beenden | + | |
| - | mit Rechtsklick im Plotfenster.*/ | + | |
| + | The following options must be set in the //Python// script: | ||
| + | |< 100% - >| | ||
| + | ^ Variable ^ Description | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| ===== Report ===== | ===== Report ===== | ||
| - | |||
| - | |||
| A usual report is to be handed in. See a general overview about the required structure and content [[https:// | A usual report is to be handed in. See a general overview about the required structure and content [[https:// | ||
| Line 263: | Line 242: | ||
| The analysis of the spectra contains the estimation of the spectral type for your target stars based on the characteristics that you have described in the theoretical background section. | The analysis of the spectra contains the estimation of the spectral type for your target stars based on the characteristics that you have described in the theoretical background section. | ||
| - | Finally, | + | Finally, |
| - | //**Note:** This {{en: | + | //**Note:** This {{en: |
| - | + | ||
| - | + | ||
| - | **OLD BELOW** | + | |
| - | + | ||
| - | 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 /* ,** including the plot for the spectral resolution and the original images showing the 2d spectra, ** */ in the appendix of your report**. /* For each star, the plot showing the spectra of the individual orders should be also attached to the report. Only the characteristic orders (individual panels from the masterplot) for each star should be included in the main part of the 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 [[http://ned.ipac.caltech.edu/level5/ | + | //**Note:** The plots of each order of the spectra can be large files, often too large for an email attachment. You can upload the report to the [[https://boxup.uni-potsdam.de/index.php/login|University Cloud Service (BoxUP)]] and send us the link or file path to the plots if you have saved them on the lab computer.// |
| - | [[en: | + | [1] [[https:// |
| - | /*A usual report has to be handed in. It needs to describe the theoretical basics (spectral types & formation of stellar spectra), 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. Please include all plots from the data reduction in the appendix of your report. | ||
| - | **Remark:** This [[http:// | + | [[en:praktikum: |
| - | [[en: | ||