flux_calibration¶
The flux_calibration utility flux calibrates a scientific spectrum by applying the response function computed by the response_function utility.
Fig. 69 The algorithm used flux to calibrate a scientific spectrum by applying a response function.¶
In detail, the airmass at the time of observation is computed as an average between its values at the beginning and end of the observation, using the FITS header of the extracted 1D scientific spectrum. Then, the utility loads the extinction curve (a table with wavelength and extinction coefficient \(mag_{airmass}\)) and rescales it to the airmass calculated before. The extinction curve is then interpolated on a finer grid, which is suitable for application to the extracted scientific spectrum using a nearest neighbour interpolation schema.
The extracted scientific spectrum is then corrected for airmass for each wavelength as follows:
Then, the value (in counts) for each wavelength is divided by the dispersion of the spectrograph and by the exposure time reported in the EXPTIME keyword. At this stage, the 1D spectrum of the scientific object has units of \(ADU\) \(s^{-1}\) \(A^{-1}\). To finalize the flux calibration, the utility loads the FITS table that contains the fit parameters for the response function given in input to compute the flux calibrated spectrum for each wavelength, applying the formula
where \(F(\lambda)\) is the desired 1D scientific spectrum flux calibrated in \(erg\) \(cm^{-2}\) \(s^{-1}\) \({A^{-1}}\), \(C(\lambda)\) is the scientific spectrum in counts and \(S(\lambda)\) is the response function.