Periodicity Test (gtptest) Tutorial

Also see:


SciTools References:

Popup Navbar Windows:

The gtptest tool applies all the statistical tests available with gtpsearch application to a series of pulse phase values stored in given event files. Supported statistical tests includes Chi-squared (X2), Z-squared-n ( Z2N), H, and Rayleigh (Z2N with N == 1).

Known Issues: When running gtptest multiple times using the GUI, plot windows from previous runs reappear after they are closed manually. Thus, there is no way to permanently close plot windows without exiting the GUI.


  • Event data file in taFT1 format, also known as a photon data file. (See Extract LAT Data.)

Sample Files. To try the examples in this section, you can download the following fake data files:

Note: The output of gtptest consists of text describing the result of the periodicity tests and an optional plot. This tool also creates an output file when requested. The output file contains the result of computation (i.e., the periodicity test result in the text output and the data array to plot) for future reference.

How to Perform Periodicity Tests

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).

The command shown below 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 is similar to the following plot.

gtptest example 1 (graphical output)

This plot shows a folded-light curve used in the chi-squared test; its sinusoidal appearance is consistent with a pulse profile of the simulated pulsar.

Getting More Information on Computation

If gtptest is invoked with the chatter parameter set to 4 or larger, it will display descriptions of test conditions and test results with intermediate results of computations. This feature shows you additional information on computations being performed, which may help you understand the tool. Also, the extra information printed may contain a clue to diagnose certain types of problems. So, try a high chatter when you are unsure about the tool's behavior.

Owned by: Masaharu Hirayama 04/17/2009
Last updated by: Masaharu Hirayama 04/17/2009