# 11.1 Basic Operating Modes

STIS currently supports four basic operating modes:

• ACCUM operating modes for the CCD and MAMAs, which produce a time-integrated accumulated image. These have been the most commonly used modes.
• TIME-TAG operating mode for the MAMA detectors, which outputs an event stream of high-time-resolution observations in the ultraviolet (UV).  When feasible, observers are encouraged to use TIME-TAG mode, as it offers several advantages and increases the legacy value of the observations.
• ACQ (acquisition) and ACQ/PEAKUP operating modes for the CCD and MAMAs used to acquire targets in the spectroscopic slits and behind coronagraphic bars and masks. Target acquisitions are described in Chapter 8.

## 11.1.1 CCD ACCUM Mode

The STIS CCD has only a single operating mode, ACCUM, for science data. The CCD pixels accumulate charge during the exposure in response to photons. The charge is read out at the end of the exposure at a selectable gain (number of e/DN) and converted to 16 bit data numbers (DN) by the A-to-D converter. The DN are stored as 16-bit words (with a range 0 to 65,535) in the STIS data buffer memory array. At the default CCDGAIN=1, the gain amplifier saturation level (33,000 electrons), and not the 16-bit format, limits the total counts that can be sustained in a single exposure without saturating (see also Section 7.2.10 and Section 7.3.2). At the other supported gain, CCDGAIN=4, the CCD full well (which can be as low as 120,000 e or 30000 DN in some regions of the detector) determines the saturation limit.

A full detector readout is actually 1062 × 1044 pixels with physical and virtual overscans. Scientific data are obtained on 1024 × 1024 pixels, each projecting to ~0.05 × 0.05 arcsecond on the sky. The dispersion axis runs along AXIS1 (image X or along a row of the CCD), and the spatial dimension of the slit runs along AXIS2 (image Y or along a column of the CCD). Figure 11.1 illustrates the full CCD format and its orientation with respect to the spacecraft (U2 and U3 or V2 and V3) axes. Arrows indicate the orientation of the parallel and serial clocking. The readout directions depend on the amplifier used. For the default amplifier D, the readout is at the upper right corner. It includes 19 columns of leading and 19 columns of trailing physical overscan in AXIS1, and 20 trailing rows of virtual overscan in AXIS2. The trailing serial overscan as well as the parallel overscan pixels are used to determine the bias level in post-observation data processing. The parallel overscan can also be used in the diagnosis of charge-transfer problems.

The minimum CCD exposure time is 0.1 second and the maximum possible exposure time is 4.7 hours (though we cannot imagine wanting a single exposure longer than 60 minutes). The minimum time between identical exposures for CCD full-frame (1062 × 1044) images is ~45 seconds.1 This time is dominated by the time it takes to read out the CCD (29 seconds for the full frame) and can be reduced to ~19 seconds if you use a subarray (see CCD Subarrays).

### Binning

The CCD supports on-chip binning. When on-chip binning is used the specified number of pixels in the serial and parallel directions are read out as a single pixel. The advantage of CCD binning is that the read noise per binned pixel is comparable to the read noise per unbinned pixel. Thus if your signal-to-noise per pixel is dominated by read noise when no binning is used, you can increase the signal-to-noise by binning. The disadvantages of using on-chip binning are (a) it reduces the resolution of your spectrogram or image, (b) the relative number of pixels affected by cosmic rays increases, and (c) the relative number of ‘hot’ pixels (which was ~5% of all unbinned CCD pixels as of 2014; see Chapter 7.3.5), increases by a factor proportional to the binning factor. On-chip binning of 1, 2, or 4 pixels in both the AXIS1 and AXIS2 directions is supported. Note that on-chip binning is not allowed when subarrays are used.

The number of hot pixels has been increasing steadily with time due to accumulated radiation damage on the STIS CCD (see the discussion on hot pixels in Chapter 7.3.5). Thus the impact of hot pixels on binned data has become significantly larger. Also note that when spectral data are spatially rectified, a single pixel in the original data will be interpolated into four pixels in the rectified image. For data binned N × M on board the spacecraft, a single bad pixel will, after rectification, affect the equivalent of 4 × × M pixels in an unbinned image.

When using the ETC to estimate the effects of on-board binning on the S/N of CCD observations, be aware that increasing the binning in the dispersion direction may cause the ETC to use a larger resolution element for its S/N calculation. Be sure to understand how much of any increase in the S/N number output by the ETC is due to an actual decrease in the read noise  and how much is simply due to a change in the size of the resolution element assumed for the calculation.

