Flux Calibration (Step=10)¶
Relevant code¶
XDpiped.csh mag2mass.py FluxCalibXD.py
Relevant options¶
1extras: yes/no (no) [extract full-slit spectrum and in steps along the slit?]
What it does¶
In this step, each order is multiplied by a blackbody spectrum of appropriate temperature, scaled to the K-band flux of the standard star (if known).
XDGNIRS looks for a file called INTERMEDIATE/std_star.txt containing
the standard star’s spectral type and IR magnitudes. The temperature
corresponding to the spectral type of the standard star is then looked up in
the starstemp.txt file supplied with the code. If std_star.txt does not
exist, SIMBAD is queried for this information. Alternatively, the user can
create the file following the example of the file created for NGC 3031 (the
fact that the star has the same magnitude in all bands is a historical artifact
from an old method of doing the flux calibration; only the K band magnitude
needs to be correct):
k K 8.083 9701
h H 8.083 9701
j J 8.083 9701
j J 8.083 9701
i J 8.083 9701
i J 8.083 9701
Each order is then multiplied by a blackbody function of the temperature
specified in the std_star.txt file. If the K band magnitude of the
standard star is known, the blackbody function for extension 1/order 3
is scaled to that value (converted to F\(_{\lambda}\)), providing
a rough absolute flux calibration. If not, only relative flux
calibration is performed. This is noted in the PRODUCTS/XDGNIRS_Log.txt
file and the flux units are written into the headers, so it’s possible
to tell what was done. If extras=yes, step 4 is carried out for the
full-slit and step-by-step extractions – see Extracting the Spectra (Step=7) – as well
as the “standard” aperture extraction.
What to look for¶
Not a lot; these simple mathematical operations should go smoothly enough.
Things to most likely go wrong¶
Sometimes, if the code is interrupted at the wrong time (or for
other reasons we don’t understand), INTERMEDIATE/std_star.txt can exist
but does not contain the right (or any) information. If the code crashes at
or after step 10, try deleting that file and rerunning from step 10. The
mag2mass.py lookup code is much more robust than it used to be, but
problems with the SIMBAD query results (or the interpretation of it) can
occasionally also cause the code to crash at this stage.