en:praktikum:sternspektren_baches

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:praktikum:sternspektren_baches [2024/12/10 11:07] rhainichen:praktikum:sternspektren_baches [2025/04/02 09:10] (current) – [Reduce the data] rhainich
Line 33: Line 33:
  
    Star_1/    Star_1/
-      Darks+      darks
-      Flatdarks+      flat_darks
-      Flats/+      ThAr_darks/ 
 +      flats/
       ThAr/       ThAr/
       Star_1/       Star_1/
    Star_2/    Star_2/
-      Darks+      darks
-      Flatdarks/+      flat_darks/
       ...       ...
  
Line 86: Line 87:
  
 The scripts for the data reduction can be found on the [[en:praktikum: zugang| lab course computer]] in the folder ''~/scripts/n1_baches''. Copy the script ''1_masterimages.py'' into the local directory where you want to analyze the star (e.g. ''Star_1''). This script will create among other files the masterdark and the masterflat needed in the following processing steps. Furthermore, this script stacks all star images, if more than one was taken during the observations. It also offers the possibility to bin the observed images, if this was not done during the observation. It also cuts not needed parts of the captured images. This simplifies the further analysis steps. Last but not least, you should specify in this script if the exposures have to be mirrored (see previous step), so that this can be corrected as well. The configuration area of the script looks like this: The scripts for the data reduction can be found on the [[en:praktikum: zugang| lab course computer]] in the folder ''~/scripts/n1_baches''. Copy the script ''1_masterimages.py'' into the local directory where you want to analyze the star (e.g. ''Star_1''). This script will create among other files the masterdark and the masterflat needed in the following processing steps. Furthermore, this script stacks all star images, if more than one was taken during the observations. It also offers the possibility to bin the observed images, if this was not done during the observation. It also cuts not needed parts of the captured images. This simplifies the further analysis steps. Last but not least, you should specify in this script if the exposures have to be mirrored (see previous step), so that this can be corrected as well. The configuration area of the script looks like this:
 +
  
 <code Python> <code Python>
Line 96: Line 98:
 # #
 #   Darks: #   Darks:
-path_darks = '?'+path_darks: str = '?'
        
 #   Flat darks: #   Flat darks:
-path_flat_darks = '?'+path_flat_darks: str = '?'
        
 #   Flats: #   Flats:
-path_flats = '?' +path_flats: str = '?' 
-    + 
-#   Thorium Argon exposures: +#   Darks for wavelength calibration exposures: 
-path_thorium_argon = '?' +path_wavelength_darks: str = '?' 
-   + 
 +  Wavelength calibration exposures: 
 +path_wavelength: str = '?' 
 #   Spectra: #   Spectra:
-path_spectra = '?'+path_spectra: str = '?'
        
 #   Output directory for the reduced flats. The master files will be saved in #   Output directory for the reduced flats. The master files will be saved in
 #   the current directory. #   the current directory.
-out_path = 'output'+out_path: str = 'output'
        
 ### ###
 #   Flip images? Possibilities: True and False #   Flip images? Possibilities: True and False
 # #
-flip_images = False+flip_images: bool = False
        
 ### ###
 #   Bin the images? Possibilities: True and False #   Bin the images? Possibilities: True and False
 # #
-bin_images = False+bin_images: bool = False
        
 #   Binning factor #   Binning factor
-binning_value = 2+binning_value: bool = 2
        
 ### ###
Line 131: Line 136:
 #   Possibilities: True and False; Default: True #   Possibilities: True and False; Default: True
 # #
-trim_image = True+trim_image: bool = True
 </code> </code>
  
-In ''path_darks'', ''path_flat_darks'', ''path_flats'', ''path_thorium_argon'' and ''path_spectra'' the corresponding subfolders are to be entered, which were created in section //Preparations//. ''out_path'' is the directory where the script places intermediate results. The reduced files (**master_dark.fit**, **master_flat.fit**, **master_thar.fit**, **master_spectrum.fit**) are stored in the local directory so that they are more easily available for the following analysis steps. +In ''path_darks'', ''path_flat_darks'', ''path_flats'', ''path_wavelength_darks'', ''path_wavelength'', and ''path_spectra'' the corresponding subfolders are to be entered, which were created in section //Preparations//. The variable ''path_wavelength_darks'' can be set to **'?'** if no darks were taken for the ThAr exposures. ''out_path'' is the directory where the script places intermediate results. The reduced files (**master_dark.fit**, **master_flat.fit**, **master_wave.fit**, **master_spectrum.fit**) are stored in the local directory so that they are more easily available for the following analysis steps. 
  
 If you want to mirror the recordings you have to set ''flip_images'' to ''True''. If the images should also be binned, set ''bin_images'' to ''True''. The binning factor can be determined via the variable ''binning_value''. If you want to mirror the recordings you have to set ''flip_images'' to ''True''. If the images should also be binned, set ''bin_images'' to ''True''. The binning factor can be determined via the variable ''binning_value''.
Line 188: 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 ''calibrate/baches''. The call could look like: 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 ''calibrate/baches''. The call could look like:
  
-   calibrate/baches master_flat.fit master_thar.fit 26 26 24+   calibrate/baches master_flat.fit master_wave.fit 26 26 24
  
 The five parameters have the following meaning: The five parameters have the following meaning:
Line 203: Line 208:
    ===============================    ===============================
    Flat field  = master_flat.fit    Flat field  = master_flat.fit
-   Calibration lamp = master_thar.fit+   Calibration lamp = master_wave.fit
    Calibration table = thar.fit    Calibration table = thar.fit
    Num. of orders  = 0026    Num. of orders  = 0026
Line 237: Line 242:
 In this case, the script should be stopped by entering a ''2''. Afterwards the script can be restarted with a reduced number of orders, e.g.: In this case, the script should be stopped by entering a ''2''. Afterwards the script can be restarted with a reduced number of orders, e.g.:
  
-   calibrate/baches master_flat.fit master_thar.fit 23 20 20+   calibrate/baches master_flat.fit master_wave.fit 23 20 20
  
 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.
  • en/praktikum/sternspektren_baches.1733828856.txt.gz
  • Last modified: 2024/12/10 11:07
  • by rhainich