Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Handling of data gaps during the livetime computation: Fermi data on-ground can have two different kinds of gaps: gaps in the Digi file or gaps in the Merit file. The former type can be the results of a copy/download problem from the spacecraft or the ground stations, while the latter can be caused by a problem during the reconstruction (the Recon step). Both of them can also result from problems during the merging of different chunks of data. Note that all these problems are usually temporary, and gaps are usually filled with a roll back of the appropriate processing steps. The old code used to try to compensate for those gaps, by subtracting the corresponding deadtime from the livetime of the affected bin(s). The new code instead isolates the time span affected by these problems in single bins, which will have zero livetime, and thus will generate bad time intervals which will be excluded by downstream software (like the Science Tools).
  • Sun coordinates: the new code now compute the Sun coordinates and saves them in the output FT2 file
  • Exploit all the attitude information: the attitude information is issued by the spacecraft at 5 Hz, and it is formatted in ATT messages available on-ground in the so-called "Magic 7" files. The position information instead is issued by the spacecraft at 1 Hz. The old code used only those ATT messages issued contemporaneously to ORB messages, discarding the others. The new code instead keeps all the information. So when interpolation is needed, the old code have less information than the new one, slightly degrading the quality of the interpolations. The difference is anyway unimportant in most of the circumstances, leading to very small improvement in the quality of the interpolations and extrapolations of the satellite attitude.
  • Check for proper input: the new code check that both the Digi file both the Merit file are ordered by event ID and time, and throws an exception if this is not the case. Out of order events can result from merging or download problem.

...

Executables

makeFT2.exe

To create an FT2 file you can use the makeFT2.exe executable. There are two flavours of FT2 files: the "fake" FT2 file, and the normal FT2 file. The former lacks the livetime information, and it is generated inside the pipeline at the chunk level to be used as input to Recon. The latter provides the livetime information, and it is generated inside the pipeline at the run level.
To produce an FT2 file you will always need a Magic 7 file. If you want to compute also the livetime ("normal" FT2 file), you will need also a Digi file, a Merit file, and a DigiGAP file. You can download all those files for a particular run from the data catalog.
This executable will normally produce a FT2 file with 1s time binning. If, when producing a normal FT2 file, there are gaps in the data files, as described above, some bins in the FT2 file will have a duration < 1 s, and livetime=0. These time intervals will be treated by downstream software as Bad Time Intervals (BTIs) and they will be excluded from scientific analysis.

How to use

Code Block

makeFT2.exe

makeFT2.exe : produce the FT2 file for the Fermi mission.

(See http://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Cicerone/Cicerone_Data/LAT_Data_Columns.html#SpacecraftFile)                                      

Usage: 

-Produce the 'fake' FT2 file (without livetime):

makeFT2.exe -ft2start [start time] -ft2stop [stop time]
            -m7file [Magic 7 file] -ft2file [output FT2 file]
            [-clobber ['yes' or 'no'] ]                      

-Produce a regular FT2 file (with livetime):

makeFT2.exe -ft2start [start time] -ft2stop [stop time]
            -m7file [Magic 7 file] -ft2file [output FT2 file]
            -digifile [Digi file] -meritfile [Merit file]    
            -gapfile [Digi gap file]
            [-clobber ['yes' or 'no'] -verify ['yes' or 'no']
             -dataquality [DQ flag] -latconfig [LAT config value]
             -templateFT2 [FT2 template] -version [version number] ]

Parameters:

 -ft2start         Start time for the output FT2 file (MET)
 -ft2stop          Stop time for the output FT2 file (MET)
 -m7file           Input Magic 7 file
 -ft2file          Name for the output FT2 file
 -digifile         Input Digi file
 -meritfile        Input Merit file
 -gapfile          Input Digi gap file
 -clobber          (yes|no) Overwrite an existing output? (default = no)
 -dataquality      Data Quality flag to set (default = 2)
 -latconfig        LAT configuration status (default = 1)
 -templateFT2      Override the default template file for the output FT2
 -version          Version number for the file (integer,default=1)
 -configFile       User-provided configuration file path
 -verify           (yes|no) Verify Merit and Digi for gaps (default=yes)
 -help             Prints this help

mergeFT2.exe

This program merge bins from 1s FT2 file producing a 30s FT2 file, or a FT2 file with the specified binning. Note that some bins in the output file could have a different duration than the target binning, since the program will prematurely cut bins for example if LAT_MODE or LAT_CONFIG change value, or if it encounters bins with livetime=0 in the input FT2 file. In any case the program will never produce bins with a duration greater than the target binning.

Validation

Here I collect the results of the testing I performed, comparing the output generated by the old ft2Util code with the output generated by my code.

...