pyLikelihood: BinnedAnalysis
Prerequisites
Procedure (CMT ScienceTools v9r15p2)
- 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.
- Set up your CMT (or SCons) environment; for example:
source setup_CMT_ST-v9r15p2_pyLike.csh
OR
source setup_SCons_ST-09-15-02.sh
Note: If setting up for an SCons build, be sure to change to a bash SHELL by entering bash at the command line. (Refer to Setup SLAC Public.)
- Using your editor, create a simple python script file to perform an BinnedAnalysis and name it (e.g., my_binned_analysis.py; see example).
- From the command line, enter:
python
- From the python prompt, enter:
from my_binned_analysis import *
Your pyLikelihood BinnedAnalysis results will be displayed. (Note that the fit is: 2673.63683672.)
- From the python prompt, print the plots:
>>> 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.

Using pyLikelihood Interactively
To be developed (estimated time: ~2 days)
Last updated by: Chuck Patterson
08/17/2009 |
|
|