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_baches [2024/12/06 09:31] – [Report] rhainich | en:praktikum:sternspektren_baches [2025/04/02 09:10] (current) – [Reduce the data] rhainich | ||
---|---|---|---|
Line 33: | Line 33: | ||
| | ||
- | | + | |
- | | + | |
- | | + | |
+ | flats/ | ||
ThAr/ | ThAr/ | ||
Star_1/ | Star_1/ | ||
| | ||
- | | + | |
- | | + | |
... | ... | ||
Line 87: | Line 88: | ||
The scripts for the data reduction can be found on the [[en: | The scripts for the data reduction can be found on the [[en: | ||
- | ############################################################################ | + | |
- | | + | <code Python> |
- | | + | ############################################################################ |
+ | #### | ||
+ | ############################################################################ | ||
- | ### | + | ### |
- | | + | # Path to the directories with the images |
- | | + | # |
- | | + | # |
- | | + | path_darks: str = '?' |
- | # Flat darks: | + | # Flat darks: |
- | | + | path_flat_darks: str = '?' |
- | # | + | # |
- | | + | path_flats: str = '?' |
+ | |||
+ | # Darks for wavelength calibration exposures: | ||
+ | path_wavelength_darks: | ||
+ | |||
+ | # | ||
+ | path_wavelength: | ||
+ | |||
+ | # | ||
+ | path_spectra: | ||
- | # Thorium Argon exposures: | + | # Output directory for the reduced flats. The master files will be saved in |
- | path_thorium_argon | + | # |
+ | out_path: str = 'output' | ||
- | # Spectra: | + | ### |
- | path_spectra | + | # Flip images? Possibilities: True and False |
+ | # | ||
+ | flip_images: | ||
- | # Output directory for the reduced flats. The master files will be saved in | + | ### |
- | | + | # Bin the images? Possibilities: |
- | out_path | + | # |
+ | bin_images: bool = False | ||
- | ### | + | # Binning factor |
- | # Flip images? Possibilities: True and False | + | binning_value: bool = 2 |
- | # | + | |
- | | + | |
- | ### | + | ### |
- | # Bin the images? Possibilities: | + | # Trim images to remove non essential parts and thus simplify MIDAS handling |
- | # | + | # |
- | | + | # |
- | + | trim_image: bool = True | |
- | # | + | </ |
- | | + | |
- | + | ||
- | ### | + | |
- | # Trim images to remove non essential parts and thus simplify MIDAS handling | + | |
- | | + | |
- | | + | |
- | | + | |
- | In '' | + | In '' |
If you want to mirror the recordings you have to set '' | If you want to mirror the recordings you have to set '' | ||
Line 186: | Line 193: | ||
The identification of the individual orders, the identification of the emission lines in the ThAr spectrum, and the correlation between the pixel and the wavelength scale is performed by the //MIDAS// script '' | The identification of the individual orders, the identification of the emission lines in the ThAr spectrum, and the correlation between the pixel and the wavelength scale is performed by the //MIDAS// script '' | ||
- | | + | |
The five parameters have the following meaning: | The five parameters have the following meaning: | ||
Line 201: | Line 208: | ||
| | ||
Flat field = master_flat.fit | Flat field = master_flat.fit | ||
- | | + | |
| | ||
Num. of orders | Num. of orders | ||
Line 235: | Line 242: | ||
In this case, the script should be stopped by entering a '' | In this case, the script should be stopped by entering a '' | ||
- | | + | |
A solid method is to gradually reduce the number of orders until the script executed successfully. Afterwards, the flatfield with the identified orders will be displayed in an external window (see below). It should be checked whether the marks of the orders are horizontal and whether they coincide with the actual orders that are visible on the flatfield. The left figure shows a successful test run, whereas the middle figure depicts a failure. The right figure shows a flatfield image taken with the QHY268M, where it can happen that //MIDAS// does not finish drawing all identified orders. From the order numbers, however, it can be assessed if all orders were successfully identified or not. The numbers also depend on whether the images are binned. As we usually use 2x2 binning, the above values should suffice. In case we have used 1x1 binning for the spectra however, you might have to double the second and third value. | A solid method is to gradually reduce the number of orders until the script executed successfully. Afterwards, the flatfield with the identified orders will be displayed in an external window (see below). It should be checked whether the marks of the orders are horizontal and whether they coincide with the actual orders that are visible on the flatfield. The left figure shows a successful test run, whereas the middle figure depicts a failure. The right figure shows a flatfield image taken with the QHY268M, where it can happen that //MIDAS// does not finish drawing all identified orders. From the order numbers, however, it can be assessed if all orders were successfully identified or not. The numbers also depend on whether the images are binned. As we usually use 2x2 binning, the above values should suffice. In case we have used 1x1 binning for the spectra however, you might have to double the second and third value. | ||
Line 513: | Line 520: | ||
| '' | | '' | ||
- | + | <code Python> | |
- | | + | ############################################################################ |
- | | + | #### Configuration: |
- | | + | ############################################################################ |
- | # Name of file with individual orders | + | # Name of file with individual orders |
- | | + | file_with_orders = " |
- | # Name of file with merged spectrum | + | # Name of file with merged spectrum |
- | | + | file_with_merged_spectrum = " |
- | # Name of the object | + | # Name of the object |
- | | + | object_name = "?" |
| | ||
- | ### | + | ### |
- | | + | # |
- | | + | # The specification of the radial velocity is necessary for the |
- | | + | # line identification to work correctly (see below). |
- | | + | radial_velocity = 0. |
- | ### | + | ### |
- | | + | # Line identifications |
- | | + | # |
- | | + | # Ions for which line markers are to be drawn. |
- | | + | # |
- | | + | ions = [] |
- | # Add lines that are not in the default database | + | # Add lines that are not in the default database |
- | | + | # |
- | | + | # |
- | | + | manual_lines = {" |
- | # | + | # |
- | | + | percentage_line_flux_must_be_below_continuum = 3. |
+ | </ | ||
Execute the script with: | Execute the script with: |