3.2 Initial Data Processing - calfgsa

The STSDAS task calfgsa (in hst_calib.calfgs) accomplishes several general tasks, regardless of whether the observations were gathered in Position Mode or Transfer Mode. The pipeline:

  1. Reads the seven GEIS files belonging to each individual observation.
  2. Identifies the FGS used for the observations and its observing mode.
  3. Identifies any potentially missing files.
  4. Determines the status of the guiding FGSs, checking whether zero, one, or two FGSs were actively maintaining the pointing of the telescope and whether they were guiding in CoarseTrack or FineLock.
  5. Inspects the flags/status bits to determine whether the astrometry observation succeeded or failed, and in the case of a failure, to identify the reason for the failure.

  6. Prepares output files with keywords whose values are either extracted from the input header files or computed from contents of the data files.
  7. Assesses the data quality of successful observations, masking outliers, ­garbled telemetry, and telemetry dropouts. (Outliers are data that do not appear to be garbled but make no sense when viewed in the context of neighboring data points.)

3.2.1 calfgsa and Transfer Mode Data

The data acquired during a Transfer Mode observation include the initial target acquisition sequence in addition to the individual target scans. (see the FGS Instrument Handbook for details on target acquisition). Processing Transfer Mode data with calfgsa is limited to locating each scan in the astrometer’s data file, editing out bad data (due to telemetry drop-outs, etc.), and determining the median position and standard deviations of guide star positions in the guiding FGSs during each Transfer Mode scan.

The pipeline generates three ASCII files for every scan, one for each FGS. Each file contains the 40 Hz raw star selector A and B encoder angles, used to derive the x- and y-position of the FGS’s Instantaneous Field of View (IFOV) at all times along the scan, and the photon counts per 25msec in each of the four photomultiplier tubes (PMTs). The guide star data, which spans the entire Transfer Mode observation, are provided for (optional) de-jittering of the astrometer’s IFOV during post-pipeline processing. Each of these files begins with a small header containing keywords whose values pertain globally to the observation or specifically to the scan, such as the observed filter or the universal time (UT) at the start of the scan. The HST state vector is also included in the header.

The calfgsa task does not carry out further processing of Transfer Mode data. This is most appropriately left to the programs and tasks discussed in Chapter 4.

An example of a session using calfgsa to process Transfer Mode data from the FGS calibration program 8834 (data set f6b00201m) is shown below. 

te> calfgsa
Input observation (or list) (@obs.list): f6b00201m    
Reference directory (/data/phoenix4/testcalfgs/refdir/fgsa_ref/):<ret> 
Earth ephemeris (/data/phoenix4/testcalfgs/de200.fits): <ret>
Log file (log): <ret>
 processing obs: .......... -> F6B00201M
 observing mode ........... -> TRANSFER
 number of samples ........ ->  35360
 filter ................... -> F583W
 target magnitude ......... ->  9.70
 target_id ................ -> 8834_1
 obs date ................. -> 2000 356 08:10:17
 telemetry format ......... -> FN
 
 target_name:latcol-a
 
 writing data files for scan# :   1
 writing data files for scan# :   2
 writing data files for scan# :   3
 writing data files for scan# :   4
 writing data files for scan# :   5
 writing data files for scan# :   6
 writing data files for scan# :   7
 writing data files for scan# :   8
 writing data files for scan# :   9
 writing data files for scan# :  10
 writing data files for scan# :  11
 writing data files for scan# :  12
 writing data files for scan# :  13
 writing data files for scan# :  14
 writing data files for scan# :  15

In this example, calfgsa outputs 45 files (3 FGSs × 15 scans), each containing the 40 Hz star selector angles and PMT photon counts from each FGS for a specific scan. These files will follow the naming convention rootname.isn, where "rootname" is the unique exposure ID (in this example, f6b00201m), i = 1,2,3 identifies the FGS, and n identifies the number of the Transfer Mode scan. Thus the file f6b00201m.1s13 contains data from FGS1 for scan #13.

An excerpt from a calfgsa output file for Transfer Mode data is shown below.

