XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


omgrismplot (omgrismplot-1.8.6) [xmmsas_20230412_1735-21.0.0]


Algorithm

   Subroutine omgrismplot

     Recover parameters (File names, Device type, Binning factor, Ouput file)
        
     Read FITS file : 
        Get dataset and table.
        Check important keyword consistency.
        Call a warning or error if necessary.

     Recover all spectra  included in table :

        Net spectra rates and errors & background rates and errors are recorded in arrays
        of dimension Nspectra * Nbins.

     Open plot : create view surface in specified device format (check its validity).

     For each spectrum :

        Delete gaps in data (when the IEEE NaN constant is found).

        Increase binsize if necessary to limit the number of points to 500.

        Rebin rate and error columns by binsize

        Create a labelled plot page separated into two panels in which 
        wavelengths are graduated
        on X-axis (see Comments), and count rates (or fluxes) on Y-axis 
        
        Draw net spectrum and background counts on different panels.

     End for
               
     Release memory.

     Close plot.

   End subroutine  omgrismplot



XMM-Newton SOC -- 2023-04-16