pro sxt_old_struct, SXT_2301_Index = SXT_2301_Index,  $
                     SXT_2302_Index = SXT_2302_Index,  $
                     SXT_3011_Index = SXT_3011_Index,  $
                     SXT_3012_Index = SXT_3012_Index
   
   
;+
;       NAME:
;               SXT_OLD_STRUCT
;       PURPOSE:
;               Define the following SXT specific database structures
;                       * SXT_2301_Index_Rec 
;                       * SXT_2302_Index_Rec 
;                       * SXT_3011_Index_Rec
;                       * SXT_3012_Index_Rec
;
;       CALLING SEQUENCE:
;               SXT_OLD_STRUCT
;       HISTORY:
;               written by Mons Morrison, Fall 90.
;
;-
   
   
SXT_2301_Index = { SXT_2301_Index_Rec,              $
      index_version : FIX('2301'x),  $       ;
                                             ;  0- Index structure version                                   Ground 
                                             ;
      pfi_ffi: BYTE(0),  $                   ;  2- Image information                                         
                                             ;       6:7: 1 = PFI                                            Derived
                                             ;            2 = FFI
                                             ;            3 = Patrol image buffer dump
                                             ;         5: For FFI 0=BLS off, 1=BLS on                        W114 F0
                                             ;       0-3: For PFI = "OR" expsoure #                          W114 F4
                                             ;       0-3: For FFI = ROI# of nROI                             Derived
                                             ;
                                             ;                                                                    PF
      periph: BYTE(0),  $                    ;  3- Aspect/shutter/filter information                         W114 F0
                                             ;         0: Aspect door (0=closed, 1=open)
                                             ;         1: Shutter mode (0=Frame Transfer, 1=Mech)
                                             ;       2-4: Filter B position
                                             ;       5-7: Filter A position
      ExpLevMode: BYTE(0),  $                ;  4- Exposure mode/level                                       W114 F0
                                             ;       0-1: Exposure mode (0=normal, 1=dark, 2=LTF)
                                             ;       2-7: Mailbox exposure level
      imgparam: BYTE(0),  $                  ;  5- Image parameter information                               W114 F2
                                             ;       0-1: Exposure cadence (0=2sec,1=1sec,2=.5sec)
                                             ;       2-3: Number of ROI (0=1 ROI, 1=2 ROI, ...)
                                             ;       4-5: Compression (0=Cmp, 1=Low8, 2=Hi8)
                                             ;       6-7: Image resolution (0=1x1,1=2x2,3=4x4)
      flush: BYTE(0),  $                     ;  6- Flush information                                         W114 F4
                                             ;       0-3: Full frame flushes
                                             ;       4-7: Guard band
      explat: FIX(0),  $                     ;  7- Exposure latency (mailbox value)                          W114 F1
      expdur: FIX(0),  $                     ;  9- Exposure duration (mailbox value)                         W114 F4
                                             ;
      shape_cmd: INTARR(2),  $               ; 11- Commanded image shape (nx by ny)                          W114 F5
                                             ;       (the col,lin# are in summed (output) pixels)
                                             ;     For observing regions, the "ny" is the 
                                             ;         full observing region size
                                             ;     For FFI, "nx" always = 1024, 512, or 256
                                             ;     For multiple ROI FFI "ny" is width of one ROI             W114 F3
      shape_sav: INTARR(2),  $               ; 15- Image shape saved (nx by ny)                              Derived
                                             ;       (the col,lin# are in summed (output) pixels)
                                             ;     For observing regions, "ny" always = 64
      corner_cmd: INTARR(2),  $              ; 19- Commanded starting corner (x0, y0)                        W114 F2
                                             ;       (the col,lin# are in 1x1 pixels)
                                             ;     For FFI, "x0" always = 0 (but check BLS on/off)
                                             ;     For multiple ROI FFI "y0" is the start of one ROI         W114 F3
      corner_sav: INTARR(2),  $              ; 23- Starting corner saved (x0, y0)                            Derived
                                             ;       (the col,lin# are in 1x1 pixels)
                                             ;
      FOV_Center: INTARR(2),  $              ; 27- Pitch and yaw relative to the sun center                  Derived
                                             ;     of the center of the SXT FOV (in arcsec)
                                             ;     (for the PFI strip, not the OR)
                                             ;       (1) = yaw; (2) = pitch 
                                             ;     (used to relate to active region list)
      FOV_Ver: FIX(0),  $                    ; 31- Information on how solution was derived                   Ground 
                                             ;
      ObsRegion: BYTE(0),  $                 ; 33- Observing region Number                                   W114 F5
      seq_num: BYTE(0),  $                   ; 34- Sequence Number (1-13)                                    W114 F5
                                             ;       4-7: Entry in sequence table (1-13)
                                             ;       0-3: Word or line sync error bits
      seq_tab_entry: BYTE(0),  $             ; 35- Entry number of sequence table (0-3)                      W114 F5
                                             ;       0-1: FFI Seq Table # (0-3)
                                             ;       2-3: PFI Seq Table # (0-3)
      seq_tab_serno: FIX(0),  $              ; 36- Sequence table serial used                                Ground 
                                             ;
      spare_temp: BYTARR(2),  $              ; 38- Spare bytes to maintain structure - TODO delete
                                             ;
      serial_num: LONG(0),  $                ; 40- Serial number of image                                    W115 F1
      mloop: LONG(0),  $                     ; 44- Main loop counter                                         W115 F1
      loops: BYTARR(4),  $                   ; 48- Loop counters     (1) = loop 2                            W115 F0
                                             ;                       (2) = loop 3                            W115 F2
                                             ;                       (3) = loop 4                            W115 F3
                                             ;                       (4) = loop 5                            W115 F5
                                             ;
      Pow_stat: BYTE(0),  $                  ; 52- Power Status (0=off, 1=on)                                W48  F2
                                             ;       0: 5 Volts
                                             ;       1: 28 Volts
                                             ;       2: Filter Wheel
                                             ;       3: Shutter / Aspect Controller
                                             ;       4: Micro A Select
                                             ;       5: Micro B Select
                                             ;       6: Camera
                                             ;       7: Thermoelectric Cooler (TEC)
      SW_stat: BYTE(0),  $                   ; 53- Active Software (1=active)                                W114 F1
                                             ;       0: Quiet ARS on/off
                                             ;       1: Quiet ARS 1 or 2
                                             ;       2: Flare ARS on/off
                                             ;       3: ARS morning patrol on/off
                                             ;       4: AEC patrol on/off
                                             ;       5: ART on/off
                                             ;       6: ART
                                             ;       7: ART
      SXT_Control: BYTE(0),  $               ; 54- SXT Control Status                                        W114 F3
                                             ;         0: Power control mode (1=auto, 0=manual)
                                             ;         1: SXT control mode (1=auto, 0=manual)
                                             ;       4-5: SXT day/night mode
                                             ;               00 = SXT day mode
                                             ;               01 = SXT evening mode
                                             ;               10 = SXT night mode
                                             ;               11 = SXT morning mode
                                             ;         6: SXTE-U hard reset (1=executed)
                                             ;         7: SXTE-U soft reset (1=executed)
      sxtfmt: BYTE(0),  $                    ; 55- SXT Format info 8:2 or 2:8                                W115 F0
                                             ;
      temp_ccd: BYTE(0),  $                  ; 56- CCD Temperature                                           W113 F5
                                             ;     Value is actually 1 MF out of sync?
                                             ;     (See quasi-static section for conversions)
      temp_hk: BYTARR(10),  $                ; 57- House keeping temperature                                 W32 F18
                                             ;     (See quasi-static section for conversions)
                                             ;
      HW_error: BYTARR(2),  $                ; 67- Hardware error since last exposure                        W113 F0
      j_register: BYTE(0),  $                ; 69- Which buffer is used                                      W114 F3
                                             ;
      Img_Max: BYTE(0),  $                   ; 70- Maximum intensity                                         Derived
                                             ;     (0-255, high 8 bits)
      Img_Avg: BYTE(0),  $                   ; 71- Average intensity of whole image                          Derived
                                             ;       1x1 - first subtract 12.8 DN offset
                                             ;       2x4 - first subtract 30.7 DN offset
                                             ;       4x4 - first subtract 73.6 DN offset
                                             ;     (0-255, high 8 bits)
      Img_Dev: BYTE(0),  $                   ; 72- Standard deviation of the whole image                     Derived
                                             ;     (0-255) - Not scaled
      PercentD: BYTE(0),  $                  ; 73- Percentage of data present                                Derived
      PercentOver: BYTE(0),  $               ; 74- Percentage of data over [N] counts                        Derived
                                             ;
      AEC_Status: BYTE(0),  $                ; 75- AEC Status                                                W114 F4
                                             ;       NOTE: True only for the LAST "PFI Strip" in
                                             ;             an observing region
                                             ;       b0:3 = Maximum number of selcted regions
                                             ;              in AT ARS1 (0-4)
                                             ;       b4:5 = AEC Status of PFI-AEC
                                             ;               00b = proper
                                             ;               01b = Over exposure
                                             ;               10b = Under exposure
                                             ;       b6:7 = AEC Status of Patrol-AEC
                                             ;               (see above)
      spare: BYTARR(4) }                     ; 76- Spare bytes
   
   
   
SXT_2302_Index = { SXT_2302_Index_Rec,              $
      index_version : FIX('2302'x),  $       ;
                                             ;  0- Index structure version                                   Ground 
                                             ;     (See GEN_INDEX for explanation)
                                             ;
      pfi_ffi: BYTE(0),  $                   ;  2- Image information                                         
                                             ;       6:7: 0 = PFI                                            Derived
                                             ;            1 = FFI
                                             ;            3 = Patrol image buffer dump
                                             ;         5: For FFI 0=BLS off, 1=BLS on                        W114 F0
                                             ;       0-3: For PFI = "OR" expsoure #                          W114 F4
                                             ;       0-3: For FFI = ROI# of nROI                             Derived
                                             ;
                                             ;                                                                    PF
      periph: BYTE(0),  $                    ;  3- Aspect/shutter/filter information                         W114 F0
                                             ;         0: Aspect door (0=closed, 1=open)
                                             ;         1: Shutter mode (0=Frame Transfer, 1=Mech)
                                             ;       2-4: Filter B position
                                             ;       5-7: Filter A position
      ExpLevMode: BYTE(0),  $                ;  4- Exposure mode/level                                       W114 F0
                                             ;       0-1: Exposure mode (0=normal, 1=dark, 2=LTF)
                                             ;       2-7: Mailbox exposure level
      imgparam: BYTE(0),  $                  ;  5- Image parameter information                               W114 F2
                                             ;       0-1: Exposure cadence (0=2sec,1=1sec,2=.5sec)
                                             ;       2-3: Number of ROI (0=1 ROI, 1=2 ROI, ...)
                                             ;       4-5: Compression (0=Cmp, 1=Low8, 2=Hi8)
                                             ;       6-7: Image resolution (0=1x1,1=2x2,3=4x4)
      flush: BYTE(0),  $                     ;  6- Flush information                                         W114 F4
                                             ;       0-3: Full frame flushes
                                             ;       4-7: Guard band
      explat: LONG(0),  $                    ;  7- Exposure latency (mailbox value)                          W114 F1
      expdur: LONG(0),  $                    ;  9- Exposure duration (mailbox value)                         W114 F4
                                             ;
      shape_cmd: INTARR(2),  $               ; 11- Commanded image shape (nx by ny)                          W114 F5
                                             ;       (the col,lin# are in summed (output) pixels)
                                             ;     For observing regions, the "ny" is the 
                                             ;         full observing region size
                                             ;     For FFI, "nx" always = 1024, 512, or 256
                                             ;     For multiple ROI FFI "ny" is width of one ROI             W114 F3
      shape_sav: INTARR(2),  $               ; 15- Image shape saved (nx by ny)                              Derived
                                             ;       (the col,lin# are in summed (output) pixels)
                                             ;     For observing regions, "ny" always = 64
      corner_cmd: INTARR(2),  $              ; 19- Commanded starting corner (x0, y0)                        W114 F2
                                             ;       (the col,lin# are in 1x1 pixels)
                                             ;     For FFI, "x0" always = 0 (but check BLS on/off)
                                             ;     For multiple ROI FFI "y0" is the start of one ROI         W114 F3
      corner_sav: INTARR(2),  $              ; 23- Starting corner saved (x0, y0)                            Derived
                                             ;       (the col,lin# are in 1x1 pixels)
                                             ;
      FOV_Center: INTARR(2),  $              ; 27- Pitch and yaw relative to the sun center                  Derived
                                             ;     of the center of the SXT FOV (in arcsec)
                                             ;     (for the PFI strip, not the OR)
                                             ;       (1) = yaw; (2) = pitch 
                                             ;     (used to relate to active region list)
                                             ;       Temporary Definition:
                                             ;               yaw   = (512 - center_fov(0))*2.45
                                             ;               pitch = (center_fov(1) - 638)*2.45
                                             ;          where center_fov is pixel location in 1x1
                                             ;          pixels (not including the BLS pixels)
      FOV_Ver: FIX(0),  $                    ; 31- Information on how solution was derived                   Ground 
                                             ;
      ObsRegion: BYTE(0),  $                 ; 33- Observing region Number                                   W114 F5
                                             ;       b/0:1 = FFI Seq Table # (0-3)
                                             ;               From Entry Table 
                                             ;       b/2:3 = PFI Seq Table # (0-3)
                                             ;       b/4:7 = Observing region number (0-8)
                                             ;               (0-3) QT ARS
                                             ;               (4-7) Manual (with ART option)
                                             ;               (8)   FL ARS
      seq_num: BYTE(0),  $                   ; 34- Sequence Number (1-13)                                    W114 F5
                                             ;       4-7: Entry in sequence table (1-13)
                                             ;       0-3: Word or line sync error bits
      seq_tab_serno: FIX(0),  $              ; 36- Sequence table serial used                                Ground 
                                             ;
      serial_num: LONG(0),  $                ; 40- Serial number of image                                    W115 F1
      mloop: LONG(0),  $                     ; 44- Main loop counter                                         W115 F1
      loops: BYTARR(4),  $                   ; 48- Loop counters     (1) = loop 2                            W115 F0
                                             ;                       (2) = loop 3                            W115 F2
                                             ;                       (3) = loop 4                            W115 F3
                                             ;                       (4) = loop 5                            W115 F5
                                             ;
      Pow_stat: BYTE(0),  $                  ; 52- Power Status (0=off, 1=on)                                W48  F2
                                             ;       0: 5 Volts
                                             ;       1: 28 Volts
                                             ;       2: Filter Wheel
                                             ;       3: Shutter / Aspect Controller
                                             ;       4: Micro A Select
                                             ;       5: Micro B Select
                                             ;       6: Camera
                                             ;       7: Thermoelectric Cooler (TEC)
      SW_stat: BYTE(0),  $                   ; 53- Active Software (1=active)                                W114 F1
                                             ;       0: Quiet ARS on/off
                                             ;       1: Quiet ARS 1 or 2
                                             ;       2: Flare ARS on/off
                                             ;       3: ARS morning patrol on/off
                                             ;       4: AEC patrol on/off
                                             ;       5: ART on/off
                                             ;       6: ART
                                             ;       7: ART
      SXT_Control: BYTE(0),  $               ; 54- SXT Control Status                                        W114 F3
                                             ;         0: Power control mode (1=auto, 0=manual)
                                             ;         1: SXT control mode (1=auto, 0=manual)
                                             ;       4-5: SXT day/night mode
                                             ;               00 = SXT day mode
                                             ;               01 = SXT evening mode
                                             ;               10 = SXT night mode
                                             ;               11 = SXT morning mode
                                             ;         6: SXTE-U hard reset (1=executed)
                                             ;         7: SXTE-U soft reset (1=executed)
      sxtfmt: BYTE(0),  $                    ; 55- SXT Format info 8:2 or 2:8                                W115 F0
                                             ;
      temp_ccd: BYTE(0),  $                  ; 56- CCD Temperature                                           W113 F5
                                             ;     Value is actually 1 MF out of sync?
                                             ;     (See quasi-static section for conversions)
      temp_hk: BYTARR(10),  $                ; 57- House keeping temperature                                 W32 F18
                                             ;     (See quasi-static section for conversions)
                                             ;
      HW_error: BYTARR(2),  $                ; 67- Hardware error since last exposure                        W113 F0
      j_register: BYTE(0),  $                ; 69- Which buffer is used                                      W114 F3
                                             ;
      Img_Max: BYTE(0),  $                   ; 70- Maximum intensity                                         Derived
                                             ;     (0-255, high 8 bits)
      Img_Avg: BYTE(0),  $                   ; 71- Average intensity of whole image                          Derived
                                             ;       1x1 - first subtract 12.8 DN offset
                                             ;       2x4 - first subtract 30.7 DN offset
                                             ;       4x4 - first subtract 73.6 DN offset
                                             ;     (0-255, high 8 bits)
      Img_Dev: BYTE(0),  $                   ; 72- Standard deviation of the whole image                     Derived
                                             ;     (0-255) - Not scaled
      PercentD: BYTE(0),  $                  ; 73- Percentage of data present                                Derived
      PercentOver: BYTE(0),  $               ; 74- Percentage of data over [N] counts                        Derived
                                             ;
      AEC_Status: BYTE(0),  $                ; 75- AEC Status                                                W114 F4
                                             ;       NOTE: True only for the LAST "PFI Strip" in
                                             ;             an observing region
                                             ;       b0:3 = Maximum number of selcted regions
                                             ;              in AT ARS1 (0-4)
                                             ;       b4:5 = AEC Status of PFI-AEC
                                             ;               00b = proper
                                             ;               01b = Over exposure
                                             ;               10b = Under exposure
                                             ;       b6:7 = AEC Status of Patrol-AEC
                                             ;               (see above)
      spare: BYTARR(3) }                     ; 76- Spare bytes
   
   
   
SXT_3011_Index = { SXT_3011_Index_Rec,              $
      index_version : FIX('3011'x),  $       ;
                                             ;       Retired on 8-Mar-92 in order to add more 
                                             ;       house keeping temperatures to the index structure
                                             ;
                                             ;  0- Index structure version                                   Ground 
                                             ;     (See GEN_INDEX for explanation)
                                             ;
      pfi_ffi: BYTE(0),  $                   ;  2- Image information                                         
                                             ;       b0:2 = Image type
                                             ;            0 = PFI ("raw" PFI strips - not assembled)         Derived
                                             ;            1 = FFI
                                             ;            2 = PFI (assembled ORs)
                                             ;            3 = FFI - Patrol image buffer dump
                                             ;               (b0=0 is PFI, b0=1 is FFI)
                                             ;       b3   = For FFI 0=BLS off, 1=BLS on                      W114 F0
                                             ;       b4:7 = For PFI = "OR" expsoure #                        W114 F4
                                             ;       b4:7 = For FFI = ROI# of nROI                           Derived
                                             ;
                                             ;                                                                    PF
      periph: BYTE(0),  $                    ;  3- Aspect/shutter/filter information                         W114 F0
                                             ;       b7   = Aspect door (0=closed, 1=open)
                                             ;       b6   = Shutter mode (0=Frame Transfer, 1=Mech)
                                             ;       b3:5 = Filter B position
                                             ;               1 = Open
                                             ;               2 = Al 1400 Angstrom
                                             ;               3 = Al/Mg/Mn
                                             ;               4 = Ber 100 microns
                                             ;               5 = Al 12 microns
                                             ;               6 = Mg3Mu
                                             ;       b0:2 = Filter A position
                                             ;               1 = Open
                                             ;               2 = Narrow Band (4310 A, 30 A FWHM)
                                             ;               3 = Quartz defocusing lens ('photon flood')
                                             ;               4 = Diffuser
                                             ;               5 = Wide Band (4600 A, 185 A FWHM)
                                             ;               6 = Neutral Density Mask (8%)
      ExpLevMode: BYTE(0),  $                ;  4- Exposure mode/level                                       W114 F0
                                             ;       b6:7 = Exposure mode (0=normal, 1=dark, 2=LTF)
                                             ;       b0:5 = Mailbox exposure level
      imgparam: BYTE(0),  $                  ;  5- Image parameter information                               W114 F2
                                             ;       b6:7 = Exposure cadence (0=2sec,1=1sec,2=.5sec)
                                             ;       b4:5 = Number of ROI (0=1 ROI, 1=2 ROI, ...)
                                             ;       b2:3 = Compression (0=Cmp, 1=Low8, 2=Hi8)
                                             ;       b0:1 = Image resolution (0=1x1,1=2x2,3=4x4)
      flush: BYTE(0),  $                     ;  6- Flush information                                         W114 F4
                                             ;       b0:1 = Pre-exposure Full frame flushes (0-3)
                                             ;       b2:3 = Set-up full frame flushes
                                             ;               # flushes = 2*(b2:3 value) in ROM
                                             ;                       = 4*(b2:3 value) 30-sep-91 to 7-Oct-91?
                                             ;                       = 8*(b2:3 value) after 7-Oct-91
                                             ;       b4:7 = Guard band
      explat: LONG(0),  $                    ;  7- Exposure latency (mailbox value)                          W114 F1
      expdur: LONG(0),  $                    ;  9- Exposure duration (mailbox value)                         W114 F4
                                             ;
      shape_cmd: INTARR(2),  $               ; 11- Commanded image shape (nx by ny)                          W114 F5
                                             ;       (the col,lin# are in summed (output) pixels)
                                             ;     For observing regions, the "ny" is the 
                                             ;         full observing region size
                                             ;     For FFI, "nx" always = 1024, 512, or 256
                                             ;     For multiple ROI FFI "ny" is width of one ROI             W114 F3
      shape_sav: INTARR(2),  $               ; 15- Image shape saved (nx by ny)                              Derived
                                             ;       (the col,lin# are in summed (output) pixels)
                                             ;     For observing regions, "ny" always = 64
      corner_cmd: INTARR(2),  $              ; 19- Commanded starting corner (x0, y0)                        W114 F2
                                             ;       (the col,lin# are in 1x1 pixels)
                                             ;       The values are CCD column numbers and are NOT
                                             ;       reversed.  The SXT images have been reversed before
                                             ;       being written to disk so CCD column 0 is to the
                                             ;       right (high indcies) in the image array
                                             ;
                                             ;       Col 0 is "image-0", col 1 is "image-1"
                                             ;       in figure on page 97 of blue book.  Neither
                                             ;       of these pixels are summed in summation mode
                                             ;     For FFI, "x0" always = 0 (but check BLS on/off)
                                             ;     For multiple ROI FFI "y0" is the start of one ROI         W114 F3
      corner_sav: INTARR(2),  $              ; 23- Starting corner saved (x0, y0)                            Derived
                                             ;       (the col,lin# are in 1x1 pixels)
                                             ;
      FOV_Center: INTARR(2),  $              ; 27- Pitch and yaw relative to the sun center                  Derived
                                             ;     of the center of the SXT FOV (in arcsec)
                                             ;     (for the PFI strip, not the OR)
                                             ;       (1) = yaw; (2) = pitch 
                                             ;     (used to relate to active region list)
                                             ;       Temporary Definition:
                                             ;               yaw   = (512 - center_fov(0))*2.45
                                             ;               pitch = (center_fov(1) - 638)*2.45
                                             ;          where center_fov is pixel location in 1x1
                                             ;          pixels (not including the BLS pixels)
      FOV_Ver: FIX(0),  $                    ; 31- Information on how solution was derived                   Ground 
                                             ;
      ObsRegion: BYTE(0),  $                 ; 33- Observing region Number                                   W114 F5
                                             ;       b6:7 = FFI Seq Table # (0-3)
                                             ;               From Entry Table 
                                             ;       b4:5 = PFI Seq Table # (0-3)
                                             ;       b0:3 = Observing region number (0-8)
                                             ;               Location # on the sun
                                             ;               (0-3) Updated by QT ARS
                                             ;               (4-7) Updated manually (with ART option)
                                             ;               (8)   Updated by FL ARS
      seq_num: BYTE(0),  $                   ; 34- Sequence Number (1-13)                                    W114 F5
                                             ;       b0:3 = Entry in sequence table (1-13)
                                             ;       b4:7 = Word or line sync error bits
      seq_tab_serno: FIX(0),  $              ; 36- Sequence table serial used                                Ground 
                                             ;
      serial_num: LONG(0),  $                ; 40- Serial number of image                                    W115 F1
      mloop: LONG(0),  $                     ; 44- Main loop counter                                         W115 F1
      loops: BYTARR(4),  $                   ; 48- Loop counters     (1) = loop 2                            W115 F0
                                             ;                       (2) = loop 3                            W115 F2
                                             ;                       (3) = loop 4                            W115 F3
                                             ;                       (4) = loop 5                            W115 F5
                                             ;
      Pow_stat: BYTE(0),  $                  ; 52- Power Status (0=off, 1=on)                                W48  F2
                                             ;       b7 = 5 Volts
                                             ;       b6 = 28 Volts
                                             ;       b5 = Filter Wheel
                                             ;       b4 = Shutter / Aspect Controller
                                             ;       b3 = Micro A Select
                                             ;       b2 = Micro B Select
                                             ;       b1 = Camera
                                             ;       b0 = Thermoelectric Cooler (TEC)
      SW_stat: BYTE(0),  $                   ; 53- Active Software (1=active)                                W114 F1
                                             ;       b7 = Quiet ARS on/off
                                             ;       b6 = Quiet ARS 1 or 2
                                             ;       b5 = Flare ARS on/off
                                             ;       b4 = ARS morning patrol on/off
                                             ;       b3 = AEC patrol on/off
                                             ;       b2 = ART on/off
                                             ;       b1 = ART
                                             ;       b0 = ART
      SXT_Control: BYTE(0),  $               ; 54- SXT Control Status                                        W114 F3
                                             ;       b7   = Power control mode (1=auto, 0=manual)
                                             ;       b6   = SXT control mode (1=auto, 0=manual)
                                             ;       b4:5 = SXT day/night mode
                                             ;               00 = SXT day mode
                                             ;               01 = SXT evening mode
                                             ;               10 = SXT night mode
                                             ;               11 = SXT morning mode
                                             ;       b1   = SXTE-U hard reset (1=executed)
                                             ;       b0   = SXTE-U soft reset (1=executed)
      sxtfmt: BYTE(0),  $                    ; 55- SXT Format info 8:2 or 2:8                                W115 F0
                                             ;
      temp_ccd: BYTE(0),  $                  ; 56- CCD Temperature                                           W113 F5
                                             ;     Value is actually 1 MF out of sync?
      temp_hk: BYTARR(10),  $                ; 57- House keeping temperature                                 W32 F18
                                             ;     (See quasi-static section for conversions)
                                             ;       temp_hk(0) = TEC hot end                                W32 F18
                                             ;       temp_hk(1) = CCD camera head                            W32 F19
                                             ;       temp_hk(2) = Filter wheel housing                       W32 F20
                                             ;       temp_hk(3) = Forward support plate                      W32 F21
                                             ;       temp_hk(4) = Aspect Telescope (NOT FUNCTIONING)         W32 F22
                                             ;       temp_hk(5) = Metering tube center                       W32 F23
                                             ;       temp_hk(6) = Filter wheel hub (aft                      W32 F24
                                             ;       temp_hk(7) = Shutter motor case                         W32 F25
                                             ;       temp_hk(8) = TSA (thermal strap) S/C end                W32 F26
                                             ;       temp_hk(9) = Spare
                                             ;
      HW_error: BYTARR(2),  $                ; 67- Hardware error since last exposure                        W113 F0
      j_register: BYTE(0),  $                ; 69- Which buffer is used                                      W114 F3
                                             ;
      Img_Max: BYTE(0),  $                   ; 70- Maximum intensity                                         Derived
                                             ;     (0-255, high 8 bits)
      Img_Avg: BYTE(0),  $                   ; 71- Average intensity of whole image                          Derived
                                             ;       1x1 - first subtract 12.8 DN offset
                                             ;       2x4 - first subtract 30.7 DN offset
                                             ;       4x4 - first subtract 73.6 DN offset
                                             ;     (0-255, high 8 bits)
      Img_Dev: BYTE(0),  $                   ; 72- Standard deviation of the whole image                     Derived
                                             ;     (0-255) - Not scaled
      PercentD: BYTE(0),  $                  ; 73- Percentage of data present                                Derived
      PercentOver: BYTE(0),  $               ; 74- Percentage of data over [N] counts                        Derived
                                             ;
      AEC_Status: BYTE(0),  $                ; 75- AEC Status                                                W114 F4
                                             ;       NOTE: True only for the LAST "PFI Strip" in
                                             ;             an observing region
                                             ;       b4:7 = Maximum number of selcted regions
                                             ;              in AT ARS1 (0-4)
                                             ;       b2:3 = AEC Status of PFI-AEC
                                             ;               00b = proper
                                             ;               01b = Over exposure
                                             ;               10b = Under exposure
                                             ;       b0:1 = AEC Status of Patrol-AEC
                                             ;               (see PFI-AEC above)
      spare: BYTARR(3) }                     ; 76- Spare bytes
   
   
   
SXT_3012_Index = { SXT_3012_Index_Rec,              $
      index_version : FIX('3012'x),  $       ;
                                             ;  0- Index structure version                                   Ground 
                                             ;     (See GEN_INDEX for explanation)
                                             ;
      pfi_ffi: BYTE(0),  $                   ;  2- Image information                                         
                                             ;       b0:2 = Image type
                                             ;            0 = PFI ("raw" PFI strips - not assembled)         Derived
                                             ;            1 = FFI
                                             ;            2 = PFI (assembled ORs)
                                             ;            3 = FFI - Patrol image buffer dump
                                             ;               (b0=0 is PFI, b0=1 is FFI)
                                             ;       b3   = For FFI 0=BLS off, 1=BLS on                      W114 F0
                                             ;       b4:7 = For PFI = "OR" expsoure #                        W114 F4
                                             ;       b4:7 = For FFI = ROI# of nROI                           Derived
                                             ;
                                             ;                                                                    PF
      periph: BYTE(0),  $                    ;  3- Aspect/shutter/filter information                         W114 F0
                                             ;       b7   = Aspect door (0=closed, 1=open)
                                             ;       b6   = Shutter mode (0=Frame Transfer, 1=Mech)
                                             ;       b3:5 = Filter B position
                                             ;               1 = Open
                                             ;               2 = Al 1400 Angstrom
                                             ;               3 = Al/Mg/Mn
                                             ;               4 = Ber 100 microns
                                             ;               5 = Al 12 microns
                                             ;               6 = Mg3Mu
                                             ;       b0:2 = Filter A position
                                             ;               1 = Open
                                             ;               2 = Narrow Band (4310 A, 30 A FWHM)
                                             ;               3 = Quartz defocusing lens ('photon flood')
                                             ;               4 = Diffuser
                                             ;               5 = Wide Band (4600 A, 185 A FWHM)
                                             ;               6 = Neutral Density Mask (8%)
      ExpLevMode: BYTE(0),  $                ;  4- Exposure mode/level                                       W114 F0
                                             ;       b6:7 = Exposure mode (0=normal, 1=dark, 2=LTF)
                                             ;       b0:5 = Mailbox exposure level
      imgparam: BYTE(0),  $                  ;  5- Image parameter information                               W114 F2
                                             ;       b6:7 = Exposure cadence (0=2sec,1=1sec,2=.5sec)
                                             ;       b4:5 = Number of ROI (0=1 ROI, 1=2 ROI, ...)
                                             ;       b2:3 = Compression (0=Cmp, 1=Low8, 2=Hi8)
                                             ;       b0:1 = Image resolution (0=1x1,1=2x2,3=4x4)
      flush: BYTE(0),  $                     ;  6- Flush information                                         W114 F4
                                             ;       b0:1 = Pre-exposure Full frame flushes (0-3)
                                             ;       b2:3 = Set-up full frame flushes
                                             ;               # flushes = 2*(b2:3 value) in ROM
                                             ;                       = 4*(b2:3 value) 30-sep-91 to 7-Oct-91?
                                             ;                       = 8*(b2:3 value) after 7-Oct-91
                                             ;       b4:7 = Guard band
      explat: LONG(0),  $                    ;  7- Exposure latency (mailbox value)                          W114 F1
      expdur: LONG(0),  $                    ; 11- Exposure duration (mailbox value)                         W114 F4
                                             ;
      shape_cmd: INTARR(2),  $               ; 15- Commanded image shape (nx by ny)                          W114 F5
                                             ;       (the col,lin# are in summed (output) pixels)
                                             ;     For observing regions, the "ny" is the 
                                             ;         full observing region size
                                             ;     For FFI, "nx" always = 1024, 512, or 256
                                             ;     For multiple ROI FFI "ny" is width of one ROI             W114 F3
      shape_sav: INTARR(2),  $               ; 19- Image shape saved (nx by ny)                              Derived
                                             ;       (the col,lin# are in summed (output) pixels)
                                             ;     For observing regions, "ny" always = 64
      corner_cmd: INTARR(2),  $              ; 23- Commanded starting corner (x0, y0)                        W114 F2
                                             ;       (the col,lin# are in 1x1 pixels)
                                             ;       The values are CCD column numbers and are NOT
                                             ;       reversed.  The SXT images have been reversed before
                                             ;       being written to disk so CCD column 0 is to the
                                             ;       right (high indcies) in the image array
                                             ;
                                             ;       Col 0 is "image-0", col 1 is "image-1"
                                             ;       in figure on page 97 of blue book.  Neither
                                             ;       of these pixels are summed in summation mode
                                             ;     For FFI, "x0" always = 0 (but check BLS on/off)
                                             ;     For multiple ROI FFI "y0" is the start of one ROI         W114 F3
      corner_sav: INTARR(2),  $              ; 27- Starting corner saved (x0, y0)                            Derived
                                             ;       (the col,lin# are in 1x1 pixels)
                                             ;
      FOV_Center: INTARR(2),  $              ; 31- Pitch and yaw relative to the sun center                  Derived
                                             ;     of the center of the SXT FOV (in arcsec)
                                             ;     (for the PFI strip, not the OR)
                                             ;       (1) = yaw; (2) = pitch 
                                             ;     (used to relate to active region list)
                                             ;       Temporary Definition:
                                             ;               yaw   = (512 - center_fov(0))*2.45
                                             ;               pitch = (center_fov(1) - 638)*2.45
                                             ;          where center_fov is pixel location in 1x1
                                             ;          pixels (not including the BLS pixels)
      FOV_Ver: FIX(0),  $                    ; 35- Information on how solution was derived                   Ground 
                                             ;
      ObsRegion: BYTE(0),  $                 ; 37- Observing region Number                                   W114 F5
                                             ;       b6:7 = FFI Seq Table # (0-3)
                                             ;               From Entry Table 
                                             ;       b4:5 = PFI Seq Table # (0-3)
                                             ;       b0:3 = Observing region number (0-8)
                                             ;               Location # on the sun
                                             ;               (0-3) Updated by QT ARS
                                             ;               (4-7) Updated manually (with ART option)
                                             ;               (8)   Updated by FL ARS
      seq_num: BYTE(0),  $                   ; 38- Sequence Number (1-13)                                    W114 F5
                                             ;       b0:3 = Entry in sequence table (1-13)
                                             ;       b4:7 = Word or line sync error bits
      seq_tab_serno: FIX(0),  $              ; 39- Sequence table serial used                                Ground 
                                             ;
      serial_num: LONG(0),  $                ; 41- Serial number of image                                    W115 F1
      mloop: LONG(0),  $                     ; 45- Main loop counter                                         W115 F1
      loops: BYTARR(4),  $                   ; 49- Loop counters     (1) = loop 2                            W115 F0
                                             ;                       (2) = loop 3                            W115 F2
                                             ;                       (3) = loop 4                            W115 F3
                                             ;                       (4) = loop 5                            W115 F5
                                             ;
      Pow_stat: BYTE(0),  $                  ; 53- Power Status (0=off, 1=on)                                W48  F2
                                             ;       b7 = 5 Volts
                                             ;       b6 = 28 Volts
                                             ;       b5 = Filter Wheel
                                             ;       b4 = Shutter / Aspect Controller
                                             ;       b3 = Micro A Select
                                             ;       b2 = Micro B Select
                                             ;       b1 = Camera
                                             ;       b0 = Thermoelectric Cooler (TEC)
      SW_stat: BYTE(0),  $                   ; 54- Active Software (1=active)                                W114 F1
                                             ;       b7 = Quiet ARS on/off
                                             ;       b6 = Quiet ARS 1 or 2
                                             ;       b5 = Flare ARS on/off
                                             ;       b4 = ARS morning patrol on/off
                                             ;       b3 = AEC patrol on/off
                                             ;       b2 = ART on/off
                                             ;       b1 = ART
                                             ;       b0 = ART
      SXT_Control: BYTE(0),  $               ; 55- SXT Control Status                                        W114 F3
                                             ;       b7   = Power control mode (1=auto, 0=manual)
                                             ;       b6   = SXT control mode (1=auto, 0=manual)
                                             ;       b4:5 = SXT day/night mode
                                             ;               00 = SXT day mode
                                             ;               01 = SXT evening mode
                                             ;               10 = SXT night mode
                                             ;               11 = SXT morning mode
                                             ;       b1   = SXTE-U hard reset (1=executed)
                                             ;       b0   = SXTE-U soft reset (1=executed)
      sxtfmt: BYTE(0),  $                    ; 56- SXT Format info 8:2 or 2:8                                W115 F0
                                             ;
      temp_ccd: BYTE(0),  $                  ; 57- CCD Temperature                                           W113 F5
                                             ;     Value is actually 1 MF out of sync?
      temp_hk: BYTARR(20),  $                ; 58- House keeping temperature                                 W32 F18
                                             ;     (See quasi-static section for conversions)
                                             ;       temp_hk(0) = TEC hot end                                W32 F18
                                             ;       temp_hk(1) = CCD camera head                            W32 F19
                                             ;       temp_hk(2) = Filter wheel housing                       W32 F20
                                             ;       temp_hk(3) = Forward support plate                      W32 F21
                                             ;       temp_hk(4) = Aspect Telescope (NOT FUNCTIONING)         W32 F22
                                             ;       temp_hk(5) = Metering tube center                       W32 F23
                                             ;       temp_hk(6) = Filter wheel hub (aft                      W32 F24
                                             ;       temp_hk(7) = Shutter motor case                         W32 F25
                                             ;       temp_hk(8) = TSA (thermal strap) S/C end                W32 F26
                                             ;       temp_hk(9)  = Upper Panel Sensor 4 (UP-4)               W32 F42
                                             ;       temp_hk(10) = Cemter Panel Sensor 1 (CP-1)              W32 F55
                                             ;       temp_hk(11) = Center Panel Sensor 2 (CP-2)              W32 F56
                                             ;       temp_hk(12) = Center Panel Sensor 3 (CP-3)              W32 F57
                                             ;       temp_hk(13) = Base Panel Sensor 4 (BP-4)                W32 F61
                                             ;       temp_hk(14) = (spare)
                                             ;       temp_hk(15) = (spare)
                                             ;       temp_hk(16) = (spare)
                                             ;       temp_hk(17) = (spare)
                                             ;       temp_hk(18) = (spare)
                                             ;
      HW_error: BYTARR(2),  $                ; 78- Hardware error since last exposure                        W113 F0
      j_register: BYTE(0),  $                ; 80- Which buffer is used                                      W114 F3
                                             ;
      Img_Max: BYTE(0),  $                   ; 81- Maximum intensity                                         Derived
                                             ;     (0-255, high 8 bits)
                                             ;     The image is decompressed first where necessary
      Img_Avg: BYTE(0),  $                   ; 82- Average intensity of whole image                          Derived
                                             ;       1x1 - first subtract 12.8 DN offset
                                             ;       2x4 - first subtract 30.7 DN offset
                                             ;       4x4 - first subtract 73.6 DN offset
                                             ;     (0-255, high 8 bits)
                                             ;     The image is decompressed first where necessary
      Img_Dev: BYTE(0),  $                   ; 83- Standard deviation of the whole image                     Derived
                                             ;     (0-255) - Not scaled
                                             ;     The image is decompressed first where necessary
      PercentD: BYTE(0),  $                  ; 84- Percentage of data present                                Derived
                                             ;     (value 255 = 100%)
      PercentOver: BYTE(0),  $               ; 85- Percentage of data over [N] counts                        Derived
                                             ;     (value 255 = 100%)
                                             ;       1x1 - the # pixels over 2000 DN (decompressed)
                                             ;       2x2 - the # pixels over 3500 DN (decompressed)
                                             ;       4x4 - the # pixels over 3500 DN (decompressed)
                                             ;
      AEC_Status: BYTE(0),  $                ; 86- AEC Status                                                W114 F4
                                             ;       NOTE: True only for the LAST "PFI Strip" in
                                             ;             an observing region
                                             ;       b4:7 = Maximum number of selcted regions
                                             ;              in AT ARS1 (0-4)
                                             ;       b2:3 = AEC Status of PFI-AEC
                                             ;               00b = proper
                                             ;               01b = Over exposure
                                             ;               10b = Under exposure
                                             ;       b0:1 = AEC Status of Patrol-AEC
                                             ;               (see PFI-AEC above)
      spare: BYTARR(9) }                     ; 87- Spare bytes
   
   
   
  
  
end
