Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Reprocessing P130 used the new ft2Util code to produce FT2 files.

Here I present the comparison between the files produced during P130 and the old files, archived in the astro server and produced with the old code.

All plots refers to 1s FT2 files, unless otherwise stated.

For each quantity q in the FT2 file I report a histogram of the fractional difference between the "new" FT2 file (from P130) and the "old" one (from the archive): (qNEW-qOLD)/qOLD.

There are two main reasons for the small differences observed in the comparison:

  1. The new code does a better job at the margin of the runs: the spacecraft position and attitude (and related quantities) are computed starting from messages in the Magic 7 file. The new code uses the whole M7 file, which usually cover a broader time interval than the run, to compute position and attitude at the start time and end time of the run. The old code, instead, discarded all the messages before the start and after the stop of the run, computing position and attitude at those instants by extrapolation.
  2. A bug in the old code (see below for explanations) for the LIVETIME computation.

Note that in the following comparison I used only time bins in common between the two sets of files (i.e., with the same START and STOP time). Since we changed the way of handling gaps and other things (like change in mode or configuration), there are a small number of discrepancies in the binning scheme between the two files.

Whole FT2

For this first set of results, I compared each pair of FT2 files from the start of the first bin to the end of the last one. Thus, differences due to Reason 1 above are evident.

Quantity

Columns in the FT2 file

Histograms

Comment

Bin start and stop

START, STOP

No differences, by definition.

Spacecraft position in ECI coordiantes (x,y,z)

SC_POSITION array

The differences in a very small number of bins are most probably due to Reason 1 above.

Ground point latitude and longitude

LAT_GEO, LON_GEO

Reason 1.

Spacecraft altitude

RAD_GEO

Reason 1.

Zenith direction

RA_ZENITH, DEC_ZENITH

 

McIlwain coordinates

L_MCILWAIN, B_MCILWAIN

 

Geomagnetic latitude

GEOMAG_LAT

16 percent of the time bins are in the underflow bin of the histogram. This is due to a known issue: on Feb. 2, 2010 we changed the quantity from unsigned to signed. Thus, all old FT2 files produced before that date have a always-positive GEOMAG_LAT, while the reprocessed ones have it signed from the beginning of the mission.

South Atlantic Anomaly flag

IN_SAA

 

Z-axis direction

RA_SCZ, DEC_SCZ

Reason 1.

X-axis direction

RA_SCX, DEC_SCX

Reason 1.

Orbital Pole direction

RA_NPOLE, DEC_NPOLE

Here there are considerable differences, because the new code compute the coordinates of the Orbital Pole in a different way respect to the old one. If vi is the position vector for the i-th bin in the FT2 file, the old code computed the orbital pole vector for the i-th bin as the cross product between vi-1 and vi, while the new code uses the product vi cross vi+1. Thus basically I should compare each i-th entry in the new set with the (i+1)th entry in the old one, to obtain the same results. I did this test, and everything is ok, see below.

Rocking angle

ROCK_ANGLE

Reason 1.

LAT GNC mode

LAT_MODE

 

LAT Configuration

LAT_CONFIG

 

Data quality flag

DATA_QUAL

Need to check why there are these differences in a couple of runs. I suspect those are BAD runs, or runs with the new values for the DQM flag.

Attitude quaternion

QSJ_1,QSJ_2,QSJ_3,QSJ_4

Reason 1.

Live time

LIVETIME

Differences are due to the bug already found in the old FT2 code. See below.

Sub-interval

Here I repeated the same exercise, but excluding the first and the last 50 seconds from each file, to avoid the "border issue". Indeed, most of the differences are now gone:

Quantity

Columns in the FT2 file

Histograms

Comment

Bin start and stop

START, STOP

No differences, by definition.

Spacecraft position in ECI coordiantes (x,y,z)

SC_POSITION array

 

Ground point latitude and longitude

LAT_GEO, LON_GEO

 

Spacecraft altitude

RAD_GEO

 

Zenith direction

RA_ZENITH, DEC_ZENITH

 

McIlwain coordinates

L_MCILWAIN, B_MCILWAIN

 

Geomagnetic latitude

GEOMAG_LAT

16 percent of the time bins are in the underflow bin of the histogram. This is due to a known issue: on Feb. 2, 2010 we changed the quantity from unsigned to signed. Thus, all old FT2 files produced before that date have a always-positive GEOMAG_LAT, while the reprocessed ones have it signed from the beginning of the mission.

South Atlantic Anomaly flag

IN_SAA

 

Z-axis direction

RA_SCZ, DEC_SCZ

 

X-axis direction

RA_SCX, DEC_SCX

 

Orbital Pole direction

RA_NPOLE, DEC_NPOLE

