5.4 Estimating the BUFFER-TIME in TIME-TAG Mode

Introduction to the BUFFER-TIME

COS maintains two on-board data buffers, each with a capacity of 9 MBytes (2.35 × 106 counts). For every COS TIME-TAG calculation, the Exposure Time Calculator (ETC) reports the time it takes to fill the buffer based on the total expected counts, including those from the source, the sky, and the detector dark count. The calculation includes the STIM pulses for the FUV detector and accounts for the instrument quantum efficiency and dead time. The "Buffer Fill Time" reported is approximately 2.3 × 106 divided by the total count-rate.

The BUFFER-TIME is a keyword in APT that COS uses to establish the pattern and timing of memory dumps during a TIME-TAG exposure. The exposure counts are recorded on the first data buffer for a period corresponding to BUFFER-TIME, at the end of which the recording switches to the second data buffer while the first buffer is read out. This pattern is repeated after every BUFFER-TIME period to the end of the exposure. It takes 110 seconds to empty a COS data buffer.

If the BUFFER-TIME is set to too long a period and the buffer fills before the input switches to the other buffer, then the subsequently-arriving photons will be lost, leaving a gap in the data. The pipeline will correct the exposure times for any such gaps, and the flux calibrations will be correct, but the overall S/N will be lower than expected. If the BUFFER-TIME is set to too short a period, the input will switch to the second buffer before the first is full. No data will be lost, but there are impacts on spacecraft resources, which could preclude other activities such as parallel or internal calibration observations, since HST can process science data readouts from only one instrument at a time. For bright targets, using a shorter BUFFER-TIME may lower the overheads and therefore be advantageous by providing more on-source exposure time.

The BUFFER-TIME for each exposure should be chosen carefully based on all these factors. The recommended methods for determining the BUFFER-TIME, based on the exposure time (EXP-TIME) and the Buffer Fill Time reported by the COS ETC, are discussed below.

For targets with brightness levels which may vary on short timescales, including observations which require the Safe Target Offset Procedure (STOP; see Section 10.5), the BUFFER-TIME should be set to reflect the brightest expected state which is deemed still safe to observe, rather than the more-likely scenario of a quiescent observation.

COS TIME-TAG Handling

COS reads out only the fraction of the buffer that is expected to contain recorded events. This fraction is based on the specified BUFFER-TIME, and exposure time, EXP-TIME.

  • If BUFFER-TIME > EXP-TIME, only a fraction EXP-TIME/BUFFER-TIME of the buffer will be read out.
  • If BUFFER-TIME < EXP-TIME, there will be multiple dumps. At the end of the exposure, for the last dump, time will be allocated for COS to read only the fraction of the buffer expected to contain data. The full buffer will be read out for all other dumps occurring during the exposure.

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 implies that more caution is required in specifying the BUFFER-TIME in the Phase II proposal - if the actual count-rate is greater than expected, some events that were recorded in the buffer memory will never be read out.

Users familiar with the TIME-TAG mode of the STIS instrument will note that the COS buffer management described above differs 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.

The guidelines in the following subsection are designed to help COS users maximize observing efficiency and avoid data loss.

Choosing the BUFFER-TIME

It is strongly recommended that the COS ETC be used with the most reliable input spectrum to complete an accurate Buffer Fill Time (BFT, henceforth).

If the count-rate is underestimated, the BFT will be correspondingly overestimated, and data will be lost. To prevent against this, the BUFFER-TIME (BT, henceforth), which is the value entered in APT, should be set equal to 2/3 × BFT. While this will be sufficient for many COS observations, there are several circumstances where a different value of BT may be required, or preferred. These circumstances are discussed below, and Figure 5.12 is a flow chart that provides a guide to selecting the appropriate BT for different values of the BFT and EXP-TIME.

Figure 5.12: Flow chart for guiding the selection of BUFFER-TIME (BT) based on the values of the exposure time (EXP-TIME), and the Buffer Fill Time (BFT) returned by the ETC. For observations using the keyword FP-POS=ALL, EXP-TIME is the exposure time per FP-POS position. Do not set BT > 20,000 seconds.



  1. BFT < 120 sec; (2/3 × BFT < 80 sec).

    The minimum BUFFER-TIME is 80 seconds. The source is too bright for TIME-TAG, and should be observed in ACCUM mode.

  2. EXP-TIME < 80 sec.

    If the ETC reported BFT is 120 seconds or longer, then set BUFFER-TIME = 80 seconds. This ensures the whole buffer will be read, so if the target is brighter than expected, all counts will be recorded. With a longer buffer time only a fraction of it would be read (see COS TIME-TAG handling section above).

  3. BFT is between 120 sec and 165 sec; (2/3 × BFT is between 80 sec and 110 sec).

    It takes 110 seconds to empty a COS data buffer. If the count-rate exceeds 21,000 counts sec-1, and the BUFFER-TIME is set to 110 seconds, then the second data buffer will be filled before the first buffer has been completely read out. In this situation, the two options are to shorten the exposure, or accept gaps in the recoded data stream. In either case CalCOS will compute the actual exposure time correctly, but the S/N will be limited by 21,000 counts sec-1.

    Option A: Use the standard BUFFER-TIME = 2/3 × BFT. The APT will issue a warning and truncate EXP-TIME at 2 × BUFFER-TIME to ensure that all data are recorded.

    Option B: Set BUFFER-TIME = 111 seconds. Some fraction of the data during each BUFFER-TIME interval will be lost, but the exposure time will not be truncated.

    The remaining cases assume additionally that BFT is longer than 165 seconds, i.e., 2/3 × BFT is longer than 110 seconds.

  4. 2/3 × BFT > EXP-TIME.

    In this case, the time allocated to read the buffer dump is proportional to the number of events expected in the buffer. If there is a concern that the count-rate may be even higher than the 50% margin of error that the 2/3 factor accounts for, then set BUFFER-TIME = EXP-TIME. This will ensure that the entire buffer is read out at the end of the exposure time (see COS TIME-TAG Handling section above).

    Note that the combined global dark rate for both segments has exceeded 90 counts sec-1 and to ensure all detected events are dumped from the COS buffer, even for very faint sources, the BUFFER-TIME must not exceed 20,000 seconds.

  5. Minimizing Overhead when 2/3 × BFT < EXP-TIME.

    The value of BUFFER-TIME can be specified such that there are only between 100 and 110 seconds of exposure left for the last buffer dump.

    n = (EXP-TIME - 110) / (2/3 × BFT) rounded to the next highest integer
    BUFFER-TIME = (EXP-TIME - 110) / n, rounded up to whole seconds.

    Example: EXP-TIME = 2300 sec, BFT = 1050 sec.
    n = (2300 - 110) / (2/3 × 1050) = 3.13 rounded up = 4.
    BUFFER-TIME = (2300 - 110)/4 = 547.5 sec rounded up = 548 sec.

    After four buffer reads, there will be 108 seconds left in the exposure, and the last buffer read will have a lower overhead and allow the following exposure to start sooner.

    Note, however, that the BUFFER-TIME specified should be 111 seconds or longer.  Otherwise the exposure time will be truncated to 2 × BUFFER-TIME.

  6. BUFFER-TIME and AUTO-ADJUST

    APT allows individual exposures (or groups of exposures) to be adjusted automatically to fill the orbits. If this is used, then the BUFFER-TIME value should be set after obtaining the final exposure times.

The software and parameters that control dumps of the data buffer have been designed to avoid any loss of data from an observation. The duration and timing of data dumps depend on several factors, and observers are urged to experiment with APT to optimize the efficiency of their observations.