During Phase II, you specify the binning for your CCD observations using the BINAXIS1 and BINAXIS2 optional parameters. The default values are 1.

### CCD Subarrays

Subarrays can be used when the CCD detector is read out. Generally, there is no need to use a subarray for STIS data. The main scientific use of CCD subarrays is for time-resolved optical spectroscopy, where subarrays can be used to reduce the CCD read time and keep the data volume at a manageable level. CCD subarrays can also be specified for CCD ACQ/PEAK observations to limit the region in a diffuse object (e.g., a galaxy) over which the flux is summed for the peakup. When a subarray is used, only the portion of the detector which is within the specified subarray is read out and transmitted to the ground (see Figure 11.2—note that the spectrogram curvature is exaggerated in this figure).

As described in Section 11.1.1, full-frame CCD readouts are composed of 1062 × 1044 pixels: 1024 × 1024 data pixels, 19 leading and 19 trailing serial overscan pixels, and 20 trailing parallel overscan pixels. Dispersion runs along AXIS1 and the long dimension of the slit runs along AXIS2. Subarrays are required to span the full width of the CCD detector in the serial (dispersion) direction in order to ensure they contain the serial overscan needed to determine the bias level; however, you can control the height of the subarray in the parallel direction (i.e., along the slit for long-slit spectroscopic observations). Note that no parallel overscan is returned for subarrays (see Section 7.3.6). Subarray size is specified in Phase II by the parameter SIZEAXIS2, the size in pixels of the subarray in the AXIS2 direction.

The minimum allowed value of SIZEAXIS2 for ACCUM mode observations is 30 pixels (corresponding to 1.5 arcseconds), and SIZEAXIS2 must be an even number of pixels. By default the target is placed within a few pixels of the center of the subarray. For a few central wavelength settings, however, the target may be systematically offset by up to 30 pixels in the spatial direction. Observers should consult with the Help Desk prior to using SIZEAXIS2 with a value of less than 64 pixels.

#### Use of Subarrays to Reduce the CCD Read Time

The minimum time between identical CCD exposures is the readtime + 16 seconds. The time to read out a CCD subarray is:

Thus, using the smallest available subarray, which is 30 pixels high, you can reduce the minimum time between identical exposures to ~19 seconds (16 seconds overhead plus 3 seconds read time). The minimum time between full-frame CCD exposures is 16 + 29 = 45 seconds.

#### Use of Subarrays to Reduce Data Volume

The format of the data you receive when you use a CCD subarray will have dimensions 1062 × SIZEAXIS2, will cover the full range in the dispersion direction, and will include the serial overscan. The STIS buffer can hold seven full-frame CCD exposures at one time, or 7 × (1024/SIZEAXIS2) exposures at any one time. Full-frame CCD data acquired in one exposure can be transferred to the HST data recorder during the subsequent exposure(s) so long as the integration time of the subsequent exposure is longer than 3.0 minutes. If you are taking a series of exposures which are shorter than that, the buffer cannot be emptied during exposure, and once the STIS buffer fills up, there will be a pause in the exposure sequence of roughly 3 minutes as the buffer is emptied. This problem can sometimes be avoided with the judicious use of subarrays.

## 11.1.2 MAMA ACCUM Mode

In MAMA ACCUM mode exposures, photons are accumulated into a 2048 × 2048, 16-bit-per-element oversampled array in the STIS data buffer memory as they are received. At the end of the exposure, the data can be left in the over-sampled (or highres) format, which is the default for scientific exposures, or they can be binned along AXIS1 and AXIS2 to produce a 1024 × 1024 native-format image. Dispersion runs along AXIS1 and the spatial dimension of the slit runs along AXIS2. Figure 11.3 and Figure 11.4 illustrate the format and coordinate system for MAMA images, showing how first-order and echelle ACCUM mode spectrograms appear. PRISM images have dispersion along AXIS1. Note that for FUV-MAMA G140L and G140M the target is placed near AXIS2=392 to ensure that it will not fall on the shadow of the repeller wire (see Section 7.6).  The slit center is thus projected ~3 arcseconds below the detector center along AXIS2, and there will be ~3 arcseconds less spatial sky coverage to decreasing AXIS2 and ~3 arcseconds more spatial sky coverage to increasing AXIS2 (along the slit) for observations with those gratings.  Data taken prior to March 15, 1999 had the slit center offset above the detector center, for the same reason.  Note also the effects of the monthly offsetting, which applies to all first-order MAMA modes, as well as to the echelle modes prior to August 2002 (see Section 7.6).

