IMP-8 Pha File Format



IMP-8 pha file consists data records of one 4-day interval, with the
last record indicated by a negative interval number.

Data records are fixed-blocked by a factor of 3. Physical records are
4656 bytes in length. Logical records are 1552 bytes(388 words) in
length and represent one album of data.


WORD	CONTENT

1	Universal time at start of album(tenths of seconds of year)
2	S/C clock at start of album(low order 6 bits zero)
3	Pseudo-sequence count-negative at 400 BPS, positive at 1600 BPS
4	Halfword 1 Day of year
        Halfword 2 Perigee count
5	Milliseconds of day
6	Longitude geocentric(deg.)
7	Latitude      "
8	Longitude geomagnetic(deg.)
9	Latitude      "
10	Ro(earth radii) (C.U.L.)
11	Radial distance from center of earth(km)
12	GSEx Satellite position in geocentric solar ecliptic coordinates(km)
13	GSEy             "                             "
14	GSEz             "                             "
15	GSMx Satellite position in geocentric magnetospheric coordinates(km)
16	GSMy             "                             "
17	GsMz             "                             "
18	GEIx Sun position in geocentric equatorial inertial corrdinates(AU)
19	GEIy             "                             "
20	GEIz             "                             "
21	L, McIlwain parameter(earth radii)
22	B, Magnetic field strength(gamma)
23	Lsep, Satellite-earth-sun angle(deg.)
24	Year of recording
25	Halfword 1 Data quality flag
        Halfword 2 Time quality flag
26	Halfword 1 Number of 4-day interval(negative if last
                   record of this interval).
        Halfword 2 Day of next perigee
27      Milliseconds of day of next perigee
28	Right Ascension	  Spin vector in celestial inertial coordinates(deg.)
29	Declination      
30	Halfword 1 Year
	Halfword 2 Day of year	 Time of orbit date
31	Milliseconds of day
32	Byte 1 Al Trend check flag
               =0  if all Al rate readouts in album satisfied the
                   trend check or were undetermined
	       =#  rejected otherwise
	Byte 2 B Trend check flag,
	Byte 3 C Trend check flag
	Byte 4 A1.-B.-C Trend check flag
33	Byte 1	(A&B)1.-B.-C Trend check flag
	Byte 2	(A&B)2.-B.-C Trend check flag
        Byte 3  A1.B.-C Trend check flag
        Byte 4  (A&B)1.B.-C Trend check flag
34	Byte 1 (A&B)2.B.-C Trend check flag
  	Byte 2 DI Trend check flag
  	Byte 3 E Trend check flag
  	Byte 4 F Trend check flag
35	Byte 1 G Trend check flag
  	Byte 2 DI.EI.F  Trend check flag
  	Byte 3 DI.EI.-F.-G Trend check flag
  	Byte 4 DI.EI.F.-G Trend check flag
36	Byte 1 (DI&EI)l.EI.-F.-G Trend check flag
  	Byte 2 (DI&EI)2.EI.F.-G Trend check flag
  	Byte 3 Spare
  	Byte 4 Spare
