ABSCAL WFC3 IDL Code¶
This section describes running the IDL WFC3 flux calibration code.
Setup Requirements¶
In order to run the IDL code, the following setup steps must be taken:
Environment Variables¶
IDL_PATH In addition to the common directories,
IDL_PATHmust includeABSCAL/idl_code/wfc3, whereABSCALis the location of the ABSCAL repository.WFC3_REF This should point to
ABSCAL/idl_code/data/wfc3/ref
Directories¶
Create a directory containing the WFC3 FITS files that you want to extract and calibrate. Inside this directory, create a directory where the extracted spectra will be placed. The default name for this directory is “spec”.
Run Steps¶
Create Initial Data File (wfcdir)¶
Main Script
wfcdir.proOther WFC3 Scripts Used None
Common Code Used
absdate.proInput Files None [1]
Output Files
dirtemp.log. Canonically renamed todirirstare.logordirirscan.logas appropriate
The wfcdir.pro script is run as follows:
wfcdir,'data_path','output_file_name'
where data_path is the path to the directory containing the FITS files to be used
(defaults to the current directory), and output_file_name is the name of the
exposure table to be created (default dirtemp.log).
After running the script, open dirtemp.log and, for every grism exposure, keep at
most one single filter exposure from the same visit and with the same POSTARG
value. Later steps will use the filter exposure to estimate the location of the
zeroth-order grism image, so the corresponding filter image should be from the same visit,
and with nointervening move commands. Standard practice is to then re-name the file to
some name that starts with “dir” and has the extension “.log”, but that no longer contains
“temp”. The canonical name is dirirstare.log for non-scanned exposures, and
dirirscan.log for scan-mode exposures. If you already have a file created as the
output of wfcdir.pro, append the lines that you’re keeping to the existing file.
Extract and Co-add Spectra (prewfc)¶
Main Script
prewfc.proOther WFC3 Scripts Used
calwfc_imagepos.pro,calwfc_spec.pro,wfc_coadd.pro,wfc_flatscal.pro,wfc_process.pro,wfc_wavecal.pro,wfcobs.pro,wfcread.pro,wfcwlfix.proCommon Code Used
cross_correlate.pro,mode.pro,psclose.pro,pset.pro,ws.proInput Files*
dirirstare.logordirirscan.logas appropriate [1]Output Files
specdir containing 1d extracted spectra and co-added spectra.
The prewfc.pro script is run as follows:
prewfc,'data_path','data_file','spectra_subpath',/display,/trace
where data_path is the path to the directory containing the FITS files to be used
and the log file to be read (defaults to current directory), data_file is the log
file name (defaults to dirirstare.log), spectra_subpath is the name of the
subdirectory where the 1d- and co-added spectra will be written (defaults to
spec), display is a flag to display intermediate plots showing the
zeroth-order finding process, and trace is a flag to display plots of the
extraction trace (and extracted spectra).
After the program has been run, one spectrum will be created in the spectra sub-directory
for each input file (named spec_ipppssoot.fits for standard data files, and
spec_ipppssootpn.fits for planetary nebula wavelength calibration files, where in
both cases ipppssoot is the root name of the input data file), one spectrum table
will be created for each co-added spectrum (where each visit is co-added into a single
spectrum), named target.grism-ipppss (or targetpn.grism-ipppss) where
target is the canonical target name, grism the grism used for the observation, and ipppss
is the portion of the rootname that specifies instrument (i), program (ppp), and visit
(ss). Finally, postscript plots are created for each order of each of the co-added
spectra, named target-ipppss_coaddngrism.ps (or
targetpn-ipppss_coaddngrism.ps), with the n after “coadd” being the grism
order, and the remaining name aspects as above.
Fit Planetary Nebula Emission Lines (wlmeas)¶
Main Script
wlmeas.proOther WFC3 Scripts Used
wlimaz.proCommon Code Used
integral.pro,linecen.pro,null_plot.pro,pbox.pro,snomod.pro,tin.pro,ws.proInput Files*
dirirstare.log[2]Output Files
wlmeas.tmp
wlmeas.pro requires a separate data set of planetary nebula observations that have
been prepared by wfcdir.pro and prewfc.pro. Once those observations are
ready, the wlmeas.pro script is run as follows:
wlmeas,'data_path',specdir='spectra_subpath',/display
where data_path is the path to the directory containing the WFC3 data (defaults to
current directory), spectra_subpath is the subdirectory of data_path that
contains the extracted spectra (default spec), and display is a flag to
display plots of the lines being found/fit.
After the program has been run, the wlmeas.tmp file will contain the measured
X positions of the planetary nebula emission lines for all of the input files. After
checking the file for any potential issues, it should be renamed to (or its data should be
added to) a file named wlmeas.output
Create 2D detector Wavelength Map (wlmake)¶
Main Script
wlmake.proOther WFC3 Scripts Used None
Common Code Used
ws.proInput Files
wlmeas.output[2]Output Files None [3]
The wlmake.pro script is rn as follows:
wlmake,'data_path',specfile='data_file'
where data_path is the path to the directory containing the WFC3 planetary nebula
data (defaults to current directory), and specfile is the output file from the
wlmeas.pro script (defaults to wlmeas.output). The script solves for a
2D wavelength solution over the full detector, and prints out fit and fit error
information to standard output. It produces no output files.
References¶
Bohlin, R. C.; Deustua, S. E. 2019, AJ, 157, 229. “CALSPEC: WFC3 IR GRISM SPECTROSCOPY”
Reference Files¶
Below are Ralph Bohlin’s master tables: