NAME

aspect -- calculate the mean pointing for an attitude file.


USAGE

         aspect infile outfile verbose

DESCRIPTION

This tool calculates the mean pointing for a given attitude file. In reality the calculation is more complex than a simple mean. The algorithm is to first create a histogram of the amount of time spent at each R.A. and Dec, then to pick the bin with the largest time and calculate the mean R.A., Dec. and Roll Angle of the spacecraft axes while the Z axis was in this bin.

This method avoid problems when the attitude is stable for most of the observation, but has a large motion at the beginning or end of the file due to settling or slewing.

In general telescope axes are not aligned perfectly with the spacecraft axes. The tool is able to read an optional misalignment matrix, in which case the result is orientation of a set of axes offset from the spacecraft axes.

Users may optionally create a new attitude file with the mean pointing. This file will be valid during the time span of the input attitude file, or the input GTIs, whichever is more restrictive.


PARAMETERS

attfile [string]
This is the name of the attitude file to be read.

alignfile [string]
If this parameter is set to "NONE" then the results will give the mean orientation of the spacecraft axes. If the name of a file containing a misalignment matrix is given, then the results will be the mean orientation of axes offset from the spaceraft axes. The value "CALDB" indicates to retrieve the alignment file from the calibration database. The format for the misalignment matrix is the same as for TELDEF files (i.e. used ALIGNnm keywords in the primary header).

(nbins = 100) [integer]
Number of bins to use in attitude histogram. Since the histogram is two dimensional the total number of bins is nbins*nbins

(binsize = 0.01) [real]
Ideal size of a bin in degrees. This value should ideally be set close to the error in the pointing stability.

(maxrot = 0.01) [real]
Maximum rotation angle between adjacent attitude "point" when binning the attitude in degrees. Smaller values will cause the program to run more slowly, but higher values may represent quick motions incorrectly. The best value is close to binsize.

(ra) [real]
The mean Right Ascension is written to this parameter in decimal degrees.

(dec) [real]
The mean Declination is written to this parameter in decimal degrees.

(roll) [real]
The mean Roll Angle is written to this parameter in decimal degrees.

(newattfile = NONE) [string]
Name of new attitude file to be created, or NONE.


EXAMPLES


BUGS

CATEGORY

Jun99 attitude.aspect