5.4 Estimating the BUFFER-TIME in TIME-TAG Mode

Introduction to the BUFFER-TIME

New COS users often find it difficult to choose a BUFFER-TIME for their TIME-TAG exposures, while more experienced users appreciate the ability to optimize it. Based on the expected count rate from the target, the BUFFER-TIME is the estimated time that it will take to fill one of the two on-board data buffers. If the chosen BUFFER-TIME is overestimated, one buffer may fill before the other buffer has been emptied, leading to data loss. Underestimating the BUFFER-TIME is also problematic, since it places an unnecessary drain on spacecraft resources and can preclude parallel observations. Correctly calculating the buffer time is therefore of high importance. We begin this section with guidance for new users and continue with a more detailed discussion below.

Each TIME-TAG calculation in the ETC reports a BUFFER-TIME in the results. Because users should avoid overestimating the BUFFER-TIME, we recommend entering 2/3 of the BUFFER-TIME reported by the ETC into the Phase II proposal, with a maximum of 20,000 s. If 2/3 of the BUFFER-TIME reported by the ETC is less than 80 s or if the exposure time is less than 80 s, see below. If neither of these conditions applies, there may be optional ways to optimize the BUFFER-TIME beyond this general advice; these techniques are also discussed below.  

Detailed Discussion of the BUFFER-TIME

COS maintains two on-board data buffers, each with a capacity of 9 MBytes (2.35 × 106 counts). The BUFFER-TIME is the time that it takes to fill one of these buffers. COS uses the BUFFER-TIME to establish the pattern and timing of memory dumps during a TIME-TAG exposure. For the first BUFFER-TIME of an exposure counts are recorded in the first COS data buffer. At the end of this time data recording switches to the second data buffer and the first buffer is read out while the second is being filled. It takes 110 s to empty a COS data buffer.

For all external TIME-TAG observations a value of the BUFFER-TIME must be specified in the Phase II proposal. The BUFFER-TIME is 2.35 × 106 counts divided by the anticipated count rate in photons per second. The BUFFER-TIME calculation should include counts from the detector dark current and stim pulses (for FUV) as well as the detected photon events, and factor in the instrument quantum efficiency and dead time. It is strongly recommended that the COS ETC be used to compute an accurate value of the BUFFER-TIME. In addition, to prevent the loss of data should your target be brighter than specified in the ETC calculation, give yourself a margin of error of about 50%; i.e., multiply the ETC BUFFER-TIME by 2/3.

If the BUFFER-TIME is overestimated the buffer may fill before input switches to the other buffer. Subsequently arriving photons will be lost, leaving a gap in the data. The pipeline will correct the exposure times for any such gaps, so flux calibrations will be correct, but the overall S/N will be lower than expected. If BUFFER-TIME is underestimated input will switch to the second buffer before the first buffer is full. No data will be lost, but the resulting drain on spacecraft resources could preclude other activities, including parallel observations. There are, however, some instances when it is advantageous to use a slightly smaller BUFFER-TIME to minimize the overhead when the buffer is being read (see the discussion below).

Figure 5.12 shows a flow chart that illustrates the process of selecting a BUFFER-TIME value for all possible combinations of exposure time and BUFFER-TIME. Each of the options is discussed in detail in Sections 5.4.1 through 5.4.5.

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.

Figure 5.12: BUFFER-TIME Selection Flow Chart.

Flow chart for guiding the selection of BUFFER-TIME based on different combinations of exposure time and buffer time. BTETC is the value of BUFFER-TIME returned by the ETC, BT2/3 is 2/3 × BTETC, and TEXP is the exposure time. For observations using the keyword FP-POS=ALL, TEXP is the exposure time per FP-POS position. Do not set BUFFER-TIME > 20,000 s.

5.4.1 BUFFER-TIME ≤ 80 s

The minimum allowed value of the BUFFER-TIME is 80 s. This value corresponds to a count rate of 30,000 count/s over the entire detector, the maximum rate at which the flight electronics are capable of processing counts. If 2/3 of the ETC BUFFER-TIME is less than 80 s, then the source is very bright and should be observed in ACCUM mode.

5.4.2 BUFFER-TIME > 80 s and EXP-TIME ≤ 80 s

If the exposure is less than 80 s in length, but 2/3 of the ETC BUFFER-TIME is longer than 80 s, set BUFFER-TIME = 80 s. This ensures that 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 the fraction of the buffer expected to contain counts would be read.

