Review: LAT Data Analysis

Compare: pyLikelihood - Unbinned and Binned Analysis

Perform:

  1. Setup: SLAC Central Linux
  1. Get Data (using the Astro Server)
  1. UnbinnedAnalysis
    a.) Prerequisite Science Tools: UnbinnedAnalysis

    b.) pyLikelihood: UnbinnedAnalysis
  1. BinnedAnalysis
    a.) Prerequisite Science Tools: BinnedAnalysis

    b.) pyLikelihood: BinnedAnalysis
  1. Interactively Explore pyLikelihood Functions

Example: gt_apps python Script Used in Binaries RSP Analysis; (For more examples, see Richard Dubois' confluence page "Scripts used in Binaries RSP Analysis".

See pyLikelihood:

Also see:

pyLikelihood: UnbinnedAnalysis

Prerequisites

Procedure (SCons ScienceTools-09-20-00)
  1. Log in to SLAC Public and change to your work directory (e.g., mypyLike).

Note: If you are running on a Windows machine, use X-Win32 as your X server.

  1. Set up your environment; see Setup: SLAC Central Linux.

Note: Be sure to use a bash shell.

  1. Using your editor, create a simple python script file to perform an UnbinnedAnalysis and name it (e.g., my_unbinned_analysis.py; see example).
  1. From the command line, enter:

    python

  2. From the python prompt, enter:

    from my_unbinned_analysis import *

If you see the error message "Caught ImportError: libtk8.4.so: cannot open shared object file: No such file or directory", ignore it.

Your pyLikelihood UnbinnedAnalysis results will be displayed. (Note that the fit is: 4232.78352127.)

  1. From the python prompt, print the plots:
  2. >>> like.plot()

Note: By default, the plot() method uses pyROOT to create counts spectra plots for comparing the model fits to the data. The following creates two plot windows, one for the counts spectra and one for the fractional residuals of the fit.

Counts Spectra:

Residuals:

  1. Challenge: You may want to review Model Fitting with gtlikelihood and then perform the analysis again and try to improve the fit; and while you're at it, try analyzing 6 months of data (15552000s).

You are now ready to Run Prerequisite Science Tools (BinnedAnalysis).


Owned by: Jim Chiang
Last updated by: Chuck Patterson 04/01/2011
04/01/2011