Table of Contents Previous Chapter
This section provides a guide for producing algorithms which map the start times to observatory time and hence to UTC and TDB
Determining the Start Time of an Exposure (single exposure time)
The following describes the overall steps in determining the start time of a timed exposure
(or of a particular image frame in continuous-clocking mode.) The method first computes the time in units of the BEP clock, and then relates that to observatory time through the synchronous science header timestamps.
1. Determine runStartTime, the starting time of the science run in BEP timer units. It is reported in the scienceReport packet that terminates the run, as well as in each individual exposure packet.
2. Add the DEA startup time, startupTicks
.
This is the initial delay, in BEP clock units, between the commanded start-of-run time and the start of the first CCD exposure period. It is a function based on the clocking parameters and method. This function will be provided as part of the AS-BUILT ACIS Software Detailed Design Specification, MIT 36-53200.
3. Inspect any pair of consecutive fepTimestamp
values in exposure packets.
If fepTimestamp
i
1 is less than fepTimestamp
i
, exposure n starts at
exposureStartTimen = runStartTime + startupTicks +
n * (fepTimestampi - fepTimestampi1)
expressed in BEP timer units. Otherwise, if the FEP time-stamp of exposure i is less than that of exposure i--1, the counter has wrapped, and the start time of exposure n is
exposureStartTimen = runStartTime + startupTicks +
4.
n * (225 + fepTimestampi fepTimestampi1)
The first 4 bytes of ACIS science data in frame number i contain the science header timestamp (refTimei
). If refTimei
+1 is greater than refTimei
, the number of BEP clock ticks per 2.05 second science frame is
ticksPerFrame = refTimei+1 - refTimei
Otherwise, if refTimei
+1 is less than refTimei
,
ticksPerFrame = 232 + refTimei+1 - refTimei
5. exposureStartTimen
.
This should occur at the science frame numbered nf
, where
nf = i + integer((exposureStartTimen -- refTimei)/ticksPerFrame)
The frame i should be chosen close to the start of the run. If refTimei
is less than runStartTime
, use
nf = i + integer((exposureStartTimen -- refTimei - 232)/ticksPerFrame)
instead. Drift between the BEP clock and the observatory clock may be enough to
cause an error in calculating nf
, so a search should be made through nearby science
frames for the one with the refTime
value closest to exposure StartTimen
.
6. Extract or compute the Universal Time (frameUTnf) corresponding to the start of the
frame.
This operation is determined by the contents of the spacecraft science frame. It was originally planned to store the spacecraft clock in the science header in each science telemetry frame. It is now proposed to compute UTC from the telemetry frame sequence number. The actual method chosen to relate the start of the telemetry frame to UTC is beyond the scope of this document.
7. Determine the precise observatory time of the start of exposure n:
exposureUTn = frameUTnf + 2.05 *
(exposureStartTimen - refTimenf)/ticksPerFrame
where 2.05 represents the time in seconds between successive science frame pulses (corresponding to 8 minor frames of 1025 bytes each at a rate of 32,000 bits per second; actual telemetry rates may differ.)
Determining the Start Time of an Exposure (two exposure times)
The following describes the overall steps in determining the start time of a particular exposure in Timed-Exposure Mode when two exposure times are used:
1. Compute runStartTime
+ startupTicks
, as above.
2. Inspect several consecutive exposure records and compute three repetition intervals.
int1 = fepTimestampi - fepTimestampi1
int2 = fepTimestampi+1 - fepTimestampi
int3 = fepTimestampi+2 - fepTimestampi+1
where exposure number i is evenly divisible by ( 3. primaryCount = integer((dutyCycle + n) / (dutyCycle + 1))
cycleCount = integer(n / (dutyCycle + 1))
4. Compute the exposure starting time in BEP timer units.
exposureStartTimen = runStartTime + startupTicks +
dutyCycle
+1). If a rate is negative,
add 225.
(n - primaryCount - cycleCount) * int1 +
primaryCount * int2 + cycleCount * int3 +
(cycleCount - primaryCount) * (E2 - E1)
where E1
and E2
are, respectively, the commanded primaryExposureTime
and secondaryExposureTime
from the timed exposure parameter block, converted to BEP clock units:
E2 = 100,000 * (secondaryExposure / 10)
5. Follow steps 4--7 of the preceding section totranslate exposureStartTimen
to UT.