The remaining cases below assume that the exposure is longer than 80 s.

5.4.3 80 s < BUFFER-TIME ≤ 110 s

It takes 110 s to empty a COS data buffer. A BUFFER-TIME of 110 s corresponds to a count rate of 21,000 count/s. If the count rate exceeds this value, then the second data buffer will be filled before the first buffer has been completely read out. In this situation, you have two options. You can either shorten your exposure, or you can accept gaps in the recorded data stream. In either case calcos will compute the actual exposure time and will calculate fluxes correctly, but the total number of collected counts, and hence the S/N, will be limited by the 21,000 count/s rate.

  • Option A: You wish to receive all the data and are willing to shorten the exposure time. In this case use 2/3 of the BUFFER-TIME returned by the ETC. If the BUFFER-TIME is less than 111 s, the APT will issue a warning and truncate the exposure time at 2 × BUFFER-TIME to ensure that all data are recorded.
  • Option B: You can tolerate data drop-outs, but want control of the total exposure time. In this case choose a BUFFER-TIME of 111 s. You will lose some fraction of the data during each BUFFER-TIME interval (see example below), but the APT will not truncate your exposure.

As an example, suppose that 2/3 × (BUFFER-TIME returned by the ETC) is 100 s, and you want an exposure time of 360 s.

  • With Option A, you would specify BUFFER-TIME = 100 s. Because it takes longer than that to read out the buffer, the APT limits you to an exposure time of 2 × 100 = 200 s. In this case COS records all the events that arrived during the exposure.
  • With Option B, you would specify BUFFER-TIME = 11 s. Since the COS buffer may be full after the first 100 s, the last 11 s of data may not be recorded and are lost each time the buffer fills. With this option you will get a series of data blocks as follows: 100, 11, 100, 11, 100, 11, 27, where the bold numbers represent periods when the data are recorded, and the italic numbers represent periods when the data are lost. The COS shutter remains open for the full 360 s, and the data are properly flux-calibrated by the pipeline.

5.4.4 BUFFER-TIME ≤ Exposure Time & BUFFER-TIME > 110 s

In this case 2/3 of the BUFFER-TIME returned by the ETC should be used. As a special case, to minimize the overhead associated with reading the buffer, the BUFFER-TIME can be specified such that there are only between 100 and 110 s left of exposure for the last buffer dump. This new BUFFER-TIME can be calculated using BUFFER-TIMEnew = (Exposure Time − 110)/n, where n is the value of (Exposure Time − 110)/(2/3 × ETC Buffer Time) rounded to the next higher integer. For example, suppose that the exposure time is 2300 s and that 2/3 of the BUFFER-TIME returned by the ETC is 2/3 × 1050 = 700 s. Then (2300 − 110)/700  = 3.13, which is rounded up to n = 4 and BUFFER-TIMEnew = (2300 −  10)/4 = 547.5 s, which we round up to 548 s. This means that the buffer will be read out every 548 s, and after four buffer reads there will be 2300 − × 548 = 108 s left in the exposure. This last buffer read has a lower overhead and allows the next exposure to start sooner.

5.4.5 BUFFER-TIME > Exposure Time & BUFFER-TIME > 110 s

For exposures where 2/3 of the BUFFER-TIME returned by the ETC is larger than the exposure time and larger than 110 s, the BUFFER-TIME should be set to 2/3 of the value returned by the ETC. In this case the time allocated to read the last buffer dump is proportional to the number of events in the buffer, and some overhead can be saved if only a portion of the buffer needs to be read out. By specifying 2/3 of the BUFFER-TIME returned by the ETC a margin of error of 50% in the observed count rate is used. However, if the observed count rate is actually higher than the 50% margin of error then those events will not be read out of the buffer and will be lost. If there is a concern that this may happen the BUFFER-TIME should be set to the exposure time. This will ensure that the entire buffer is read out at the end of the exposure. The FUV dark current fluctuates and occasionally the combined global dark rate for both segments has exceeded 90 count/s (Sections 4.1.3 and 7.4.1). To ensure that all detected events are dumped from the COS buffer, even for a very faint target, the BUFFER-TIME must not exceed 20,000 s.

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.


If you use the AUTO-ADJUST feature in the APT to set your exposure times do it first, then adjust the BUFFER-TIME of each exposure according to the rules above.