attjumpcorr - correct Swift attitude files for jumps


attjumpcorr infile outfile


The Swift spacecraft is known to report small (~arcminute) jumps in attitude while settling into pointing mode. It is believed that these jumps are not physical, but rather the result of a change of state within the spacecraft attitude control system. In particular, the jumps, if present, should occur after entering "10 arcminute" aquisition state, but before entering the "settled" state.

This task removes large magnitude jumps from Swift attitude files that have the above behavior. The magnitude of a detectable jump is governed by the "jumpthresh" parameter, expressed in arcsec/second. Both the spacecraft quaternions and the pointing vectors (R.A., Dec., and Roll) are adjusted.

The task has two correction methods. When method=CONSTANT, the attitude is assumed to be constant across the jump. When method=LINEAR, a constant slew slew rate is assumed.

After adjustment, the attitude file will of course still contain normal slews, so it is the user's responsibility to account for this while analyzing science data. However, sudden jumps in the attitude, during the settling phase after a slew, should be removed.

attjumpcorr has two safety mechanisms. Jumps larger than jumpmax arcseconds are ignored (in case the jump is "real"). If the number of jumps in a given slew exceeds njumpmax then the slew is ignored (the rationale being, if there are many jumps, there must be an uncorrectable error in the attitude data).


infile [filename]
The name of the input attitude file

outfile [filename]
The name of the output (adjusted) attitude file

(method = "LINEAR") [string]
Method of correction, either LINEAR (assume constant rate slew across jump) or CONSTANT (assume constant attitude across jump).

(maxgap = 60.0) [real]
Time gaps in the file larger than this value, in seconds, cause the algorithm to assume that a slew has occurred.

(jumpthresh = 20.0) [real]
If angular changes in the attitude file from one sample to the next, as measured in arcsec per second, are larger than this value, then a jump is assumed. A maximum one jump is allowed per slew (the largest is found).

(jumpmax = 600.0) [real]
Angular attitude jumps larger than jumpmax (in arcsec) are ignored.

(njumpmax = 2) [integer]
If the number of jumps in a given slew exceeds njumpmax, then the slew is ignored.

(clobber = NO) [boolean]
If the output file already exists, then setting "clobber = yes" will cause it to be overwritten.

(chatter = 2) [integer, 0 - 5]
Controls the amount of informative text written to standard output. Setting chatter = 1 produces a basic summary of the task actions; chatter = 2 (default) additionally prints a summary of input parameters; chatter = 3 prints a summary of each attitude jump; chatter = 5 prints extensive debugging information.

(history = YES) [boolean]
If history = YES, then a set of HISTORY keywords will be written to the header of the specified HDU in the output file to record the value of all the task parameters that were used to produce the output file.


1. Corrects the attitude file for jumps using the default parameters,

     attjumpcorr input.att output.att