The minimum MAMA ACCUM mode exposure time is 0.1 second and the maximum exposure time is 1.8 hours. For a series of identical MAMA ACCUM science exposures, there is a minimum overhead between exposures of ~30 seconds if the exposure time is longer than 2 minutes. Exposures shorter than 2 minutes incur larger overheads of ~2.5 minutes. This difference arises because in the former case the buffer can be dumped to the HST recorder during the subsequent exposure (i.e., in parallel), but in the latter case there is insufficient time to dump the buffer during the subsequent exposure and the buffer must be dumped serially (i.e, using observing time). However, other factors may influence the timing of buffer dumps, causing them to occur serially after the first science exposure even when it exceeds 2 minutes.

For the MAMA medium-resolution first-order modes and medium and high-resolution echelle modes (i.e., gratings G140M, G230M, E230M, E230H, E140M, and E140H), a correction for Doppler shifting of the photon energies due to HST spacecraft motion is applied as the photons are counted, prior to their addressing in STIS data buffer memory. The leading and trailing pixels in the dispersion direction (AXIS1) for Doppler-corrected exposures therefore receive less effective integration time, since source photons at the corresponding wavelengths have been Doppler-shifted off the edge of the detector for some fraction of the total exposure time. This effect is strongest in the high-resolution echelle modes, where for a maximum HST spacecraft velocity of 7.5 km/s, the leading and trailing ~20 AXIS1 pixels will have reduced effective exposure times.

## 11.1.3 MAMA TIME-TAG Mode

TIME-TAG mode is used for high-time-resolution spectroscopy and imaging in the UV. When used in TIME-TAG mode, the MAMA produces an event stream of AXIS1, AXIS2, and TIME data points, with a time resolution of 125 microseconds. The volume of data produced in TIME-TAG mode can be very large, and the data therefore must be continuously transferred from the STIS internal buffer to the data recorders to sustain TIME-TAG exposures of any significant duration.  Beginning in Cycle 22, however, the use of TIME-TAG mode (rather than ACCUM mode) has been encouraged for MAMA observations with count rates below 20,000 cts/s. TIME-TAG opens-up the time domain window and increases the legacy value of the observations. It also offers enhanced capability to remove time intervals of data which are impacted by geocoronal emission. Count rate restrictions do apply in TIME-TAG mode, however — see Buffer Management in TIME-TAG Mode.

The axis orientation in TIME-TAG is the same as in ACCUM mode (see Figure 11.3). The spacecraft time (absolute zero point of the time) is routinely known to 10 millisecond accuracy. No Doppler correction is applied by the flight software for TIME-TAG mode, but the correction can be applied during the post-processing of the data. The recorded times are the spacecraft times, which can be converted to heliocentric times using the ephemeris of the Earth and the spacecraft. TIME-TAG mode is illustrated in  Figure 11.5. Processing of TIME-TAG data by the STScI pipeline is described in Section 15.1.

### Event Processing in TIME-TAG Mode

In TIME-TAG mode, events detected on the anode wires are queued in a 4096-event first-in first-out (FIFO) prior to time assignment and subsequent storage in a STIS memory buffer. When the FIFO is less than half full, 4 events can be processed during each 125 microsecond tick of the STIS clock, corresponding to a maximum stable count rate of 32,000 counts/s. Times are assigned shortly after detection, when the event is extracted from the FIFO. This is the desired operating state in TIME-TAG mode. Higher count rate situations (described below) should be avoided because they result in less accurate times, lost events, and buffer management problems.

For global count rates up to 50,000 counts/s, the FIFO will gradually fill until more than 2048 events are queued. At this point 2048 events are processed in a tight loop requiring only 41 milliseconds, instead of the usual 64 milliseconds. Processing then reverts to the slower rate until the FIFO is again more than half full. In this mode, the times associated with each event have 125 microsecond resolution, but suffer from significantly larger systematic delays. Also, the observing sequence will be frequently interrupted to handle STIS buffer dumps (described below).

