9.5 Specific Tools for the Analysis of WFC3

This section describes existing tools and packages that can be used for the analysis of WFC3 data. Some of these tools are distributed as STScI affiliated packages, while others have been developed by STScI scientists for their own scientific projects, but have also been made available to the community. The latter type of software is not directly supported by the WFC3 team; thus users are directed to the software developers for assistance.

9.5.1 wfc3tools

wfc3tools is a python package containing several WFC3-specific tools. Online documentation for wfc3tools can be found on read the docs at:

The package is available on github and is also distributed on the STScI-maintained AstroConda channel. wfc3tools contains the python wrapper modules that call the calwf3 pipeline executables (whose source code is written in C), as well as other auxiliary functions. The pipeline modules (calwf3, wf3cte, wf3ccd, wf32d, wf3rej, wf3ir) are described in detail in Section 3.4 of this book, along with an example of calwf3 manual reprocessing in Section 3.5.2. Here we briefly describe the other tools. The boldface paragraph titles correspond to the module name and link to the read-the-docs resources which contain a more detailed documentation.

New tools for WFC3 analysis will be stored in the new WFC3 Library GitHub repository. The goal of the new repository is to update the ingestion and maintenance framework by providing internal team reviews on documentation and testing. This repository, aimed at the user community, will provide maintenance and additional support for any future changes in the software environment.

Given an image specified by the user which contains a subarray readout, return a full-frame image with the subarray implanted at the appropriate location.

Plot statistics for a specified image section up the ramp of an IR MultiAccum image. Sections from any of the SCI, ERR, DQ, image extensions can be plotted. A choice of mean, median, mode, standard deviation, minimum and maximum statistics is available.

Plot the stack of MultiAccum sample values for a specified pixel in an IR multiaccum image. Pixels from any of the SCI, ERR, DQ, or TIME image extensions can be plotted.

Prints information about a WFC3/IR MultiAccum image, including exposure time information for the individual samples (readouts). The global information listed (and the names of the header keywords from which it is retrieved) includes:

  • the total number of image extensions in the file (NEXTEND)
  • the name of the MultiAccum exposure sample sequence (SAMP_SEQ)
  • the total number of samples, including the “zeroth” read (NSAMP)
  • the total exposure time of the observation (EXPTIME).

Given an image specified by the user which contains a subarray readout, return the location of the corner of the subarray in a full frame reference image (including the full physical extent of the chip), in 1-indexed pixels. If the user supplies an X and Y coordinate, then the translated location of that point will be returned.

9.5.2 WFC3 Photometry Tools

WFC3 zeropoints          

A new WFC3 notebook shows how to use stsynphot to compute photometric keywords values such as the inverse sensitivity (PHOTFLAM), pivot wavelength (PHOTPLAM) and filter bandwidth (PHOTBW) for any WFC3 'obsmode', which is a combination of 'instrument, detector, filter, date, and aperture'. The tool also computes zeropoint values (STMAG, ABMAG, VEGAMAG) and is especially useful for Vegamag zeropoints which require an input spectrum. The notebook may also be used for determining time-dependent WFC3/UVIS zeropoints for any observation date, as the values given in WFC3 ISR 2021-04 are defined for the June 2009 reference epoch. (As of mid-2021, the WFC3/IR zeropoints are not time-dependent). The python code works for both the UVIS and IR detectors, has the capability to loop over multiple filters, and optionally creates and plots the 'total system throughput' tables for each obsmode.

UVIS time-dependent photometry           

A new WFC3 notebook shows how to work the new time-dependent UVIS calibration for observations of which span a range of dates and therefore have different photometric keyword values populated in the image headers. The notebook uses sample images of the standard star GD153 acquired at three epochs and shows how to compute aperture photometry, apply the new time-dependent PHOTFLAM keywords, and plot the corresponding countrates and magnitudes.

The unique zeropoint values must be accounted for prior to combining UVIS observations over multiple epochs with AstroDrizzle, and the notebook shows how to equalize the countrate values in the science array of each input FLC image prior to drizzling.

WFC3 synthetic photometry examples    

A new WFC3 notebook replaces pysynphot examples from the 2018 version of the Data Handbook and demonstrates how to use stsynphot for several use cases:

  • Compute the inverse sensitivity, zeropoint, and encircled energy correction for any WFC3 'obsmode'
  • Renormalize a spectrum to 1 count/sec in a given bandpass and output the predicted magnitude or flux for a different bandpass
  • Determine the color transformation between two bandpasses for a given spectrum
  • Compute color terms for UV filters for a blue versus a red standard star observed on UVIS2.

WFC3 photometric conversion tool      

A new WFC3 notebook demonstrates how to calculate photometric transformation coefficients between WFC3/UVIS wide-band filters and any other non-HST filter system for a given object spectrum. The new tool uses the latest WFC3 synthetic throughput tables and replaces functionality provided in the WFC3 Photometric Conversion Tool: https://colortool.stsci.edu/uvis-filter-transformations, which is no longer supported. For more detail on photometric transformations to other systems, see WFC3 ISR 2014-16.

Flux converter tool

