Each bin is associated with a start time (which is equal to the end time of the previous bin, if there is one), and end time (which is equal to the start time of the following bin, if there is one) and an attitude. The binning is done as follows. For each time value, evproject attempts to obtain the spacecraft attitude (via an oal call if attsource=`odf', or from the atthkset file if attsource=`atthk'). This attempt is either successful or unsuccessful (logical returned value of the oal call, or null value in the atthkset column). evproject begins a new attitude bin if any of the following occur:
It can thus be seen that each bin duration spans attitude calls which were either all successful or all unsuccessful. The whole bin can therefore be labelled as either `good' or `bad'.
The attitude of each new `successful' bin is set to the baseline attitude. The baseline attitude is initially set to the attitude returned by the first succesful attitude call. If the attitude returned by any subsequent successful call diverges from the baseline by more than set limits (item 4 in the list above), the baseline attitude is altered. However usually only one of the components of the baseline attitude is altered at a time. This comes about as follows. There are separate limits on each of the three attitude components (RA, dec and position angle). If any component of the momentary attitude diverges from the same component of the baseline attitude by more than the respective limit, that component of the baseline attitude is set to the momentary value; components which have not wandered out of bounds are left unaltered. Note also that a change of bin due to change of success of attitude call does not in itself alter the baseline. If a new bin starts because the calls have returned to the successful state, the attitude assigned to the new bin is the baseline value, which is also the attitude of the last `successful' bin.
This binning scheme is perhaps a little complicated, but has been chosen so as to adhere as closely as possible to the original attcalc scheme. However note that the component limits are calculated in a different way to attcalc (see section 3.2).
XMM-Newton SOC -- 2023-04-16