Document title: Documentation for the DE SAI mission analysis file data on NDADS Project: DE NDADS Datatype: SAI Super-EID: DOCUMENT There may be other documents also identified by this super-EID. NDADS filename: DOCUMENT_SAI_SAIDOC.SFD TRF entry B46577.txt in NSSDC's controlled digital document library. Feb. 1998. Document text follows: ---------------------- TYPE_OF_FILE_NAME: SAI MISSION ANALYSIS FILE FILE_ATTRIBUTES: Variable length unformatted sequential file RECORD_TYPE_NAMES: Header record, scan line record RECORD_LENGTH: A. HEADER_RECORD: 404 bytes B. SCAN_LINE_RECORD: variable, to a maximum of 1600 bytes TYPE_OF_FILE_DESCRIPTION: An SAI mission analysis file (MAF) contains the pixels of one image from one photometer. An image is made up of all consecutive scans of the photometer without changes in mirror stepping direction. For the next image the stepping mirror advances in the opposite direction. The MAF is organized with a header record which describes the file, the spacecraft position during the image, and the number, N, of scan lines in the file. This is followed by N individual scan line records, each containing the mirror position and the pixel data collected during that scan. Most MAFs have been reduced to a thirty-five degree region centered on the nadir direction (center of Earth) rather than including all pixels within the nominal 120 or 360 degree scan line. The number of pixels deleted at the start of the scan and the number of pixels included are given in each scan line record. FILE_STRUCTURE: unformatted sequential file with segmented records of variable length DATA_TYPES: All numbers stored in single byte fields have integer values 0 to 255. Numbers stored in longer fields are represented as two's complement integers. FORMAT_OF_THE_HEADER_RECORD: BYTE# FIELD NAME DEC TYPE DESCRIPTION 1-2 RECORD LENGTH (WORDS) I*2 total header record length in units of 16-bit words 3-4 FILE TYPE, BLOCKING FACTOR I*2 4*256 + 1 5-6 RECORD LENGTH (BYTES-4) I*2 header record length in units of bytes less 4 7-8 ZEROS I*2 0000 9-12 FILE TYPE I*4 4 13-16 YEAR MOD 1000 I*4 \ UT of last TM minor frame 17-20 DAY OF YEAR I*4 > #0 mod 16 before 21-24 MILLISECONDS OF DAY I*4 / start of image 25-28 PHOTOMETER ID I*4 1 = A, 2 = B, 3 = C 29-32 FILTER WHEEL VOLTAGE I*4 units of 0.02V; unconverted position count may be used to identify filter properties as in Table 1 below 33-36 FILTER WHEEL CODE I*4 four ASCII characters; see Table 1 below 37-40 FILTER WHEEL TEMPERATURE I*4 conversion given below in Table 2 41-44 FIRST MIRROR LOCATION COUNTER I*4 \ mirror ranges given 45-48 LAST MIRROR LOCATION COUNTER I*4 / below in Table 3 49-52 NUMBER OF SCAN LINE RECORDS I*4 number of records following the header record 53-56 NUMBER OF PIXELS IN IMAGE I*4 total number of pixels in this image 57-60 MAXIMUM PIXELS IN SCAN I*4 maximum number of pixels contained in any scan line in this image 61-64 MINIMUM COMPRESSED COUNT I*4\ pixel count statistics 65-68 6% COMPRESSED COUNT I*4 \ for color scaling; 6% 69-72 50% COMPRESSED COUNT I*4 > to 94% levels are 73-76 94% COMPRESSED COUNT I*4 / recommended for 77-80 MAXIMUM COMPRESSED COUNT I*4/ color scale range 81-84 GREY SCALE MIN (6% COUNT) I*4 recommended grey scale 85-88 GREY SCALE MAX (94% COUNT) I*4 range 89-92 PHOTOMETER DIGITAL HOUSEKEEPING I*4 first 32 bits, see Table 4 below 93-96 HOUSEKEEPING, RELAY STATUS I*4 final 24 bits of photometer digital housekeeping plus 8 bits for relay status; see Table 4 below 97-100 DATA CONTROL UNIT (DCU) MINOR-MODE-COMMAND BYTES I*4 see Table 5 below 101-116 ANALOG SUBCOM I*4 one value per byte as shown in Table 6 below 117-120 ORBIT NUMBER I*4 orbit number 121-124 X(SCPOS) GEI I*4 \ 125-128 Y(SCPOS) GEI I*4 > GEI coordinates in meters 129-132 Z(SCPOS) GEI I*4 / for spacecraft position 133-136 X(SPIN) GEI I*4 \ 137-140 Y(SPIN) GEI I*4 > GEI angular momentum 141-144 Z(SPIN) GEI I*4 / vector; unit vector * 1.E6 145-148 X(NORMAL TO ORBIT) GEI I*4 \ 149-152 Y(NORMAL TO ORBIT) GEI I*4 > GEI vector normal to orbit 153-156 Z(NORMAL TO ORBIT) GEI I*4 / plane; unit vector * 1.E6 157-160 UI IMAGE PRODUCTION DATE I*4 YDDD(BCD), seconds(binary) 161-164 X(VEL) GEI I*4 \ 165-168 Y(VEL) GEI I*4 > GEI spacecraft velocity 169-172 Z(VEL) GEI I*4 / vector; millimeters/sec. 173-176 X(SUN) GEI I*4 \ 177-180 Y(SUN) GEI I*4 > GEI vector toward sun, 181-184 Z(SUN) GEI I*4 / unit vector * 1.E6 185-188 S/C SPIN RATE I*4 S/C spin rate with respect to nadir, in microradians/sec. (not always present) 189-192 MILLISECONDS OF DAY FOR O/A I*4 UT as msec. of day for orbit/attitude data above (if start UT is near end of day, O/A UT may be on next day) 193-196 AVERAGE SPIN PERIOD, NADIR I*4 \ three samples of 197-200 AVERAGE SPIN PERIOD, MINIMUM I*4 > average spin period in 201-204 AVERAGE SPIN PERIOD, MAXIMUM I*4 / msec. during image time 205-206 SCAN LINE NADIR CORRECTION FLAG I*2 LSB = 1 if corrections have been done, 0 if not 207-372 SPARE BYTE 373-380 RESERVED BYTE reserved 381-388 ASCII FILE NAME BYTE original sequence name 389-390 IMSYNC VERSION, LEVEL I*2 production software version number*64 + level 391-394 SPARE BYTE 395-396 SCAN LINE OFFSET I*2 pixel offset to start of scan lines; a negative offset indicates a reconstructed advanced- nadir-reference image 397-404 SPARE BYTE FORMAT_OF_THE_SCAN_LINE_RECORD: BYTE# FIELD NAME DEC TYPE DESCRIPTION 1-2 RECORD LENGTH (WORDS) I*2 total scan line record length in units of 16-bit words 3-4 RECORD LENGTH (BYTES-2) I*2 scan line record length in units of bytes less 2 5-8 MILLISECONDS OF DAY I*4 UT at last minor frame #0 mod 16 9 DIGITAL MIRROR LOCATION COUNTER BYTE see table 3 for MLC range 10 ANALOG MIRROR LOCATION BYTE units of 0.02V; for conversion to digital MLC, see table 7 11 ANALOG FILTER WHEEL POSITION BYTE units of 0.02V; unconverted position count may be used to identify filter properties as in Table 1 below 12 S/C CLOCK SUBCOM COUNTER BYTE subcom count at half- second start minor frame (0,8,16,...,112,120) 13-14 DCU COUNT (FULL 16 BITS) I*2 elapsed time on 8192 Hz clock from nadir pulse to next half-second sync 15-16 PIXEL OFFSET TO START OF SCAN I*2 offset from nadir pulse to start of scan line in pixels; a negative offset indicates a reconstructed advanced- nadir-reference image 17-18 BODY MOUNTED HORIZON SENSOR (BMHS) NADIR CORRECTION I*2 \ units of 8ths of pixels; 19-20 SUN SENSOR NADIR CORRECTION I*2 > sum of the three fields 21-22 MANUAL NADIR CORRECTION I*2 / gives total correction; - sign moves scan up (earlier), + sign moves scan down (later) 23-24 ORDER OF NADIR CORRECTIONS I*2 last four correction methods, BCD; most recent shifted into least significant position; 1=BMHS, 2=Sun, 3=Manual; if pixel offset is negative, see Note 2 below 25 PIXEL 1 IMAGE DATA BYTE\ units of compressed 26 PIXEL 2 IMAGE DATA BYTE \ counts; for count . . . \ decompression and . . . / conversion to . . . / luminosity, see n+24 PIXEL n IMAGE DATA BYTE/ Note 1 below Note 1. Pixel decompression and conversion to luminosity The compressed telemetry count is r = 16y + x where x and y are the decimal equivalents of the four low-order and four high-order bits, respectively. The true number of counts per image pixel is R, where / x y=0 / R = \ y-1 \ (x+16)2 y>0 If r > 127 the protective circuit has been activated and the data are to be ignored. True counts can be converted to line-of-sight intensities in kilorayleighs by dividing by the sensitivities given in the Table 1 below [see Frank et al., Space Science Instrumentation, vol. 5, pp. 369-395 (1981)]. The conversion factors provided here are based upon pre-launch laboratory calibrations. No corrections are made here for long term changes in sensitivity at VUV wavelengths, which are known to have occurred in flight [see Rairden et al., Journal of Geophysical Research, vol. 91, pp. 13,613-13,630 (1986)]. Initial work in the first two years after launch has revealed no obvious degradations at visible wavelengths. No additional work has been done on inflight calibrations. Note 2. Additional scan line adjustment for reconstructed advanced- nadir-reference images For reconstructed images from advanced-nadir-reference operations, the order-of-pixel-corrections field (scan line record bytes 23-24) is replaced by a correction to be applied to the first 75 pixels in that scan line. This offset is in units of 1/100ths of pixels. The standard pixel corrections should be applied as usual to the entire scan line, then the first 75 pixels should be adjusted by this correction. As with the standard correction, a positive correction indicates the pixels are to be moved down in the display, and a negative correction indicates they should be moved up. The size of this correction will be half of a pixel or less. (See IMAGE_DISPLAY_ALGORITHM below for more information on pixel alignment.) IMAGE_DISPLAY_ALGORITHM: The header record specifies the number of scan line records in bytes 49-52 and a maximum number of pixels per scan line in bytes 57-60. The maximum number of pixels plus 24 is the maximum size of a scan line. The actual number of pixels in a scan line is specified by the number given in bytes 3-4 of the scan line record minus 22. Each pixel requires one byte. The header record is usually retained while reading each scan line consecutively into another array. Successive pixels within a scan line are conventionally displayed from top to bottom on the display screen. The mirror location counter (MLC) gives the scan line's relative position left to right, as shown in Table 3. Three adjustments described below may be applied to position pixels correctly in the scan direction. The first (#1) must be applied to all scan lines. The second (#2) is needed for certain lines in images with early production dates. The third (#3) is only appropriate for reconstructed advanced-nadir-reference images. This special type of image file can be identified by the presence of a negative scan line offset in bytes 395-396 of the header record. The three adjustments are as follows: #1. The sum of the nadir correction fields, bytes 17-18, 19-20, and 21-22, should be applied to each scan line. Added together, these three fields give a correction in eighths of pixels for irregularities in S/C nadir determination. A negative total correction indicates the scan line should be shifted up on the screen by that amount, and a positive value indicates a shift down. #2. An additional correction should be made for an early processing problem if the UI image production software version and level number, as it appears in header record bytes 389-390, is less than 195. If the DCU count (scan line record bytes 13-14) taken mod 32 is 0, then the scan line should be shifted up one pixel, as in the following algorithm: IF ( (version#*64+level).LT.195 .AND. MOD(DCU,32).EQ.0 ) shift scan line up one pixel. #3. If the scan line offset in header record bytes 395-396 is negative, an additional adjustment may be applied to the first 75 pixels in the scan line. The size of this adjustment will be at most half a pixel, and therefore may not be significant for all applications. The correction is found in scan line record bytes 23-24 and is in units of 1/100ths of a pixel. The sign convention is the same as for #1 above: a positive correction means the pixels should be shifted down by that amount, a negative correction means an upward shift, assuming the scan is oriented from top to bottom. This adjustment is to be applied only to the first half of the scan line, not to the second half. The pixel histogram values given in header record bytes 61-88 may be helpful for establishing the color table settings. Operation of the photometer electronic guardian (which protects the sensor in the presence of excessive light levels) is indicated by setting the most significant bit of the 8-bit pixel word. In this case, pixel values are greater than 127 and are usually shown as saturated or blacked out. Pixel values of 255 indicate fill data. The [SSC] directory on this volume includes source code for image display software. All the necessary corrections and adjustments for scan line alignment are included in that software source code. TABLES: Table 1. Filter codes, positions, and sensitivities PHOTOMETER A filter filter analog filter wheel sensitivity in number code position range (counts) counts/(kilorayleigh-pixel) -4 1 360Z 100-108 2.3x10 -4 2 317Z 118-126 5.7x10 3 630W 136-144 0.88 4 557W 154-162 2.40 5 391W 172-180 3.31 6 394B 190-198 1.96 7 626B 208-216 1.08 8 630W 226-234 0.78 9 557N 244-246 1.30 10 391N 46-54 2.33 11 630N 63-71 0.66 12 557N 81-89 1.60 PHOTOMETER B filter filter analog filter wheel sensitivity in number code position range (counts) counts/(kilorayleigh-pixel) -4 1 629C 61-69 3.2x10 2 630N 81-89 1.31 3 557N 101-110 2.40 4 391N 121-131 4.49 5 630N 142-151 1.19 -4 6 317Z 163-172 4.5x10 7 482M 184-192 7.40 8 554B 203-212 3.85 9 557W 223-232 4.85 10 390W 1-10 5.84 11 630W 21-30 2.00 12 557W 41-49 4.64 PHOTOMETER C filter filter analog filter wheel sensitivity in number code position range (counts) counts/(kilorayleigh-pixel) 1 136W 90-98 1.65 2 123W 109-117 3.08 3 120W 128-136 3.10 4 140N 147-155 1.27 5 136W 166-174 2.05 6 125N 185-194 1.71 7 123W 204-212 3.08 8 117N 223-231 0.84 9 140N 241-246 1.26 10 125N 36-43 1.80 11 117N 53-61 0.91 12 117A 72-80 10.5 Table 2. Temperature conversion table (note: temperature measurements were not obtained after day 175 of 1984 due to a malfunction in the spacecraft data system) TM# deg C TM# deg C TM# deg C TM# deg C TM# deg C 0-6 150 34 51 77-78 23 153-154 - 5 223-224 -34 7 144 35 50 79-80 22 155-157 - 6 225 -35 8 138 36 49 81-82 21 158-160 - 7 226 -36 9 96 37 48 83-84 20 161-163 - 8 227 -37 10 93 38 47 85-87 19 164-166 - 9 228-229 -38 11 89 39 46 88-90 18 167-169 -10 230-231 -39 12 86 40-41 45 91-92 17 170-172 -11 232 -40 13 83 42 44 93-95 16 173-174 -12 233-234 -41 14 80 43 43 96-98 15 175-177 -13 235 -42 15 78 44 42 99-100 14 178-180 -14 236 -43 16 76 45 41 101-102 13 181-183 -15 237 -44 17 74 46-47 40 103-105 12 184-185 -16 238 -45 18 72 48-49 39 106-108 11 186-188 -17 239 -46 19 70 50 38 109-111 10 189-190 -18 240 -47 20 68 51-52 37 112-113 9 191-193 -19 241 -49 21 66 53 36 114-116 8 194-195 -20 242 -50 22 65 54-55 35 117-119 7 196-198 -21 243 -51 23 63 56 34 120-122 6 199-200 -22 244 -52 24 62 57-58 33 123-125 5 201-203 -23 245 -54 25 61 59-60 32 126-128 4 204-205 -24 246 -55 26 59 61-62 31 129-131 3 206-207 -25 247 -57 27 58 63-64 30 132-134 2 208-209 -26 248 -59 28 57 65-66 29 135-137 1 210-211 -27 249 -61 29 56 67-68 28 138-140 0 212-213 -28 250 -63 30 55 69-70 27 141-143 -1 214-215 -29 251 -66 31 54 71-72 26 144-146 -2 216-217 -30 252 -69 32 53 73-74 25 147-149 -3 218-219 -31 253 -73 33 52 75-76 24 150-152 -4 220-221 -32 254 -79 222 -33 255 -85 Table 3. Mirror location counter (MLC) ranges, assuming vertical orientation of scan lines leftmost center rightmost MLC MLC MLC photometer A 141 80 21 photometer B 133 73 13 photometer C 28 90 148 When the spacecraft is aligned with its rotation axis normal to the orbit plane, (1) the center scan line is coplanar with the orbit plane, and (2) the angular momentum vector is directed to the left, opposite to the direction of the orbital angular momentum vector. Table 4. Photometer digital housekeeping and relay status Bit extraction and bit testing functions such as the VAX FORTRAN intrinsic functions IBITS and BTEST are useful for decoding the bit fields. First 32 bits (MSB=bit 31) -------------------------- bit 31: filter wheel moved since last sample, 1 = moved. bit 30: filter wheel at the position switch, 0 = at position switch. bit 29: mirror stepping enable, 1 = enabled. bit 28: origin search in progress, 1 = in progress. bit 27: mirror limit switch activated since last sample, 1 = activated. bit 26: bit no.27 indication, upper(CW) or lower(CCW), 1 = upper limit(CW). bit 25: PM tube gain level, 0 = low gain. bit 24: mirror search for restricted range, 1 = in progress. bit 23: lower limit switch, backup, 1 = activated. bit 22: lower limit switch, primary, 1 = activated. bit 21: upper limit switch, backup, 1 = activated. bit 20: upper limit switch, primary, 1 = activated. bit 19: nadir bypass status, 0 = normal, 1 = bypassed. bit 18: filter heater element, 1 = power applied. bits 17-16: spare - zeroes. bits 15-8: 8-bit mirror position code, high limit if in restricted range. bits 7-0: 8-bit mirror position code, low limit if in restricted range. Second 32 bits (MSB=bit 31) -------------------------- bit 31: move mirror position one step on 0 to 1 transition only. bit 30: move mirror to origin on 0 to 1 transition only. bit 29: move direction for bits 1-2, up(CW) or down(CCW), 1 = down(CCW). bit 28: mirror range, full or restricted, 1 = restricted. bit 27: alternate filter cycles, 1 = no. bit 26: filter wheel direction, up(CW) or down(CCW), 1 = down(CCW). bit 25: filter wheel to position switch on 0 to 1 transition only. bits 24-22: 3-bit filter wheel code (see Note 3). bits 21-19: 3-bit photo-transistor sensitivity code, 000=most sensitive. bit 18: photo-transistor no. 2 on/off, 1 = off. bit 17: photo-transistor no. 1 on/off, 1 = off. bit 16: guardian on/off, 1 = off. bits 15-8: 8-bit photometer identification, photometer A: 00000000 photometer B: 00001111 photometer C: 11110000. bit 7: spare. bit 6: collimator cover heater connector no. 1 on/off, 1 = on. bit 5: PM protection enabled, 0 = enabled. bit 4: collimator-cover switch no. 1 on/off, 1 = on. bit 3: collimator-cover switch no. 2 on/off, 1 = on. bit 2: collimator-cover heater connector no. 2 on/off, 1 = on. bits 1-0: spare. Note 3: 000 = 5 deg. 001 = 30 deg. 010 = 60 deg. 011 = 90 deg. 100 = 120 deg. 101 = 150 deg. 110 = 180 deg. 111 = alternate mode selection (30 deg.) Table 5. DCU minor mode command (MSB=bit 31) The VAX FORTRAN intrinsic functions IBITS and BTEST are recommended for decoding the bit fields. bits 31-16: 16-bit internal nadir generator code (INGC), generated spin period is (INGC+1)*3./16384. bits 15-11: spare. bits 10-9: 2-bit sector code, nadir pulse C (see Note 4). bit 8: spare. bits 7-6: 2-bit sector code, nadir pulse B (see Note 4). bit 5: spare. bits 4-3: 2-bit sector code, nadir pulse A (see Note 4). bit 2: spare. bits 1-0: 2-bit nadir pulse source code, 00,11 = normal nadir pulses, 10 = advanced nadir pulses, 01 = internal nadir generator. Note 4. at nadir pulse the sector A B C sector code the photometer selected is is ------ -------------------------- ------ 00,11 A B C 1 01 B C A 3 10 C A B 2 Table 6. Photometer analog housekeeping subcom (not available after day 175 of 1984 due to a malfunction in the spacecraft data system) The VAX FORTRAN intrinsic function IBITS is recommended for decoding the bit fields. First 32 bits (MSB=bit 31) -------------------------- bits 31-24: thermistor no. 5 temperature. bits 23-16: thermistor no. 6 temperature. (For temperature conversion, bits 15-8: thermistor no. 7 temperature. see table 2.) bits 7-0: thermistor no. 8 temperature. Second 32 bits (MSB=bit 31) -------------------------- bits 31-24: +5V to logic (6.667/256.*count). bits 23-16: +5V to PM tube, 1st relay (6.667/256.*count). bits 15-8: -10V (-15./256.*count). bits 7-0: thermistor no. 9 temperature. Third 32 bits (MSB=bit 31) -------------------------- bits 31-24: regulated bus current (500./256.*count). bits 23-16: +5V to PM tube, 2nd relay (6.667/256.*count). bits 15-8: +10V (15./256.*count). bits 7-0: +200V blocking supply (247./256.*count). Fourth 32 bits (MSB=bit 31) -------------------------- bits 31-24: +5V to logic (6.667/256.*count). bits 23-16: thermistor no. 6 temperature. bits 15-8: +5V line current (100./256.*count). bits 7-0: pulse load bus peak current (1000./256.*count). Table 7. Conversion of analog mirror position count to approximate digital mirror location counter (MLC) Photometer A: MLC = (count-44.000)*.769 + 14.0 Photometer B: MLC = (count-47.286)*.721 + 17.0 Photometer C: MLC = (count-58.286)*.772 + 29.0 These equations are based on pre-launch testing. Comparisons with post-launch data show errors as large as six counts. However, these data were provided in the telemetry only for a coarse backup to the digital counters. They have never been used to accurately determine mirror positions.