en:praktikum:photometrie_python

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:photometrie_python [2025/02/13 07:20] – [Defining some variables] rhainichen:praktikum:photometrie_python [2025/04/01 11:16] (current) – [Defining some variables] rhainich
Line 165: Line 165:
        
    #   Images    #   Images
-   V_path = 'output/combined_trimmed_filter_V.fit' +   V_path = 'output/combined_filter_V.fit' 
-   B_path = 'output/combined_trimmed_filter_B.fit'+   B_path = 'output/combined_filter_B.fit'
  
 Note: The variable names given here and in the following are only examples and can be replaced by any other name.   Note: The variable names given here and in the following are only examples and can be replaced by any other name.  
  
-Note: If the images are not in a subdirectory of the current directory, the path can also refer to the next higher level by means of ''../''.+Note: If the images are not in a subdirectory of the current directory, the path can also refer to the next higher level by using ''../''.
  
 ==== Reading in the images ==== ==== Reading in the images ====
Line 392: Line 392:
 One way to check the validity of the calibration stars is to display them on a starmap (similar to what the ''main_extract'' above does automatically). But now we want to display the downloaded star positions as well as the stars that were actually used for the calibration later on. For this purpose the OST library offers a suitable function (''starmap'') which can create such plots. This function can be loaded via  One way to check the validity of the calibration stars is to display them on a starmap (similar to what the ''main_extract'' above does automatically). But now we want to display the downloaded star positions as well as the stars that were actually used for the calibration later on. For this purpose the OST library offers a suitable function (''starmap'') which can create such plots. This function can be loaded via 
  
-   from ost_photometry.analyze.plot import starmap+   from ost_photometry.analyze.plots import starmap
  
 Since this function expects as input an astropy table, with the data to be plotted, we must first create it before we can plot the starmap. The position of the calibration stars are not yet available in pixel coordinates, because we got this information from the Simbad or Vizier database. Therefore, we need to generate these. At this point it is convenient that we have previously created a ''SkyCoord'' object for these stars. Using ''.to_pixel()'' and specifying the WCS of the image, we can easily generate pixel coordinates: Since this function expects as input an astropy table, with the data to be plotted, we must first create it before we can plot the starmap. The position of the calibration stars are not yet available in pixel coordinates, because we got this information from the Simbad or Vizier database. Therefore, we need to generate these. At this point it is convenient that we have previously created a ''SkyCoord'' object for these stars. Using ''.to_pixel()'' and specifying the WCS of the image, we can easily generate pixel coordinates:
Line 440: Line 440:
 Then the actual image can be loaded: Then the actual image can be loaded:
  
-   plt.imshow(image, origin='lower')+   plt.imshow(V_image, origin='lower')
  
 ''image'' is the actual image data and ''origin=lower'' makes sure that the overplotting of the pixel coordinates works. Afterwards the symbols which mark the star position can be plotted: ''image'' is the actual image data and ''origin=lower'' makes sure that the overplotting of the pixel coordinates works. Afterwards the symbols which mark the star position can be plotted:
  • en/praktikum/photometrie_python.1739431244.txt.gz
  • Last modified: 2025/02/13 07:20
  • by rhainich