A new WFC3 notebook provides a framework for users to convert between multiple magnitude and flux unit systems based on a user-defined input spectrum. This tool is based on the NICMOS unit conversion form and replaces the HST Unit conversion tool: https://colortool.stsci.edu/unit-conversion, which is no longer supported. The notebook incorporates the latest WFC3/UVIS (WFC3 ISR 2021-04) and WFC3/IR (WFC3 ISR 2020-10) photometric calibration as well as recent changes in the Vega spectrum of up to ~1.5% (Bohlin et al. 2020).

9.5.3 Code for mitigation of variable IR background

Strategies for reprocessing images with variable background are described in WFC3 ISR 2016-16.  Examples include 1.) correcting for Helium I atmospheric emission at 1.083 microns and 2.) excising reads impacted by scattered light from the bright Earth limb. The ISR provides a full description of the methods a link to the python softwareAdditional examples are provided in the Appendix of ISR 2021-01, which describes the reprocessing of archival observations impacted by variable background in order to compute sky flats. For more details, see Section 7.10.

A notebook tutorial in Section 3.5.2 demonstrates how to diagnose calibrated WFC3/IR images with poor quality ramp fitting due to time-variable background during the exposure. Images are reprocessed using the 'Last-minus-first' technique described in WFC3 ISR 2016-16. This turns off calwf3's ramp fitting step (CRCORR) and treats the IR detector like a CCD that accumulates charge and is read out only at the end of the exposure. 

While time-variable background also impacts the IR grisms, the methods used for imaging data should not be used to correct G102 and G141 observations, which are affected by a combination of Helium I, Zodiacal background, and "Scatter" Earth light, each of which varies spatially across the detector. More detail on correcting grism data is provided in WFC3 ISR 2017-05 and WFC3 ISR 2020-04.

9.5.4 DASH (Drift-And-SHift) Reduction

New software is available to aid users in properly reducing IR DASH observations. While there are portions of the pipeline that will need to be specialized depending on the specific observation strategy, the general outline of steps should be useful to all users in their reduction. WFC3 ISR 2021-02 walks users through this package and provides an accompanying Jupyter notebook which provides a helpful interpretation of the best practices as described in Momcheva et. al (2017).

9.5.5 Grism Reduction Tools

HSTaXe grism reduction

HSTaXe is a complete Python implementation of the Spectral Extraction and Visualization Software (aXe) and can be used for the extraction, calibration, visualization and simulation of spectra from HST slitless spectroscopic observations. HSTaXe has the same functionalities as aXe but does not require IRAF/PyRAF (no longer supported by STScI). A cookbook style HSTaXe workflow through of a full WFC3 dataset can be found in this WFC3 cookbook

pyLINEAR: Python tools for grism spectroscopy

pyLINEAR is not official WFC3 software, but was developed by WFC3 scientists. pyLINEAR is a Python implementation of the LINEAR algorithm for extracting and simulating WFC3/IR slitless spectroscopy (Ryan et al. 2018). The LINEAR software was originally developed in IDL and C but had several limitations which were remedied in the Python version. pyLINEAR along with its documentation can be found on github.

Grizli: Grism redshift & line analysis software for space-based slitless spectroscopy

Grizli is not official WFC3 software, but was developed by WFC3 scientists. It is intended to offer general techniques for manipulating HST slitless spectroscopic observations. Grizli provides software kernels for the end-to-end processing, quantitative and comprehensive modeling and fitting of WFC3/IR grism data. Grizli, with examples and documentation can be found on github.

9.5.6 PandExo: A community tool for transiting exoplanet science with JWST & HST

PandExo is not official WFC3 software, but WFC3 scientists have contributed significantly to its development. Similar to an exposure time calculator (ETC), PandExo is a transiting exoplanet noise simulator. It is based on Pandeia, the ETC for JWST, and has been expanded to include HST's WFC3 instrument. PandExo can be called and used locally, but it is also available as a web-based tool in the Exoplanet Characterization Tool Kit (ExoCTK). PandExo, with tutorials and documentation can be found here. The publication describing PandExo and how it works can be found here.

9.5.7 Crosstalk correction software

Electronic crosstalk between the UVIS amplifiers during readout induces faint, negative, mirror-symmetric ghost images in the other quadrant of the same CCD chip. Standalone software for crosstalk removal is described in Section 5.5.3 and can be dowloaded here:  http://www.stsci.edu/hst/instrumentation/wfc3/software-tools/crosstalk.

9.5.8 Satellite trail detection software

The ACS instrument team has developed a code for finding satellite trails in their data, and flagging the interested pixels’ DQ extension accordingly. The software is part of the acstools package and the detailed documentation be found here:  http://acstools.readthedocs.io/en/latest/satdet.html.
Flagging such trails can be useful e.g., in combining multiple images with Astrodrizzle. Disclaimer: the software is developed and tested only for ACS data, but should work on WFC3 data as well.

In 2021, a full-scale test of the automatic satellite detection is being run on all WFC3 UVIS and IR data (ISR in Prep). Results on the validity of this tool in general use cases will be published in the ISR and here once available.

9.5.9 IDL procedures for simulating trajectories of multi-lined spatial scans

The WFC3 ISR 2017-06 describes simulations of spatial scans using a simple physical model of HST motions during rarely-used multi-lined spatial scans. (Single-line scans are much more common, e.g. for time-series spectrophotometry of exoplanet transits.) The document contains an IDL code in the appendix that can be used both in designing multi-lined spatial scans, as well as for analyzing existing ones.