Here there are considerable differences, because the new code compute the coordinates of the Orbital Pole in a different way respect to the old one. If vi is the position vector for the i-th bin in the FT2 file, the old code computed the orbital pole vector for the i-th bin as the cross product between vi-1 and vi, while the new code uses the product vi cross vi+1. Thus basically I should compare each i-th entry in the new set with the (i+1)th entry in the old one, to obtain the same results. I did this test, and everything is ok, see below.

Rocking angle

ROCK_ANGLE

 

LAT GNC mode

LAT_MODE

 

LAT Configuration

LAT_CONFIG

 

Data quality flag

DATA_QUAL

Need to check why there are these differences in a couple of runs. I suspect those are BAD runs, or runs with the new values for the DQM flag.

Attitude quaternion

QSJ_1,QSJ_2,QSJ_3,QSJ_4

 

Live time

LIVETIME

Differences are due to the bug already found in the old FT2 code. See below.

There are still some differences in some quantities related to the EarthCoordinate class of the astro package. By looking at the time histories, all the differences are before a certain date, thus they are almost certainly related to a bug-fix in the astro package. (to be confirmed)

Orbital Pole

I repeated the comparison between the RA_NPOLE and DEC_NPOLE quantities, but comparing a given i-th bin of the old version of the FT2 files with the i-th-1 bin in the new FT2 file, to solve the discrepancy in the computation method. As expected, the differences vanish:

Livetime

As already found in my former test (see the mother page), the old code had a bug in the livetime computation. Here I show the difference in livetime between the two codes, as function of time, thus on the y-axis there is the usual fractional difference, while on the x-axis there is the MET time (in seconds):
(text continue below the gallery, click on an image to enlarge it)

Gallery
includeLIVETIME_000.png,LIVETIME_001.png,LIVETIME_002.png,LIVETIME_003.png,LIVETIME_004.png,LIVETIME_005.png,LIVETIME_006.png,LIVETIME_007.png,LIVETIME_008.png,LIVETIME_009.png,LIVETIME_010.png,LIVETIME_011.png,LIVETIME_012.png,LIVETIME_013.png,LIVETIME_014.png,LIVETIME_015.png,LIVETIME_016.png,LIVETIME_017.png,LIVETIME_018.png,LIVETIME_019.png,LIVETIME_020.png,LIVETIME_021.png,LIVETIME_022.png,LIVETIME_023.png,LIVETIME_024.png,LIVETIME_025.png,LIVETIME_026.png,LIVETIME_027.png,LIVETIME_028.png,LIVETIME_029.png,LIVETIME_030.png,LIVETIME_031.png,LIVETIME_032.png,LIVETIME_033.png,LIVETIME_034.png,LIVETIME_035.png,LIVETIME_036.png,LIVETIME_037.png,LIVETIME_038.png,LIVETIME_039.png,LIVETIME_040.png,LIVETIME_041.png,LIVETIME_042.png,LIVETIME_043.png,LIVETIME_044.png,LIVETIME_045.png,LIVETIME_046.png,LIVETIME_047.png,LIVETIME_048.png,LIVETIME_049.png,LIVETIME_050.png,LIVETIME_051.png,LIVETIME_052.png,LIVETIME_053.png,LIVETIME_054.png,LIVETIME_055.png,LIVETIME_056.png,LIVETIME_057.png,LIVETIME_058.png,LIVETIME_059.png,LIVETIME_060.png,LIVETIME_061.png,LIVETIME_062.png,LIVETIME_063.png,LIVETIME_064.png,LIVETIME_065.png,LIVETIME_066.png,LIVETIME_067.png,LIVETIME_068.png,LIVETIME_069.png,LIVETIME_070.png,LIVETIME_071.png,LIVETIME_072.png,LIVETIME_073.png,LIVETIME_074.png,LIVETIME_075.png,LIVETIME_076.png,LIVETIME_077.png,LIVETIME_078.png,LIVETIME_079.png,LIVETIME_080.png,LIVETIME_081.png,LIVETIME_082.png,LIVETIME_083.png,LIVETIME_084.png,LIVETIME_085.png,LIVETIME_086.png,LIVETIME_087.png,LIVETIME_088.png,LIVETIME_089.png,LIVETIME_090.png,LIVETIME_091.png,LIVETIME_092.png,LIVETIME_093.png,LIVETIME_094.png,LIVETIME_095.png,LIVETIME_096.png,LIVETIME_097.png,LIVETIME_098.png,LIVETIME_099.png,LIVETIME_100.png
columns8
tile
sortname

As you can see, differences are distributed around zero, with maximum differences of the order of few percent most of the time, except for some exceptional cases. Thus, they should cancel out when merging the 1s bins in the 30s ones.

Indeed, this is the histogram of the fractional difference in LIVETIME for 30s FT2 files:

Note that there is a rather small number of entries in this histogram. This is because the new code changed the binning scheme for the 30s FT2 file, thus the old and the new sets of 30s file are often not comparable on a bin-by-bin basis. Indeed, start and stop times of the bins are most of the time different between the two sets. I do not know how to solve this issue... Interpolating is not an option, obviously.