9.3 Spectroscopy
9.3.1 Using the WFC3 Grisms
WFC3 contains three grism elements: the G280 in the UVIS channel and the G102 and G141 in the IR channel. The grisms provide slitless spectra over the whole field of view of each channel. These spectroscopic modes have the well-known advantages and disadvantages of slitless spectroscopy. The chief advantage is large-area coverage, which enables spectroscopic surveys. Among the disadvantages are overlap of spectra, high background from the integrated signal over the passband, and modulation of the resolving power by the sizes of dispersed objects.
In the UVIS channel, the G280 grism provides spectroscopy over a useful wavelength range of 200-800nm, at a dispersion of ~14 Å per pixel in the first order. The two grisms for the IR channel cover the wavelength ranges 800-1150 nm (G102) and 1075-1700 nm (G141). The dispersions are 24.5 and 46.5 Å per pixel, respectively. The primary aim of the reduction of WFC3 slitless spectra is to provide one-dimensional wavelength- and flux-calibrated spectra of all objects with detectable spectra. The reduction presents special problems because of the dependence of the wavelength zero point on the position of the object in the field, the blending of spectra in crowded fields, and the need for flat-field information over the whole available wavelength range. HSTaXe (Section 9.3.6 and 9.5.5), a STScI-supported Python/C based package, is designed for the automated extraction, calibration, and visualization of spectra from slitless spectroscopic instruments. Slitlessutils, a new grism analysis package written entirely in Python, is under development at STScI, with an initial version released in 2024 (STAN 44).
The normal method for taking WFC3 slitless spectra is to take a pair of images, one direct and one dispersed, of each target field, without a shift in position between the two. The direct image provides the reference position for the spectrum and thus sets the pixel coordinates of the wavelength zero point on the dispersed image.
The WFC3 UVIS and IR grisms have some unique properties that result in different types of issues associated with data for the two different channels. These are discussed in more detail below. Some common issues associated with all WFC3 grism observations are highlighted here.
Bright Stars
The brightest objects produce spectra that can extend far across the detector. This is especially problematic for the UVIS G280 grism, where the relative throughput of the higher spectral orders is significant. These spectra provide a strong source of contamination for fainter sources. In addition, the higher order spectra are increasingly out of focus and thus signal spreads in the cross-dispersion direction. Bright stars also produce spatially extended spectra formed by the wings of the PSF.
Resolution and Object Size
In slitless spectroscopy the object itself provides the ‘slit’. The WFC3 PSF has a high Strehl ratio (Burrows et al. 1991) over most of the accessible wavelength range of the grisms and therefore the degradation of point sources beyond the theoretical resolution is minimal. The spectral resolution for an extended object, however, will be degraded depending on the size and light distribution in the object and spectral features will be diluted.
Zeroth Order
The grism 0th order is only detectable for brighter objects observed with the IR grisms because that order contains only a small fraction of the total flux. This faint feature is therefore easily mistaken for an emission line. The direct image should be used to determine the position of the 0th order for each source, which allows the 0th order feature in the dispersed images to be distinguished from emission lines. For the UVIS G280 grism, the 0th order has high throughput and is therefore more readily distinguished from emission features. The high throughput of the G280 0th order also means that it will often be saturated in long exposures, which leads to CCD charge bleeding and potential contamination of adjacent spectra.
Background
The background in a single grism image pixel is the result of the transmission across the whole spectral range of the disperser and can therefore be high, depending on the spectrum of the background signal. The IR grism background includes not only signal from the sky, but also thermal emission from the telescope and WFC3 optics. The detected background in the IR grisms exhibits variability on timescales shorter than a HST orbit and shows a distinct two-dimensional structure that is due to the overlapping of the background spectral orders. This background needs to be carefully removed before extracting the spectra of targets (see WFC3 ISR 2020-04 for details). The G280 grism, on the other hand, produces relatively low background compared to the IR grisms, because of the faintness of the sky in the near-UV and optical; however, due to the geometry of the optical bench, there is structure in the background. G280 sky frames have been provided on the Grism Resources page and are described in more detail in WFC3 ISR 2023-06.
Crowding
Because of the high sensitivities of the WFC3 grisms, observations of moderately crowded fields can produce many instances where spectra overlap. It is important to know if a given spectrum is contaminated by that of a neighbor and to choose a telescope roll angle which eliminates or minimizes contamination for specific sources of interest. Contamination can also be mitigated by obtaining grism observations of the same field at different telescope roll angles, which improves the chances of cleanly extracting the spectrum for a given target. The slitlessutils package is optimized for analyzing spectra obtained at multiple orients.
Extra-field Objects
There will inevitably be cases where objects outside the field of view result in spectra getting dispersed into the field, contaminating sources within the field. This is more serious for the G280 where the spectra are long relative to the size of the detector (WFC3 ISR 2020-09). In these cases, reliable wavelengths can not be determined for the extra-field object unless the 0th order is also present. Even then, the wavelength zero point will be relatively uncertain because the 0th order is somewhat dispersed and therefore difficult to localize. The extent of the out-of-field area has been determined for the G102 and G141 IR grisms: extending to pixel -189 on the left of the detector and +85 on the right (WFC3 ISR 2016-15).
9.3.2 Pipeline Calibration
The direct image of a direct-plus-grism image pair can be fully reduced by calwf3, including bias subtraction, dark subtraction, flat fielding, and computation of the photometric zero point in the header. In contrast to direct images, no single flat-field image can be correctly applied to grism images, because each pixel contains signal arising from different wavelengths. Flat fielding must therefore be applied during the extraction of spectra once the wavelength corresponding to each pixel is known from post-pipeline processing with HSTaXe or the new slitlessutils. With HSTaXe, the user can apply flat-field corrections which are dependent on the wavelength falling on each pixel, as specified by the position of the direct image and the dispersion solution. So during calwf3 processing the FLATCORR
step is still performed, but the division is done using a special flat-field reference file that only contains information on the relative gain offsets between the different detector amplifier quadrants. This allows the FLATCORR
step to still apply the gain correction (converting the data to units of electrons for UVIS or electrons per second for IR) and thus also corrects for offsets in gain between the various quadrants of the detectors. Details of the flat-fielding done by slitlessutils, released in 2024, can be found in the ReadTheDocs.
The calwf3 flt products should then be the starting point for all subsequent reduction of slitless data with HSTaXe, or other software such as slitlessutils. The units of the data in the SCI and ERR extensions of these files are electrons for UVIS and electrons per second for IR. The primary output of HSTaXe is a file of extracted, flux calibrated spectra, provided as a FITS binary table with as many table extensions as there are extracted spectra (see Section 9.3.6 for more details). For slitlessutils software, see the ReadTheDocs for details of the output products.
9.3.3 Slitless Spectroscopy Data and Dithering
The common approach to dithering WFC3 imaging data, in order to improve the sampling of the PSF and to allow for the removal of bad pixels, applies equally well to slitless spectroscopy data. For long grism observations the data taking is typically broken into several sub-orbit, dithered exposures.
The AstroDrizzle task, which is normally used to correct for the geometrical distortion of WFC3 and combine dithered exposures, is not generally applicable to grism observations. This is due to the fact that the spatial distortion correction would only be applicable to the cross-dispersion direction of grism images. For similar reasons, the combining of dithered grism images before extracting spectra is not generally recommended. Every detector pixel has a different spectral response, which has not yet been corrected in the calibrated two-dimensional images (see Section 9.3.2 on flat fielding). Combining dithered grism images before extraction will combine data from different pixels, making it difficult or impossible to reliably flat field and flux-calibrate the extracted spectra. Extracted spectra from dithered images can be properly combined into a final spectrum using the aXedrizzle
task in the HSTaXe package.
AstroDrizzle processing of dithered grism exposures can, however, be useful for simple visual assessment of spectra in a combined image and for the purpose of flagging cosmic-ray (CR) hits in the input flt images. When AstroDrizzle detects CR’s in the input images, it inserts flags to mark the affected pixels in the DQ arrays of the input flt files. The HSTaXe spectral extraction can then be run on these updated flt images utilizing the DQ flags to reject bad pixels; please refer to the slitlessutils ReadTheDocs for its treatment of bad pixels. CR removal is particularly helpful for long UVIS G280 exposures; it's not typically necessary for IR grism images since the IR flt files have already had CR’s rejected by the calwf3 up-the-ramp fitting process.
9.3.4 Spectroscopy with the WFC3 G280 Grism
The filters most often used for obtaining a direct image in tandem with the G280 grism are the F300X and F200LP. The direct image provides the reference position for the spectrum and thus sets the pixel coordinates of the wavelength zero point on the dispersed image. The G280 wavelength zero point is generally calibrated to an accuracy of about 1 pixel. It is not possible to use the 0th order image of a source in a G280 exposure to establish the source position, because the 0th order is weakly dispersed and prone to saturation effects.
Spectra produced by the G280 grism are oriented in WFC3 images with the positive spectral orders to the left (lower x-axis pixel index) of the 0th order spot, with wavelength increasing to the left. Negative orders are located to the right, with wavelength increasing to the right. The +1st order extends to the left of the 0th order a distance of about 1/4 of the image width. The throughput of the +1st order of the G280 is ~20% larger than that of the negative orders. This leads to heavy overlap of the orders at wavelengths redder than ~400nm. In addition, there is curvature of the spectral traces at the blue ends of the orders. The amplitude of the curvature is about 30 pixels in the detector y-axis. Due to the significant throughput at higher orders, the spectra of very bright objects may extend across nearly the entire field of view of the detector. A number of reports are available with details on the characteristics and calibration of the G280 grism (WFC3 ISRs 2020-09, 2017-20, 2011-18, and 2009-01).
As an example, Figure 9.8 shows a G280 image of the Wolf-Rayet star WR-14, which is used as a wavelength calibrator. Superimposed on the dispersed image is a F300X image, which illustrates the relative location of the direct image of the source (circled in Figure 9.8). The full 4096-pixel x-axis extent of the detector is shown, which is completely filled by the positive and negative orders of this bright source.
9.3.5 Spectroscopy with the WFC3 IR Grisms
The dispersion of the G102 grism is high enough that only the +1st and +2nd order spectra generally lie within the field of the detector. For the lower-dispersion G141 grism, the 0th, +1st, +2nd, and +3rd order spectra lie within the field for a source that has the +1st order roughly centered. The IR grisms have the majority (~80%) of their throughput in the +1st order, resulting in only faint signals from the other orders. The trace of the observed spectra are well described by a first-order polynomial, however the direct-to-dispersed image offset is a function of the source position in the field. The tilt of the spectra relative to the image axes is small, only 0.5-0.7 degrees. Typical filters used for obtaining companion direct images are F098M and F105W for the G102 grism, and F140W and F160W for the G141 grism. Other medium- and narrow-band filters can be used when necessary to prevent saturation of very bright targets. The image centroids of sources at a given telescope pointing will depend on the filter used. These filter-dependent systematic variations, documented in WFC3 ISR 2012-01, are generally at the sub-pixel level, but must be taken into account during the spectral extraction and reduction process if the filter used to take the direct images is different from the filter in which the trace is calibrated. Version 4.32 of the G102 and G141 grism configuration files now include filter-specific configuration files which include the direct filter wedge corrections (the version number is part of the tar file name, e.g. G102.F098M.V4.32.conf).
The dispersion direction of the IR grisms is opposite to that of the G280, with the positive spectral orders appearing to the right of the 0th order and wavelength also increasing to the right. Examples of G102 and G141 observations of the flux calibration standard star GD153 are shown in Figure 9.10 and Figure 9.11, respectively.
9.3.6 Extracting and Calibrating Slitless Spectra
The software package aXe provides a streamlined method for extracting spectra from WFC3 slitless spectroscopy data . Due to the deprecation of IRAF/PyRAF, an updated version of aXe , called HSTaXe , was developed in Python/C that is completely independent of IRAF/PyRAF. The HSTaXe software requires an environment that is independent of the standard Space Telescope Environment (stenv). It is recommended that HSTaXe be installed with the environment file hosted on the HSTaXe GitHub repository. A new STScI package, slitlessutils, is currently under development to support wide-field slitless spectroscopy. An early release with basic functionality is available in STAN 44. The Grism Data Analysis page provides the latest status on the available analysis software.
There is a detailed aXe manual and Jupyter Notebook tutorials specific to WFC3 grism data reduction, both of which are available on the HSTaXe GitHub repository, so only a brief outline of its use is presented here. In addition to the detailed cookbooks, we also have a complementary Instrument Science Report (WFC3 ISR 2023-07) that describes the HSTaXe installation, recommended preprocessing steps, file outputs, and an advanced extraction method. Other software packages are also available and a current list can be obtained on the Grism Resources webpage.
The basic steps involved in extracting spectra from grism images are:
- Make a direct image source catalog. This step consists of identifying and cataloging sources from a direct image in the field of the grism image. The source positions and sizes are used later to define extraction boxes and calculate wavelength solutions in the extraction step. The source information is often derived from an AstroDrizzle combination of direct images. If there is only a single direct image, it is still recommended to process the file through AstroDrizzle.
- Prepare the grism images and remove sky background. In this step a scaled master sky background image is subtracted from the grism images.
- Project source catalog positions to coordinate system of direct images. If the source catalog was derived from dithered or drizzled direct images, then the catalog positions need to be transformed back to the coordinate system of each direct image.
- Extract sets of pixels for each object spectrum. The spectra of all objects in the transformed catalog are extracted from each grism image.
- Combine all spectra of each object using aXedrizzle. All 2-dimensional spectra for each object are combined and CR-rejected using drizzle techniques. The results are 2-d spectral images and 1-d tables.
The starting point is always a set of dispersed slitless images and the derived catalog of objects in the images. Information about the location of the spectra relative to the position of the direct image, the tilt of the spectra on the detector, the dispersion solution for various orders, the name of the flat-field image and the sensitivity (flux per Å per electron per second) table are stored in a configuration file, which enables the full calibration of extracted spectra. For each instrumental configuration, the configuration files and all necessary calibration files for flat fielding and flux calibration can be downloaded from the WFC3 instrument website (http://www.stsci.edu/hst/instrumentation/wfc3/documentation/grism-resources).
Background Subtraction
aXe has two different strategies for removal of the sky background from the spectra. The first strategy is to perform a global subtraction of a scaled ''sky'' frame from each input grism image at the beginning of the reduction process. This removes the background signature from the images, so that the remaining signal can be assumed to originate from the sources only and is extracted without further background correction in the aXe reduction. Sky frames are available for download from the WFC3 grism recource webpages (UVIS, IR). While a ''sky'' image is available for both UVIS and IR, we recommend an alternate background subtraction method for IR grism observations, which is independent of aXe.
When reducing G280 spectra, application of a sky image is recommended for use with your slitless spectroscopy reduction code (e.g., HSTaXe) of choice. We provide the G280 sky images for both calibrated, flat-fielded individual FLT exposures, as well as their corresponding CTE-corrected FLC frames on the Grism Resources webpage. This sky image was generated using an inverse-variance weighted stack of all low-background G280 exposures taken to-date with sources masked, to characterize the stray light present in the G280 science frames (WFC3 ISR 2023-06).
For both G102 and G141, the background sky signal is variable and made of multiple components. Currently, the WFC3 calibration pipeline, calwf3, does not have the capability to model and remove the dispersed 2D background. Therefore, we highly advise that IR grism observers use the WFC3 Backsub Python script to process uncalibrated RAW images into calibrated, flat-fielded FLT files. A description of the three background components and the methods used in WFC3 Backsub can be found in WFC3 ISR 2020-04. The software and supporting reference files for WFC3 Backsub are available for download on Box. An example workflow incorporating the use of WFC3 Backsub is given in the HSTaXe IR cookbook.
The second strategy for background subtraction with aXe is to make a local estimate of the sky background for each beam by interpolating between the adjacent pixels on either side of the beam. In this case, an individual sky estimate is made for every beam in each science image. This individual sky estimate is processed (flat fielded, wavelength calibrated) parallel to the original beam. Subtracting the 1D spectrum extracted from the sky estimate from the 1D spectrum derived from the original beam results in the pure object spectrum. The second approach needs to account for the fact that the background of an observation can vary during the course of an observation. As is the case for direct imaging, there can be a significant amount of dispersed HeI light as part of the background. Steps to mitigate this problem are described in WFC3 ISR 2017-05. An updated discussion of variable background subtraction methods for the IR grisms and an improved set of dispersed background models are provided in WFC3 ISR 2020-04.
Output Products from aXe
The primary output of aXe is a file of extracted and calibrated spectra, which is provided as a multi-extension FITS binary table with as many table extensions as there are extracted spectra. The table contains 15 columns, including wavelength, total and extracted and background counts and their errors, the calibrated flux and error, the weight and a contamination flag. The primary header of this "SPC" table is a copy of the header of the frame from which the spectrum was extracted
aXe also creates a 2-d “stamp” image for each beam. The stamp images of all spectra extracted from a grism image are stored as a multi-extension FITS (STP) file with each extension containing the image of a single extracted spectra. It is of course also possible to create stamp images for 2-d drizzled grism images.
Table 9.5 below, from WFC3 ISR 2023-07, lists the file categories and short descriptions for the various files outputted after a basic extraction with HSTaXe. The output products from aXe consist of ASCII files, FITS images and FITS binary tables. The WFC3 grism cookbooks show end-to-end examples of using HSTaXe and handling the output files to display the 2-d stamps and make plots of the extracted spectra.
File Suffix | Description |
---|---|
cat | Input object catalog |
OAF | Original aperture file |
BAF* | Background aperture file |
BCK.fits∗ | Background image |
BCK.PET.fits∗ | Pixel extraction tables for the background |
CONT.fits | Contamination estimate for spectra |
PET.fits | Pixel extraction tables |
SPC.fits | 1D extracted spectra |
STP.fits | 2D stamp image of extracted traces |
opt.SPC.fits† | Optimally extracted 1D spectra |
opt.WHT.fits† | Optimal weight image |
* Files produced if the argument back=True in the axecore task
† Files produced if the argument weights=True in the axecore task
9.3.7 Accuracy of Slitless Spectra Wavelength and Flux Calibration
Wavelength Calibration
The WFC3 grism dispersion solutions were established by observing both astronomical sources with known emission lines (e.g., the Wolf-Rayet star WR-14 and the planetary nebula Vy2-2 (WFC3 ISRs 2009-17 and 2009-18) and ground-based monochromator sources (see WFC3 ISRs 2009-01 and 2008-16). The field variation of the dispersion solution was mapped by observing the same source at different positions over the field. The internal accuracy of these dispersion solutions is good to ~0.25 pixels for the IR grisms (~6Å and ~9Å for the G102 and G141, respectively), and to ~1 pixel (~14Å) for the UVIS G280.
For a given object, the accuracy of the assigned wavelengths depends most sensitively on the accuracy of the zero point and the transfer of the zero point from the direct to the slitless spectrum image. Provided that both direct and slitless images were taken with the same set of guide stars (recorded in spt file header keywords DGESTAR
and SGESTAR
), systematic pointing offsets less than 0.2 pixels can be expected. For faint sources, the error on the determination of the object centroid for the direct image will also contribute to wavelength error. Realistic zero point errors of up to 0.3 pixels are representative. The wavelength calibration of the G102, G141 and G280 grisms were recently updated (WFC3 ISR 2016-15 and WFC3 ISR 2020-09). The new aXe format calibration files also include the filter-dependent wedge offsets that should be applied when pairing G102 and G141 observations with imaging obtained using a specific direct filter.
Flux Calibration
The sensitivity of the dispersers was established by observing a spectrophotometric standard star at several positions across the field. The sensitivity (HSTaXe uses a sensitivity tabulated in erg cm-2 s-1 Å-1 per detected electron) was derived using data flat fielded by the flat-field cube. Results for the IR grisms show 4-5% differences in the absolute flux of spectra located near the center of the field as compared to those near the field corners. This is clear evidence for a large-scale variation in the overall illumination pattern in the grism flat-field data cubes. Additional field-dependent flux calibration observations have been completed for G280 in 2020 (WFC3 ISR 2020-09). The last full-scale flux calibration for G102 and G141 were completed in 2011 (WFC3 ISR 2011-05).
UVIS Flux Calibration
The sensitivity of the G280 grism was established by observing a spectrophotometric standard star at several positions across the field. The sensitivity (HSTaXe uses a sensitivity tabulated in erg cm-2 s-1 Å-1 per detected electron) was derived using data flat fielded by the flat-field cube. The results of a full calibration of the WFC3 UVIS G280 slitless spectroscopic mode from the entire G280 calibration data (nearly 600 datasets) obtained by 2020 are detailed in WFC3 ISR 2020-09.
IR Flux Calibration
The sensitivities of the G102 and G141 grisms were established by observing the white dwarf spectrophotometric standard stars GD153 and GD71 at several positions across the field (WFC3 ISRs 2009-17, 2009-18, and 2011-05).
The flux calibration is primarily based on observations of GD153 at the center of the detector. Variation of the sensitivity over the field-of-view was measured by observing GD71 over a grid of nine points over the detector, which shows that the throughput falls off by about 2% in the y direction and by about 4% in the x direction to the edges of the FoV. The large-scale variation is included in the grism flat-field cube (see WFC3 ISR 2011-05). Regular monitoring of the flux calibration is performed, and has shown that the calibration has been stable to within 1% since the installation of the camera on HST (WFC3 ISRs 2012-06 and 2014-01).
Flux Monitor
The IR grism flux monitor checks the sensitivity of the grisms using observations of CALSPEC white dwarf standards. Recent analysis shows that the relative sensitivity of both grisms is decreasing at a rate of 0.115+/-0.008% per year for G102 and 0.061+/-0.007% per year for G141 (WFC3 ISR 2024-01; Bohlin & Deustua (2019)), shown in Figure 9.12. The vertical scatter in the data for a given date is due to dithered observations in the calibration data, designed to sample many different regions of the detector. This scatter will be much smaller for observations with the supported IR grism apertures G102-REF and G141-REF near the center of the detector.
-
WFC3 Data Handbook
- • Acknowledgments
- • What's New in This Revision
- Preface
- Chapter 1: WFC3 Instruments
- Chapter 2: WFC3 Data Structure
- Chapter 3: WFC3 Data Calibration
- Chapter 4: WFC3 Images: Distortion Correction and AstroDrizzle
- Chapter 5: WFC3 UVIS Sources of Error
- Chapter 6: WFC3 UVIS Charge Transfer Efficiency - CTE
-
Chapter 7: WFC3 IR Sources of Error
- • 7.1 WFC3 IR Error Source Overview
- • 7.2 Gain
- • 7.3 WFC3 IR Bias Correction
- • 7.4 WFC3 Dark Current and Banding
- • 7.5 Blobs
- • 7.6 Detector Nonlinearity Issues
- • 7.7 Count Rate Non-Linearity
- • 7.8 IR Flat Fields
- • 7.9 Pixel Defects and Bad Imaging Regions
- • 7.10 Time-Variable Background
- • 7.11 IR Photometry Errors
- • 7.12 References
- Chapter 8: Persistence in WFC3 IR
- Chapter 9: WFC3 Data Analysis
- Chapter 10: WFC3 Spatial Scan Data