gtophase Help File
This tool operates on input event file(s) to compute an orbital phase for a photon arrival time of each event, and writes it to, by default, PULSE_PHASE column of the event file(s). If necessary, this tool reads the spacecraft orbit file and performs the barycentric correction and the binary demodulation to each photon arrival time on the fly. gtophase automatically extracts one or more ephemerides from an existing pulsar ephemerides database file. Unlike the similar gtpphase tool, there is no option for entering orbital ephemerides manually. This tool does not produce a separate output file, but operates directly on the input file in place. If execution is successful, the tool produces no textual output.
gtorbsim Help File
The GSSC Orbit Simulator, gtorbsim, is a spacecraft attitude calculator based on the code already implemented in the general purpose scheduling and planning system TAKO (Timeline Assembler Keyword Oriented) at the GLAST Science Support Center. The simulator inherits many features of TAKO, but it does not have any scheduling capabilities. The main purpose of this simulator is:
Several SAE tools such as gtobssim, gtltcube, gtlike, etc. require the spacecraft data file as input. You may use the spacecraft data file provided by the GSSC, but in many cases you will probably need to generate that file if you want to perform a particular analysis of simulated data. The first input you will have to provide to gtorbsim is the observation mode strategy. Several operational modes are planned for GLAST, but the spacecraft will acquire scientific data only in survey and pointed modes. The sky survey mode is basically zenith pointed throughout the orbit and has two sub modes:
In pointed observation mode, the Z-axis of the observatory is commanded to point at a celestial target. An observing sequence is implemented via a series of commanded targets. There are two sub modes for observing any given target:
Even though it will be possible to do pointed observations, the large FOV of the LAT will provide such extensive data on individual sources that it will be difficult to justify modes of observation other than sky survey. For that reason, it is expected that GLAST will operate in sky survey mode ~90% of the time. With the gtorbsim tool you may choose to calculate the attitude in survey or pointed mode. In survey mode, you may chose between two options:
or
On the other hand, in pointed mode the spacecraft stares at a specified location in the sky identified by an RA and DEC provided by the user. In order to properly calculate the attitude, the orbit simulator needs to know the spacecraft position in the entire interval of interest. Therefore, it must be capable of either reading in a file The orbit simulator can handle three different types of ephemeris files:
In addition, the initial spacecraft position in celestial coordinates should be provided by the user as an input parameter. The South Atlantic Anomaly region: The instrument high voltage power supplies will be protected when the spacecraft traverses the South Atlantic Anomaly (SAA). This will occur about 15% of the time. gtorbsim has the capability to handle SAA constraints. The SAA region is appoximated by a polygon, which is specified by the Longitude and Latitude of its vertices. It is passed to the program as an input file where the specification of the polygon is given. In cases where the Earth limb: The Earth Limb Tracing maneuvering is an optional feature that can easily be enabled/disabled using the appropriate input parameter in gtorbsim. This maneuvering consists of tracing the Earth Limb if a target is Earth-occulted. Targets are assumed to be occulted if their Earth angle (Angle between target and the Earth's Limb) is smaller, or – at most – equal to 30 degrees. Once the target is occulted by the Earth, the orbit simulator finds when it is visible again, and where it is coming out from the Earth's Limb. The simulator then finds the angular separation between the in-occult and out-occult position. And finally, the orbit simulator allows the local z-axis to sweep equal angles in equal times during its motion along the Earth's Limb. Generally, when using TAKO Science timelines, this step is not necessary since the TAKO avoids scheduling any target during occultation time. However, in special cases, the occultation constraint in TAKO can be intentionally disabled to achieve some observational goal. Consequently, the orbit simulator calculates the occultation times, and then performs the Earth Limb tracing maneuvering. The occultation times are calculated using the same algorithm that TAKO uses. The orbit simulator is designed so that inputs can be passed using the existing SAE infrastructure: by answering a prompt; as a list in a command; or using an input file. For this reason, the very first input of the simulator is the type of input, which can either be "console" or "file".
The same task could be performed from an ini file like this:
gtpsearch Help File
This tool searches for pulsations in data which is known or suspected to have a pulsation of a known approximate period or frequency. It is not useful for a so-called blind period search, in which data are examined for pulsations at any frequency. The
Performing a period search is straight forward if the object of interest is listed in a pulsar ephemerides database file. The example below shows how to perform the test under these
This command produces the following output message that describes the search criteria and explains the search result. A plot will also be produced.
gtpsf Help File
This tool calculates the effective point spread function, as a function of energy at a given source location, averaged over an observation. The theta and psf values are storaged in different extensions of the output FITS file. The allowed parameter ranges for emin, emax, and thetamax depend on which IRFs you are using. If you are outside the allowed ranges for a particular set of IRFs, then the code may (but not definitely) crash. gtpsf handles parameters following the FTOOLs model: They can be passed by answering a prompt for the parameter values, or as a list in a command line. This facilitates calling gtpsf from a script.
The example above could also be run from the command line as follows:
gtpspec Help File
gtpspec searches for pulsations in a relatively wide range of frequencies. It uses the Discrete Fast Fourier Transfer (FFT) technique to compute power spectrum density. This tool is suitable for a so-called blind period search, in which data are examined for pulsations at any frequency. Ephemeris information can be given in one of the following forms:
The example below shows how to perform a pulsation search in the simplest case, where one can assume no significant frequency variations exist throughout the observation. The time origin of
This command produces the following output message that describes the search criteria and explains the search result. A plot will also be produced.
gtptest Help File
gtptest applies all the statistical tests available with gtpsearch application to a series of pulse phase values stored in given even t files. The tool supports several test statistics available, including Chi-squared (X2), Z-squared-n ( Z2N), H, and Rayleigh (Z2N with N == 1). The example below shows how to perform periodicity tests on an event file that has been processed by gtpphase application, where a pulse phase has already been assigned to each photon and is stored in a default FITS column (PULSE_PHASE column).
This command produces the following output message that describes the types and the parameters of the periodicity tests that are performed, and explains the test results. A plot will also be produced, which shows a folded-light curve used in the chi-squared test.
gtpulsardb Help File
gtpulsardb is a utility for manipulating and accessing databases containing pulsar ephemeris data. Using this tool, one can accept input from any number of FITS files in the GLAST D4 format, and/or simple text files containing pulsar data. These input pulsar ephemerides can be filtered by pulsar name and other criteria, and the results stored in a new GLAST D4 FITS file. In the following example, the tool filters an ephemerides file to extract only ephemerides for a particular pulsar as follows:
The name supplied in the example was simply "Crab", but in general the "B-name" or "J-name" may be used as well as common names such as "Crab" or "Vela". Colloquial names and B-names are looked up using the ALTERNATIVE_NAMES extension to obtain the correct J-name, which is then used to look up ephemerides in the SPIN_PARAMETERS and/or ORBITAL_PARAMETERS. In order to merge two or more ephemerides files, it is necessary to supply more than one file name through the psrdbfile parameter. This is done using the "at-file" syntax familiar to
gtrspgen Help File
gtrspgen produces a Response Matrix (RSP) file required to analyze a binned spectrum in an OGIP-standard format. The response matrix is computed from the detailed response functions provided by the LAT instrument team. The elements of the matrix are directly related to the probability of an incident photon with a true energy of E being detected by the LAT with an apparent energy E'. The source position, the observation time, and energy grid are extracted from a PHA1 (spectrum) file, while the pointing/livetime history file provides the instrument orientation during the observation. The gtrspgen tool has two main options:
Two input files are required:
In binned spectral analysis, the apparent energies are binned. For the LAT data, the data have to be binned into energy channels (a PHAI file) using, the gtbin tool. But the first step in the analysis is to select all the counts from a region of 10 to 15 degrees around the burst position from the time range that includes the burst. These counts can be selected using the gtselect tool. For further information on how to perform a Binned GRB Spectral analysis using the LAT data, it is highly recommended that you read the Cicerone Manual, and/or the workbook. Parameters are passed followinb the FTOOLs model: by answering from a prompt; as a list in a command line; or by editing the parameter file. To be prompted for gtrspgen parameter values, enter (at the command line): gtrspgen Note: Not all parameters are prompted: some of the parameter are "hidden". If you want to change one of the "hidden" parameter you should specify its value in the command line. For example if you do want to open the GUI option enter (at the command line): gtrspgen gui=yes An example of how to run the gtrspgen tool is given below:
In this case, the GRB option was chosen. The spectrum file was generated previously with gtbin with the name: GRB.pha. The same task can also be run from the command line as follows:
gtselect Help FileSynopsis:
gtselect creates a new FITS file of selected rows from an input event data file based on user-specified cuts that are applied to each row of the input file. This application enables detailed selections to be made on data obtained from the GSSC data server or generated using The most common selections are these involving time range (minimum and maximum time) and energy range (minimum and maximum energy). For each cut that is applied Data Subspace (DSS) keywords are written to the EVENTS header of the output FITS file that describe the selection. This information is used by the likelihood tools and gtrspgen for computing exposure-related information. Furthermore, there are several selections that this tool will make that are Parameters are passed followinb the FTOOLs model: by answering from a prompt; as a list in a command line; or by editing the parameter file. The command line option facilitates calling gtselect from a script. To be prompted for gtselect parameter values, simply type in the command line: gtselect Note: Not all parameters are prompted: some of the parameter are "hidden". If you want to change one of the "hidden" parameter you should specify its value in the command line. For example, if you do not want to overwrite the existing output file, enter (at the command line): gtselect clobber=no
In this case, quasar 3C279 (centered on Ra=193.98, Dec=-5.82) was simulated using gtobssim (see gtobssim for further explanation) with a photon spectral index of 1.96, an integrated flux of 3.48e-4 m^-2s^-1, until a radius of 40 degrees . The energy for the simulated events ranges between 20 MeV and 200000 MeV. Using gtselect it possible to select the events with energy larger than 100 MeV and within a radius of 20 degrees centered on Ra=193.98, Dec=-5.82 and a time range between 220838400 and 225590400 MET seconds: The above example can also be run from the command line as follows:
gtsrcid
The gtsrcid tool is an application that finds counterparts for a list of detected sources using a catalog of potential counterparts. The source catalog, as well as the counterpart catalog, should be either in FITS or TSV (tab-separated values) format. The output counterpart candidate catalog will be in FITS format. A log file (gtsrcid.log) containing detailed information about the counterpart identification is generated and placed at the location where gtsrcid was executed. The method used to define the counterpart probability (or function of merit) may be either POSITION (e.g. the probability of positional coincidence), or any output catalog quantity that can be parameterized as a probability between 0 and 1 (see details in probMethod parameter The counterpart probability assigned by gtsrcid is defined as:
where
The positional coincidence probability is based on the assumption that the source location uncertainties can be modeled by a 2-dimensional normal distribution. In the most general form, the location uncertainty is described by an error ellipse, parameterized by the major and The user is allowed to enter a maximum number of counterpart candidates per source to be included in the output catalog (see the description of maxNumCpt parameter). Selection criterion on output catalog quantities can also be entered. Although gtsrcid is designed to digest a large variety of different catalog types and formats, a certain number of rules have to be satisfied for gtsrcid to work properly: 1) Source position. Knowledge of source position is mandatory for gtsrcid to work. So far, only celestial coordinates are supported (Right Ascension and Declination). The gtsrcid tool tries to find this information by first searching for columns with the Unified Content Descriptors POS_EQ_RA_MAIN and POS_EQ_DEC_MAIN. If those are not found, the following column name pairs are searched for (in the order shown): Radeg/DECdeg, RAJ200/DEJ200,_RAJ2000/_DEJ2000, or RA/DE. 2) Position uncertainties. No generic UCDs exist for this information, and the application searches for specific column names. First, elliptical errors regions are searched for by looking for the column names:
Finally, circular errors are searched for by looking for the column names:
If none of these column combinations has been found, the positional uncertainty will be taken from the parameters srcPosError (for the source catalog), and from cptPosError (for the counterpart catalog). 3) Sourcename. To keep track of the source information, each source should have a source name. The gtsrcid tool finds the source name by first searching for the UCD ID_MAIN. If no such UCD is found it then searches for columns named NAME or ID. Output. gtsrcid produces a catalog of counterpart candidates. Each row (entry) of this catalog presents the association of an object of the source catalog with an object of the counterpart catalog. For a given object of the source catalog, several entries may be output, corresponding to the different possible counterparts that have been identified from the counterpart catalog. Each of the associations will have an assigned counterpart probability, allowing a judgment to be made on the reality of the proposed association. Each counterpart candidate in the output catalog is specified by:
The coordinates and positional uncertainty of the counterpart are those of the object that has the smaller positional uncertainty in either of the two input catalog. In addition to the generic quantities, additional quantities may be copied from the input catalog to the output catalog. FITS columns for these copied quantities are preceded by @. New information can be derived in the output catalog by combining information from quantities that are found in both input catalogs. For example, a spectral index may be calculated from the fluxes given at two energies or frequencies in the input catalog. These so called "derived quantities" will be added as final columns to the output catalog. Note that these derived quantities can also be used to specify additional probability laws. For reading catalogs, gtsrcid makes use of the interface routines provided by the library catalogAccess. Consequently the catalog can be read in all formats that are supported by catalog Access. The gtsrcid tool writes the output catalog directly using cfitsio routines; thus, only the FITS format is supported on the output. The gtsrcid tool creates an ASCII log-file in the directory where the executable is executed for the purpose of: logging errors that occurred during task execution; logging the actions that gtsrcid performed for the counterpart search in order to control the proper execution of the For astronomical catalogs see: The HEASARC Catalog or the VizieR Service websites. Parameters are passed following the FTOOLs model: by answering from a prompt; as a list in a command line; or by editing the parameter file. To be prompted for gtsrcid parameter values, enter (at the command line): gtsrcid Note: Not all parameters are prompted: some of the parameter are "hidden". If you want to change one of the "hidden" parameter, specify its value in the command line. For example, it is possible to change the counterpart position by entering: gtsrcid cptPosError=0.01 There are several examples of how to run the tool in the workbook (see the LAT Science Tools section of the workbook --> Source Analysis - Source Identification); only one is reproduced here: A catalog of LAT sources (for a simulated LAT sky) is compared to the Third EGRET Catalog.
In this example the LAT Catalog is named:
while the counterpart Catalog is called:
The name of the output catalog is data/DC2_LATSourceCatalog_v1-3EG.fits. The position probability method was used (see formula 1). The name of the output catalog is gtsrcmaps Help File
gtsrcmaps convolves the components of the specified source model with the instrument response for a given observation. This tool is used as part of the GLAST binned likelihood analysis, so it is recommended that you read the gtlike help. One of the inputs of this tool is a counts map, which should be created using the gtbin tool (see gtbin help). The geometry in sky coordinates and energy binning of the output maps match that of the input maps. Another input is the binned exposure map. If the binned exposure map file does not exist, then gtsrcmaps will compute an all-sky map using the name provided at the prompt and using the energy bands of the 3D counts map. This exposure map can be reused for subsequent analyses of regions that cover the same time range and that use the same energy binning. Since the source map generation for point sources is fairly quick, and maps for many point sources may use a lot of disk space, it may be preferable to disable the generation of the source maps for point sources at this stage. If a source in the xml model is missing from the input source map file, gtlike will compute the maps on the fly. Relying on this mechanism is recommended only for point sources. To skip generating source maps for point sources, specify "ptsrc=no" on the command line when running gtsrcmaps. Parameters are passed followinb the FTOOLs model: by answering from a prompt; as a list in a command line; or by editing the parameter file. To be prompted for gtsrcmaps parameter values, enter (at the command line): gtsrcmaps Note: Not all parameters are prompted: some of the parameter are "hidden". If you want to change one of the "hidden" parameter you should specify its value in the command line. For example, if you want to skip generating source maps for point sources, enter (at the command line): gtsrcmaps ptsrc=no An example of how to run the tool is shown below:
This example above could also be run from the command line as follows:
gttsmap Help File
gttsmap computes a significance map based on the maximum likelihood test statistic (TS). (See, gtlike help.) The resulting map can be used to localize sources within the analysis region. It can also serve as input to follow up unbinned likelihood analysis. The TS maps are created by moving a putative point source through a grid of locations on the sky and maximizing -log(likelihood) at each grid point, with the other, stronger, and presumably well-identified sources included in each fit. New, fainter sources are then identified at local maxima of the TS map. In each point of the map the TS is obtained using the same procedure as in the unbinned likelihood analysis, so many of the gttsmap parameters are the same as the ones used in gtlike. (See the gtlike help.) Note: Run gtdiffrsp before running gttsmap. (See gtdiffrsp help.) One should keep in mind that this tool takes a lot of time to run because a CPU-intensive likelihood analysis is performed at a grid of different positions. Parameters are passed following the FTOOLs model (i.e., they can be passed interactively by: answering a prompt; as a list in a command line; or by editing the parameter file). To be prompted for gttsmap parameter values, simply type (at the command line): > gttsmap Note: Not all parameters are prompted; some are "hidden". In order to change one of the "hidden" parameters, specify its value in the command line. For example, to prevent overwriting an existing output file, type (at the command line): > gttsmap clobber=no
This example is performed in the region around 3C279 (194.046527,-5.789313). 3C279, 3C273 and the Galactic and Extragalactic background were included in the source model. The The example above could also be run from the command line as follows:
gtvcut Help FileSynopsis:
gtvcut is used to view the Data Sub-Space (DSS) keywords in a given extension, where the EVENTS extension is assumed by default. The DSS keywords scheme was introduced for recording data selection criteria in a systematic manner. For GLAST data, DSS keywords store information in the FITS headers about the selection criteria that have been applied to the data using the gtselect tool (see the gtselect help). The DSS keywords are used by the exposure-related tools (gtexpmap, gtrspgen) and by gtlike (see A filtering condition is expressed with a set of three or four keywords, DSTYP1, DSUNI1, DSVAL1, and DSREF1. For example, if we select events in a given time interval (TIME>start_time&&TIME<end_time) the filtering condition are stored as
If you select events in a given energy range (ENERGY>start_energy&&ENERGY<end_energy) the filtering conditions are stored as
Parameters are passed following the FTOOLs model (i.e., they can be passed interactively by: answering a prompt; as a list in a command line; or by editing the parameter file). To be prompted for gttsmap parameter values, simply type (at the command line): > gtvcut Note: Not all parameters are prompted; some are "hidden". In order to change one of the "hidden" parameters, specify its value in the command line. For example, if you want to An example of how to run the tool is shown below:
In this example, selections included: a time range of the events in the original event file The example above can also be run from the command line as follows: > gtvcut infile=_3C279_3C273_back_filtered.fits Input FITS file table = EVENTS
|