Photon and spacecraft data are all that a user needs for the analysis. For the definition of LAT data products see the information in the Cicerone.
The LAT data can be extracted from the Fermi Science Support Center web site, as described in section Extract LAT data. Preparing these data for analysis depends on the type of analysis you wish to perform (e.g. point source, extended source, GRB spectral analysis, timing analysis, etc). The different cuts to the data are described in detail in the Cicerone.
Data preparation consists of two steps.
Here we give an example of how to prepare the data for the analysis of a point source. For your particular source analysis you have to prepare your data performing similar steps, but with the cuts suggested in Cicerone for your case.
In this section, we look at making basic data cuts using gtselect. By default, gtselect prompts for cuts on:
However, by using hidden parameters defined on the command line (or using the 'Show Advanced Parameters' check box in GUI mode), you can also make cuts on:
For this example we use data that was extracted using the procedure described in the Extract LAT Data tutorial. The original selection used the following information:
The LAT operated in survey mode for that period of time. We provide the user with the original photon and spacecraft data files extracted in the Extract LAT data tutorial:
ls *_PH* > events.txt
This input file can be used in place of a single input events (or FT1) file by placing an @ symbol before the text filename. The output from gtselect will be a single file containing all events from the combined file list that satisfy the other specified cuts.
For point source analysis, it is recommended that you include events with a high probability of being photons. This cut is performed by selecting diffuse class events with the gtselect tool by including the hidden parameters evclsmin and evclsmax on the command line. For LAT Pass 6 data, diffuse events are specified as event classes 3 and 4. This value may change as LAT data processing develops.
Now run gtselect to select the data you wish to analyze. For this example, we consider the diffuse class photons within a 20 degree acceptance cone of the blazar 3C 279. We apply the gtselect tool to the data file as follows:
prompt> gtselect evclsmin=3 evclsmax=4
Input FT1 file[] @events.txt
Output FT1 file[] 3C279_region_filtered.fits
RA for new search center (degrees) (0:360) [0] 193.98
Dec for new search center (degrees) (-90:90) [0] -5.82
radius of new search region (degrees) (0:180) [180] 20
start time (MET in s) (0:) [0] 239557417
end time (MET in s) (0:) [0] 255398400
lower energy limit (MeV) (0:) [30] 100
upper energy limit (MeV) (0:) [300000] 100000
maximum zenith angle value (degrees) (0:180) [180] 105
Done.
prompt>
If you don't want to make a selection on a given parameter, just enter a zero (0) as the value.
In this step we also selected the maximum zenith angle value (105 degrees) as suggested in the Cicerone. Photons coming from the Earth limb are a strong source of background. You can minimize this effect with a zenith-angle cut. The value of 105 degrees is the one most commonly used, and provides an 8 degree buffer between your region of interest (ROI) and the Earth's limb. In the next step, gtmktime will remove any time period that our ROI overlaps this buffer region. While increasing the buffer (reducing zmax) may decrease the background rate from albedo gammas, it will also reduce the amount of time your ROI is completely free of the buffer zone and thus reduce the livetime on the source of interest.
Notes:
The filtered data is provided here.
gtselect writes descriptions of the data selections to a series of 'Data Sub-Space' (DSS) keywords in the EVENTS extension header. These keywords are used by the exposure-related tools and by gtlike for calculating various quantities, such as the predicted number of detected events given by the source model. These keywords must be same for all of the filtered event files considered in a given analysis. gtlike will check to ensure that all of the DSS keywords are the same in all of the event data files. For a discussion of the DSS keywords see the Data Sub-Space Keywords page.
There are multiple ways to view information about your data file. For example:
fhelp fkeypar
prompt> gtvcut
Input FITS file[] 3C279_region_filtered.fits
Extension name[EVENTS]
DSTYP1: POS(RA,DEC)
DSUNI1: deg
DSVAL1: CIRCLE(193.98,-5.82,20)
DSTYP2: TIME
DSUNI2: s
DSVAL2: TABLE
DSREF2: :GTI
GTIs:
239557417.494 239558069.093
239559567.98 239563954.084
239565647.986 239569844.085
...
255384024.931 255388191.087
255390039.929 255394247.086
255396028.929 255398400
DSTYP3: ENERGY
DSUNI3: MeV
DSVAL3: 100:100000
DSTYP4: EVENT_CLASS
DSUNI4: dimensionless
DSVAL4: 3:3
DSTYP5: ZENITH_ANGLE
DSUNI5: deg
DSVAL5: 0:105
prompt>
You may have noticed that all of these files have a GTI extension in them. Before we look at making selections with the gtmktime tool, we should probably clarify what at Good Time Interval (GTI) is:
How are these interpreted for Fermi?
Notes:
gtmktime is used to update the GTI extension and make cuts based on spacecraft parameters contained in the spacecraft (pointing and livetime history) file. It reads the spacecraft file and, based on the filter expression and specified cuts, creates a set of GTIs. These are then combined (logical and) with the existing GTIs in the Event data file, and all events outside this new set of GTIs are removed from the file. New GTIs are then written to the GTI extension of the new file.
Cuts can be made on any field in the spacecraft file by adding terms to the filter expression using C-style relational syntax:
!->not, &&-> and, ||-> or, ==, !=, >, <, >=, <=
ABS(), COS(), SIN(), etc., also work
NOTE: Every time you specify an additional cut on time, ROI, zenith angle, or event class using gtselect, you must run gtmktime to reevaluate the GTI selection.
Several of the cuts made above with gtselect will directly affect the exposure. gtmktime will select the correct GTIs to handle these cuts, including the complex cut on zenith angle. The easy way to implement this cut is to exclude time intervals where the buffer zone defined by the zenith cut intersects the ROI from the list of GTIs. In order to do that, run gtmktime and answer "yes" at the prompt:
Apply ROI-based zenith angle cut [ ] yes
Applying this cut is especially important if your ROI is small (< 20 degrees) bringing your source of interest close to the Earth's limb.
Note: If you are studing a very broad region (or the whole sky) you would lose most (all) of your data when you implement the zenith angle cut. In this case you can allow all time intervals where the cut intersects the ROI, but the intersection lies outside the FOV. To do this, run gtmktime specifying a filter expression defining your analysis region, and answer "no" to the question regarding the ROI-based zenith angle cut:
Filter expression [ ] ( ANGSEP(RA_ZENITH,DEC_ZENITH,RA_SCZ,DEC_SCZ)
< limb_angle_minus_FOV ) || (
ANGSEP(RA_ZENITH,DEC_ZENITH,RA_of_center_ROI,DEC_of_center_ROI) +
radius_ROI < zenith_cut )
Apply ROI-based zenith angle cut [ ] no
Here, RA_of_center_ROI, DEC_of_center_ROI and radius_ROI correspond to the ROI selection made with gtselect, zenith_cut is defined as 105 degrees (as above), and limb_angle_minus_FOV is (zenith angle of horizon - FOV radius) where the zenith angle of the horizon is 113 degrees.
gtmktime also provides the ability to exclude periods when some event has negatively affected the quality of the LAT data. To do this, we select good time intervals (GTIs) by using a logical filter for any of the quantities in the spacecraft file. Some possible quantities for filtering data are:
Here it is an example of running gtmktime on the 3C 279 filtered events file. It is useful to rename the spacecraft file to something easier. Here, we have renamed L100806104523E0D2F37E54_SC00.fits to spacecraft.fits.
prompt> gtmktime
Spacecraft data file[] spacecraft.fits
Filter expression[] DATA_QUAL==1 && LAT_CONFIG==1 && ABS(ROCK_ANGLE)<52
Apply ROI-based zenith angle cut[yes]
Event data file[] 3C279_region_filtered.fits
Output event file name[] 3C279_region_filtered_gti.fits
The data with all the cuts described above is provided in this link.
The renamed spacecraft
file is also available.
After the data preparation it is advisable to take a look at your data before beginning the detailed analysis. The Explore LAT data tutorial has suggestions on method of getting a quick preview of your data.
Last updated by: Elizabeth Ferrara 08/06/2010