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_PATH must include ABSCAL/idl_code/wfc3, where ABSCAL is 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.pro

  • Other WFC3 Scripts Used None

  • Common Code Used absdate.pro

  • Input Files None [1]

  • Output Files dirtemp.log. Canonically renamed to dirirstare.log or dirirscan.log as 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.pro

  • Other 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.pro

  • Common Code Used cross_correlate.pro, mode.pro, psclose.pro, pset.pro, ws.pro

  • Input Files* dirirstare.log or dirirscan.log as appropriate [1]

  • Output Files spec dir 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.pro

  • Other WFC3 Scripts Used wlimaz.pro

  • Common Code Used integral.pro, linecen.pro, null_plot.pro, pbox.pro, snomod.pro, tin.pro, ws.pro

  • Input 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.pro

  • Other WFC3 Scripts Used None

  • Common Code Used ws.pro

  • Input 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”

Bohlin, R. C., Deustua, S. E., MacKenty, J. 2014, WFC3 ISR 2014-15 “Enabling Observations of Bright Stars with WFC3 IR Grisms”

Bohlin, R. C., Deustua, S. E., Pirzkal, N. 2015, WFC3 ISR 2015-10 “IR Grism Wavelength Solutions using the Zero Order Image as the Reference Point”

Reference Files

Below are Ralph Bohlin’s master tables:

Notes