For count rates above 50,000 counts/s, the FIFO will fill faster than events can be processed, even in fast mode. When the FIFO fills, all events in the FIFO are discarded and the empty FIFO begins filling with new events. In this mode event times are essentially uniform, providing essentially no information about source variability.

### Buffer Management in TIME-TAG Mode

For TIME-TAG observations, STIS memory is divided into two 8 megabyte buffers, each of which can hold up to 2 × 106 events. If the cadence between scheduled buffer dumps is at least 99 seconds, then one buffer can be actively recording new events, while previously recorded events in the other buffer are being dumped to an HST data recorder. Thus, events can be dumped to STIS memory without gaps only if the global count rate is below 20,000 counts/s.

During Phase II proposal preparation, observers must specify in advance the time between dumps using the BUFFER-TIME parameter. The following constraints should be considered when selecting a BUFFER-TIME:

• To prevent loss of data, BUFFER-TIME should be short enough that fewer than 2 × 106 events are expected in the interval between dumps. If R is the expected count rate (predicted by the STIS ETC, for example), then BUFFER-TIME should be smaller than 2 × 106/R. A bit of margin protects against source variability or inaccurate count rate predictions. Be sure to include sky and detector backgrounds when estimating count rates.
• On the other hand, the nominal STIS allocation on the HST data recorders allows at most 30 total buffer dumps in any one visit, and fewer is desirable. For the minimum continuously sustainable BUFFER-TIME of 99 seconds, this limit on dumps corresponds to a total exposure time of only 50 minutes. It is sometimes possible to schedule downlinks from the HST data recorders to the ground during a specific TIME-TAG visit. Thus, with a strong scientific justification, it may be possible to accommodate visits that require more than 30 dumps. Such requests should be justified quantitatively in the Phase I proposal.
• Finally, BUFFER-TIME should be at least 99 seconds when more than 2 dumps are expected. Otherwise, the observing sequence will be interrupted whenever both buffers are in the process of being dumped. In such cases it is probably better to choose a BUFFER-TIME of 99 seconds. This guarantees that photons will be recorded whenever the active buffer has remaining space. If the active buffer fills in less than the selected BUFFER-TIME, additional photons will be discarded until the next dump begins. Reliable flux calibration is not possible in such cases.

In summary, BUFFER-TIME should be less than 2 × 106/R, but longer than 1/30 the total exposure time and longer than 99 seconds. As an added precaution against data loss, it is recommended to use a BUFFER-TIME of 1.6 x 106/R, which adds a 20% safety margin. In some cases it will not be possible to satisfy all of these criteria, in which case multiple short ACCUM exposures should be considered as an alternative. Figure 11.6 illustrates the process of estimating BUFFER-TIME

Remember to include contributions from all the sources expected to fall on the detector, the sky, geocoronal line emissions and detector backgrounds along with your source counts when computing R. It is important that you include a safety margin of at least 20% in your estimation of R. Specifying too small a BUFFER-TIME can lead to loss of data after the first dump of 2 million events.

### Differences in COS and STIS TIME-TAG Handling

Users familiar with the TIME-TAG mode of the STIS instrument should be aware that COS buffer management differs in some details from that of STIS. At the end of a STIS exposure, the entire buffer is read out, regardless of the buffer time set or the number of counts expected. Setting the STIS buffer time to any value greater than or equal to half the total exposure time will result in having only this single dump at the end of the exposure. Setting the buffer time to less than half the exposure time will cause one or more intermediate dumps to also occur during the exposure, but the time required for the dump after the exposure will not change.

COS, on the other hand, reads out only the fraction of the buffer that is expected to contain recorded events. This fraction is based on the specified buffer time (tbuf) and exposure time (texp). If tbuf > texp, only a fraction texp/tbuf of the buffer will be read out. Similarly, at the end of a multi-dump exposure with tbuf < texp, sufficient time will be allocated for COS to read only the fraction of the buffer expected to contain data. This approach increases observing efficiency by avoiding the allocation of more time than necessary for the buffer dump at the end of the exposure. It also requires more caution in the setting of buffer times: If the actual count rate is greater than expected, some events that were recorded in the buffer memory will never be read out. The guidelines in this section are designed to help COS users to maximize observing efficiency and avoid data loss.

1 This constraint implies that there will be 45 seconds of overhead per full-frame CR-SPLIT, i.e., if CR-SPLIT=3, there will be 3 × 45 seconds of overhead on the set of 3 exposures due to CCD setup and readout.