Reconstruction of the sky from the detector image can only be done if during the recording of the photons the pointing of the instrument is within narrow bounds. The satellite is guaranteed to maintain its pointing stability within an error of 1 arcminute and the absolute pointing error is guaranteed to be exact within 3 arcminutes. For the WFC having a field of view of about 40 degrees the error in absolute pointing is not very critical. In order to prepare for larger instability than expected or allowed the following three programs have been implemented: a. Program 'watproc' copies the raw attitude file for each instrument separately and adds information about Observing Mode (Normal/Slew) plus the position of the Earth w.r.t. the camera. From the Ephemeris data that gives the location of the satellite is calculated the centre of the Earth in the camara coordinates km in X, Y and Z). b. Program 'wattana' analyzes the attitude data and establishes a number of clusters so that actual pointings belonging to one cluster are within the permitted maximum limits from the center or nominal pointing of that group. Such a nominal pointing is characterized by Right Ascension, Declination and North Angle. For each of these a maximum range can be specified, both for Normal Pointing or Slewing Operational Mode. The result will be a file that contaions the list of all calculated Nominal Pointings. In the case of ideal stability it shall of course have only one. It is envisaged to run this analysis standardly over the complete Observing Period (one FOT). c. Program 'wshift' will shift the position of each individual photon event over the detector to the position that is would have had if the detector had positioned to a reference pointing. The reference pointing will be the closest from a set of Nominal Pointings as calculated by 'wattana'. As the shift is done of a part of the Observation Period only a subset of the Nominal Pointings will be used. A file containing the Time Intervals per Nominal Pointing is produced in order to enable the separate processing the of photon events of one Nominal Pointing at a time as is required by the correlation programs of Stage-II proceswsing which can operate only on one accumulated detector image. The layout of such a Nominal Pointing Interval (NPI) file is identical to those of the Good Time Interval (GTI) files, but with an extra column containing the number of the Nominal Pointing. If only one NP is calculated and the range of the photon detector positions is very small it is possible to skip the shifting of the events altogether and pass the event datafile directly to Stage-II processing. Here is flow of the attitude processing of several FOTs (having same target): FOT | V ========== wfotfits ========== | | | | |-->FOTID1_0000__att0 ------ | | | | | | |-->FOTID1_0000__obs0 ---- | | | | | | | V |-->FOTID1_0000__eph0 -- | | | FOTID3_0000w#att1 | | | | V | | V V V FOTID2_0000w#att1 | | ========= | | | watproc | | | ========= | | | | -------------- | | | | | | |-->FOTID1_0000w1att1 --->>> | | | | | | | |-->FOTID1_0000w2att1 -------- | | | | | | | | | - | V V V | | ========= | | wattana | | ========= | | | | | V | | MERGED_0000__pnt1 |-->FOTID1_####w2prn0 -- | | | | | | | | | ----------- | V ----- | | ============ | | V filter | | V processing | | V ============ | | | V V V ======== FOTID1_%%%%w2prn1 ------> wshift | ======== | | | | | --------------- | | | | V V | FOTID1_%%%%w2prn2 FOTID1_%%%%w2npi2 | | | | | | | V | | ============ | -----------> Stage-II <---------- processing ============