Observation Simulation (gtobssim) Tutorial

See:
Related Science Tools:
Popup Navbar Window:

This tutorial provides some step-by-step examples of how to simulate Fermi observations using gtobssim application. For example a Guest Investigator planning a proposal may need to make a realistic assessment of the detection significance achievable within a given time interval or the ability to constrain source model parameters for a given source intensity. More subtle issues may also be explored, e. g., how sensitive a given observation may be to pulsed emission of a given flux and modulation depth, spatially extended emission, or pointed versus survey mode observation scenarios.

The gtobssim tool (and related gtorbsim tool) produces Fermi simulated data files, which can then be analyzed with the ScienceTools following the same procedure as with the real data.

FT2 File Required. This tutorial assumes that you have an FT2 (spacecraft data file) already generated with the gtorbsim tool, or you have obtained a sample FT2 file. (See gtorbsim Tutorial: Download FT2 Files.)

Steps:

 
  1. Download the latest background models.

These are the Galactic diffuse emission model and the corresponding model for the Extragalactic isotropic diffuse emission.
 
  1. Prepare XML source library files

These are XML files containing the source model definitions.

 
  1. Create a list of XML input file names

Various XML source libraries already exist. In addition to creating custom libraries, you can make sources in these libraries available by including the full paths to the files in this list.

 
  1. Create a list of sources

These are the sources to be modeled.

 
  1. Specify or create a pointing and livetime history file

You can: use an existing pointing and livetime history file; create one using the gtorbsim tool; or define a pointing strategy and let gtobssim compute one.

 
  1. Run gtobssim

 

1. Download the latest background models

Download the latest background models for the Galactic diffuse emission model and the corresponding model for the Extragalactic isotropic diffuse emission model (which includes the residual cosmic-ray background) from the Fermi LAT U33 Disk Browser.

At the time this was written (February 2011), P6_V3_DIFFUSE was the recommended IRF, and the corresponding Galactic and Extragalactic models were gll_iem_v02.fit and isotropic_iem_v02.txt, respectively.

Notes:

  • The isotropic spectrum referenced above is valid only for the P6_V3_DIFFUSE response functions and only for data sets with front + back events combined.

 

2. Prepare the XML source library files

The XML source library files contain the XML definitions of the sources that are used by gtobssim. By themselves, these files are not valid XML documents; rather, they contain XML "source_library" tags that are compiled in memory into a valid XML document that is then parsed by the software. (Note that these files are analogous to, but not compatible with gtlike xml source model files.)

The following example shows how to define point sources with simple and broken power-law spectra, diffuse sources using FITS image files as templates in two different ways, and an isotropic diffuse source.

The following xml files can be extracted from this document and edited with a text editor, or created with the Model Editor tool (which creates models for gtobssim that are also available for gtlike).

Notes:

  • Other examples can be found in the flux and observationSim packages. Any given XML file may contain more than one source_library tag, but each source_library must have a unique title attribute.
  • The name of the xml file should have the "xml" extension.

3. Create a list of XML input file names

When gtobssim is run, a list of XML input file names can be provided. This list is an ascii file giving full or relative paths to the XML files containing the source definitions. If this list is omitted (by entering "none"), the following XML files are used by default:

Note: If there is only one XML file, the name of that file can be given rather than the ascii list.

4. Create a list of sources

This is an ascii file containing a list of the sources that are to be modeled. For example, assuming the above source_library is used, then to model 3C 279, 3C 273, and the interstellar and extragalactic diffuse components, this file would contain:

Note: Lines beginning with "#" are treated as comments.

5. Provide a pointing and livetime history file

You have the option of:

  • providing an existing pointing and livetime history file to gtobssim,
  • creating one using the gtorbsim tool, or
  • letting gtobssim calculate the spacecraft orbit and attitude using one of the pointing strategies available from within the astro package.

The pointing and livetime history file may be a FITS file with this format, or it may be an ascii file with a format defined by this code.

6. Run gtobssim

Assuming the above XML file is example_library.xml, and that the list of sources is called source_names.dat, you can run gtobssim as follows (for a one day long simulation):

Note: Observe that the startdate parameter has been set to 2009-01-20. Since the photon arrival times are referred to the mission start date of 2001-01-01 00:00:00, the earliest possible photon arrival time in the resulting FT1 file would be 254102400 MET seconds.


Last updated by: Chuck Patterson 02/11/2011