37	CNT - Al events
38	CNT - B events
39	CNT - C events
40	CNT - A1.-B.-C events
41	CNT - (A&B)l.-B.-C events
42	CNT - (A&B)2.-B.-C events
43	CNT - A1.B.-C events
44	CNT - (A&B)l.B.-C events
45	CNT - (A&B)2.B.-C events
46	CNT - DI events
47	CNT - E events
48	CNT - F events
49	CNT - G events
50	CNT - DI.EI.F events
51	CNT - DI.EI.-F.-G events
52	CNT - DI.EI.F.-G events
53	CNT - (DI&EI)1.EI.-F.-G events
54	CNT - (DI&EI)2.EI.-F.-G events

	[Words 37-54:

            Bits 0-3 = (16-n) for n = 1,...,16
                     = 15 for n = 0
           Bits 4-31 = Sum(cnt(i)) for i=1,n and n=l,...,16
                     = only bit 4 on for n = 0

           where n is the number of counts data readouts(cnt) within an album.
           Only readouts with the trend check satisfied(not undetermined or
           rejected) are included in the sum.

55	Halfword 1 - APP 6, Leakage current, Page 0
	Halfword 2	      "                   1
56	Halfword 1	      "             	  2
	Halfword 2	      "		          3
57	Halfword 1 - APP 36, MED temp., Page 1
	Halfword 2	"      "	Page 3

58	Number of LED or MED PHA points padded.
59	Halfword 1 - Number of LED PHA points with Ll=R(T4=1)
	Halfword 2 - Number of MED PHA points rejected because event type
                     was -F and F pulse height was >1 or because event type
                     was F and F pulse height was = 0.
60	Halfword 1 - Number of LED PHA points with pulse heights
 	             forced to zero because LED was off.
	Halfword 2 - Number of MED PHA events of word 59, Halfword 2
		     that were forced to be rejected(by setting
		     F pulse height to zero and event type to F
		     event) because MED was off.
61	Halfword 1 - Number of A.B.-C events with T2,T3 = 0,0
	Halfword 2 - Number of A.B.-C events with T2,T3 = 0,1
62	Halfword 1 - Number of A.B.-C events with T2,T3 = 1,0
	Halfword 2 - Number of (A&B)2.A.B.-C events with T2,T3 = 0,0
				and (A&B)2.A.B.-C rate used.
63	Halfword 1 - Number of (A&B)2.A.B.-C events with T2,T3 = 0,l
				and (A&B)2.A.B.-C rate used.
	Halfword 2 - Number of (A&B)2.A.B.-C events with T2,T3	= 0,0
				and A.B.-C rate used.
64	Halfword 1 - Number of (A&B)2.A.B.-C events with T2,T3	= 0,l
				and A.B.-C. rate used.
	Halfword 2 - Number of (A&B)2.A.B.-C events with T2,T3	= 1,0
				(neither rate used).
65	Halfword 1 - Number of (A&B)l.A.B.-C events with T2,T3	= 0,0
				and (A&B)l.A.B.-C rate used.
	Halfword 2 - Number of (A&B)l.A.B.-C events with T2,T3	= 0,l
				and (A&B)l.A.B.-C. rate used.
66	Halfword 1 - Number of (A&B)l.A.B.-C events with T2,T3	= 0,0
				and (A&B)2.A.B.-C rate used.
	Halfword 2 - Number of (A&B)l.A.B.-C events with T2,T3	= 0,1
				and (A&B)2.A.B.-C rate used.
67	Halfword 1 - Number of (A&B)l.B.-C events with	 T2,T3	= 0,0
				and A.B.-C. rate used.
	Halfword 2 - Number of (A&B)l.B.-C events with	 T2,T3	= 0,1
				and A.B.-C. rate used.
68      Halfword 1 - Number of (A&B)l.B -C events with	 T2,T3	= 1,0
				(no rate available).
	Halfword 2 - Spare

 NEXT 5 Halfwords		(repeated 128 times)
	Halfwords		1-2 LED Data Point
	Halfwords		3-5 MED Data Point
388	WORDS	TOTAL



LED data point

                    0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15
       Halfword 1:  G     T1 T2 T3 T4 A  A  A  A  A   A   A   A   A   A
       Halfword 2:              B  B  B  B  B  B  B   B   B   B   P   P

               G = 0 for High gain
                 = 1 for Low gain


T1 = a6 bit at accumulation time(1/2 sequence before readout)

   = 1 (A&B)2.A.B.-C or (A&B)2.A.-B.-C events if HIGH GAIN 
       during 2nd through last readouts on page 0,
              all readouts on page 1, and
              1st readout on page 2.

   = 0 [A.B.-C or A.-B.-C events if HIGH GAIN]
       during 2nd through last readouts on page 2,
              all readouts on page 3, and
              lst readout on page 0.

     If LOW GAIN event, event type is (A&B)l.A.B.-C or (A&B)1.A.-B.-C
     (a6 is irrelevant).

T2 and T3 are used for B events only.

T2 = 1 if no rate readout that would have counted this PHA event was available.

T3 is used only if T2 = 0. Otherwise T3 = 0.

T3 = 0 if the rate readout was > 0.
   = 1 if the rate readout was = 0

T4 = 1 if Ll = R and Ll has not been forced
       equal to R due to LED being off.
   = 0 otherwise


MED data point

                    0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15
       Halfword 1   G  M  -  T1 T2 T3 D  D  D  D  D   D   D   D   D   D
       Halfword 2   -  -  -  -  -  -  E  E  E  E  E   E   E   E   E   E
       Halfword 3   G  M  -  -  -  -  F  F  F  F  F   F   F   F   P   P

              G = 0 for High gain
	        = 1 for Low gain

	      M = 0  denotes a multiplication factor of 10
		  1                "                    50

   T1 = a4 bit at accumulation time(1/2 sequence before readout)
      = 1 during 2nd through last readouts of snapshot 0, all
	  readouts of snapshot 1, and lst readout of snapshot 2.
      = 0 during 2nd through last readouts of snapshot 2, all
	  readouts of snapshot 3, and lst readout of snapshot 0.

   T1 is only set if T2, T3 (event type bits) = 0, 1


	T1  T2  T3	EVENT

        0   0   0	DI.EI.F.G
	1   0   1	DI.EI.-F.-G
	0   0   1	(DI&EI)1.EI.-F.-G
	0   1   0   	DI.EI.F.-G
	0   1   1       (D&E)2.EI.-F.-G


IMP-8 Trend check

Consider two readouts of a rate N1 and N2 in sequences S1 and S2
respectively (S2>S1).

If N1 or N2 is padded or if S2 not equal S1 + Ns (where Ns = the number of
sequence between readouts of that rate), then the trend check is
undetermined(T = 1).

If S2 = S1 + Ns and

     1/15 < N2'/N1' < 15 where N1' = max(N1,1)
                               N2' = max(N2,1)

then N2 is accepted by the trend check(T = 0).

Otherwise, the trend check rejects N2.

If N2 is rejected by the trend check, it will still be used as N1 in the
trend check of the next readout of that rate.