4 - Affichage et manipulation des spectres traités avec SpecUtils

4.1 - Visualisation du Spectre 2D

À partir des éléments utilisés précédemment, il est possible donc possible d'afficher le spectre brut acquis et de vérifier qu'il n'est pas saturé

In [5]:
#open image and show file info
spec2D_path = 'dataset/Navi_Light_007.fits'
hdu_list_spec2D = fits.open(spec2D_path)
hdu_list_spec2D.info()

spec2D_data = hdu_list_spec2D[0].data
spec2D_header = hdu_list_spec2D[0].header

print(f'Image Data Type : {type(spec2D_data)} - Shape : {spec2D_data.shape}')
print('------------------------------ Header ------------------------------')
print(repr(spec2D_header))
print('---------------------------- End Header ----------------------------')

fig9 = plt.figure()
plt.imshow(spec2D_data, cmap='gray',norm=LogNorm(), vmin=1800,vmax = 4500)
plt.grid(False)

print('Statistics values')
print('Min:', np.min(spec2D_data))
print('Max:', np.max(spec2D_data))
print('Mean:', np.mean(spec2D_data))
print('Stdev:', np.std(spec2D_data))
Filename: dataset/Navi_Light_007.fits
No.    Name      Ver    Type      Cards   Dimensions   Format
  0  PRIMARY       1 PrimaryHDU      37   (2749, 2199)   int16 (rescales to uint16)   
Image Data Type : <class 'numpy.ndarray'> - Shape : (2199, 2749)
------------------------------ Header ------------------------------
SIMPLE  =                    T / conforms to FITS standard                      
BITPIX  =                   16 / array data type                                
NAXIS   =                    2 / number of array dimensions                     
NAXIS1  =                 2749                                                  
NAXIS2  =                 2199                                                  
COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H 
ROWORDER= 'TOP-DOWN'           / Row Order                                      
INSTRUME= 'Atik 460ex'         / CCD Name                                       
TELESCOP= 'Celestron'          / Telescope name                                 
OBSERVER= 'Unknown '           / Observer name                                  
OBJECT  = 'Navi    '           / Object name                                    
EXPTIME =         2.000000E+01 / Total Exposure Time (s)                        
CCD-TEMP=            -1.50E+01 / CCD Temperature (Celsius)                      
PIXSIZE1=         4.540000E+00 / Pixel Size 1 (microns)                         
PIXSIZE2=         4.540000E+00 / Pixel Size 2 (microns)                         
XBINNING=                    1 / Binning factor in width                        
YBINNING=                    1 / Binning factor in height                       
XPIXSZ  =         4.540000E+00 / X binned pixel size in microns                 
YPIXSZ  =         4.540000E+00 / Y binned pixel size in microns                 
FRAME   = 'Light   '           / Frame Type                                     
IMAGETYP= 'Light Frame'        / Frame Type                                     
FOCALLEN=             2.00E+03 / Focal Length (mm)                              
APTDIA  =             2.03E+02 / Telescope diameter (mm)                        
SCALE   =         4.683010E-01 / arcsecs per pixel                              
SITELAT =                    0 / Latitude of the imaging site in degrees        
SITELONG=                    0 / Longitude of the imaging site in degrees       
AIRMASS =         1.071507E+00 / Airmass                                        
OBJCTRA = ' 0 56 45.30'        / Object J2000 RA in Hours                       
OBJCTDEC= '60 43 08.16'        / Object J2000 DEC in Degrees                    
RA      =         1.418874E+01 / Object J2000 RA in Degrees                     
DEC     =         6.071893E+01 / Object J2000 DEC in Degrees                    
EQUINOX =                 2000 / Equinox                                        
DATE-OBS= '2020-11-04T20:15:54.145' / UTC start date of observation             
BSCALE  =                    1                                                  
BZERO   =                32768                                                  
COMMENT Generated by INDI                                                       
---------------------------- End Header ----------------------------
Statistics values
Min: 194
Max: 39690
Mean: 320.39243242116567
Stdev: 118.05915598444801