OBS ID ..................... -> F6B00201M
 ------------------------------------------------------
         HST STATE VECTOR at "OBS date"
   OBS date .................................... -> 2000 356:08:14:05.574
   X_POS (km) .................................. ->  4195.629
   Y_POS (km) .................................. ->  4741.467
   Z_POS (km) .................................. -> -2901.636
   X_VEL (km/sec) .............................. ->  -4.945
   Y_VEL (km/sec) .............................. ->   5.457
   Z_VEL (km/sec) .............................. ->   1.746
 ------------------------------------------------------
   observing mode .............................. -> TRANSFER
   FGS ID of this data file .................... -> 1
   astrometer FGS .............................. -> 1
   target_id ................................... -> 8834_1
   magnitude ................................... ->   9.70
   filter ...................................... -> F583W
   scan ID ..................................... ->   3
   start_pixel ................................. ->   8000
   end_pixel ................................... ->  10286
   total samples ............................... ->   2287
   scan_length ................................. ->  2.538 (arc seconds)
   median x position ........................... ->   -3.3134
   median y position ........................... ->  726.1536
   median x position, diff velab corrected ..... ->   -3.3136
   median y position, diff velab corrected ..... ->  726.1535
   standard deviation of x ..................... ->   0.6118
   standard deviation of y ..................... ->   0.6126
   total number of scans ....................... ->  15
 
 column 1   -> RAW star selector theta_A
 column 2   -> RAW star selector theta_B
 column 3   -> PMTXA counts / 25 msec
 column 4   -> PMTXB counts / 25 msec
 column 5   -> PMTYA counts / 25 msec
 column 6   -> PMTYB counts / 25 msec
 column 7   -> FGS flags/status
 
    SSA       SSB     PMTXA   PMTXB   PMTYA   PMTYB     FLAGS
   335827    707821    1308    1194    1151    1255    DV,FL,SP
   335826    707820    1312    1153    1144    1352    DV,FL,SP
   335827    707821    1296    1211    1108    1316    DV,FL,SP
   335826    707821    1324    1153    1141    1258    DV,FL,SP
   335827    707820    1307    1211    1181    1306    DV,FL,SP
   335826    707817    1313    1141    1083    1319    DV,FL,SP
   335829    707816    1383    1140    1163    1297    DV,FL,SP
   335828    707817    1295    1205    1131    1338    DV,FL,SP

calfgsa also produces an ASCII file named "rootname.tab" (e.g., f6b00201m.tab) which contains information pertinent to the entire exposure, not just individual scans. An example of a (Position Mode) *.tab file is shown in Section 3.4.

3.2.2 calfgsa and Position Mode

Position Mode observations with the FGS are primarily used for wide angle (>10") astrometric studies, such as parallax determinations and/or the measurement of a star’s reflex motion in response to the gravitational influence from a bound companion. These programs employ an observing technique where the target star and several nearby reference stars (also in the FGS Field of View) are observed in a sequential fashion as many times as possible during the visibility period of HST’s orbit (see the FGS Instrument Handbook for more details about Position Mode observing). Typically, on the order of twenty individual exposures are obtained in a Position Mode visit.

Two pipeline processors, first calfgsa and then calfgsb, are used to process the Position Mode data. For each observation, calfgsa sequentially ingests the raw GEIS file and inspects the flags and status bits to determine if the observation was successful. If the observation succeeded, calfgsa extracts the 40 Hz star selector encoder angles and PMT counts, masks out bad data, and computes the median (x, y) centroid of each star in FGS detector-space during the FineLock/DataValid (FL/DV) interval (when the FGS was tracking the star’s interferometric fringes). The average PMT counts during the FL/DV interval are determined. The same quantities for the guiding FGSs are computed over the identical time interval.

The most convenient way to process a visits’s worth of data with calfgsa is to input a file which contains the rootnames of the exposures contained within the visit.

An example using calfgsa to process the Position Mode data from the FGS calibration program 8897 (monitoring the scale and distortions of the FGS1r Field of View) is given below. In this example, the exposures have rootnames f6iy0301m, f6iy0302m, f6iy0303m, ..., f6iy030zm, a total of 45 exposures. These rootnames are listed, one entry per line, in the user-generated file obs.list

cl> calfgs
      calfgsa  calfgsb  
te> calfgsa
Input file (or list) (f6b00201m): @obs.list
Reference directory (refdir/fgsa_ref/): 
Earth ephemeris (refdir/de200.fits): 
Log file (log): 
  
 processing obs: .......... -> F6IY0301M
 observing mode ........... -> POSITION
 number of samples ........ ->   3960
 filter ................... -> F583W
 target magnitude ......... ->  9.47
 target_id ................ -> 8897_83
 obs date ................. -> 2001 354 11:03:34
 telemetry format ......... -> FN
 
 target_name: M401
 
 processing obs: .......... -> F6IY0302M
 observing mode ........... -> POSITION
 number of samples ........ ->   2996
 filter ................... -> F583W
 target magnitude ......... -> 10.95
 target_id ................ -> 8897_56
 obs date ................. -> 2001 354 11:05:14
 telemetry format ......... -> FN
 
 target_name: M297
 
 processing obs: .......... -> F6IY0303M
 observing mode ........... -> POSITION
 number of samples ........ ->   2838
 filter ................... -> F583W
 target magnitude ......... -> 13.25
 target_id ................ -> 8897_141
 obs date ................. -> 2001 354 11:06:30
 telemetry format ......... -> FN
 
 target_name: M252

While processing the data sets associated with each exposure, calfgsa produces the output *.tab files, such as f6iy0302m.tab. These contain the median (x, y) FGS detector-space centroid of the star's position in that exposure, along with other data needed for further processing by calfgsb. The content of f6iy0302m.tab is available as an example from the FGS Website.

These contain the median (x, y) FGS detector-space centroid of the star’s position in that exposure, along with other data needed for further processing by calfgsb. As an example, the content of f6iy0302m.tab is shown in “calfgsa Output: The *.tab File”.