You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Parameter interface

The UnbinnedAnalysis and BinnedAnalysis modules contain functions that use the hoops/pil/ape interface to take advantage of the gtlike.par file for specifying inputs. Usage of this interface may be more convenient than creating the UnbinnedObs, UnbinnedAnalysis, BinnedObs, and BinnedAnalysis objects directly. Here are some examples of their use:

>>> from UnbinnedAnalysis import *
>>> like = unbinnedAnalysis()
Response functions to use[P6_V1_DIFFUSE] 
Spacecraft file[test_scData_0000.fits] test_scData_0000.fits
Event file[filtered.fits] filtered.fits
Unbinned exposure map[none] 
Exposure hypercube file[expCube.fits] 
Source model file[anticenter_model.xml] 
Optimizer (DRMNFB|NEWMINUIT|MINUIT|DRMNGB|LBFGS) [MINUIT] 
>>> like.model
Crab
   Spectrum: PowerLaw2
0       Integral:  1.540e+01  0.000e+00  1.000e-05  1.000e+03 ( 1.000e-06)
1          Index: -2.190e+00  0.000e+00 -5.000e+00  0.000e+00 ( 1.000e+00)
2     LowerLimit:  2.000e+01  0.000e+00  2.000e+01  3.000e+05 ( 1.000e+00) fixed
3     UpperLimit:  2.000e+05  0.000e+00  2.000e+01  3.000e+05 ( 1.000e+00) fixed

Geminga
   Spectrum: PowerLaw2
4       Integral:  1.020e+01  0.000e+00  1.000e-05  1.000e+03 ( 1.000e-06)
5          Index: -1.660e+00  0.000e+00 -5.000e+00  0.000e+00 ( 1.000e+00)
6     LowerLimit:  2.000e+01  0.000e+00  2.000e+01  3.000e+05 ( 1.000e+00) fixed
7     UpperLimit:  2.000e+05  0.000e+00  2.000e+01  3.000e+05 ( 1.000e+00) fixed

PKS 0528+134
   Spectrum: PowerLaw2
8       Integral:  9.802e+00  0.000e+00  1.000e-05  1.000e+03 ( 1.000e-06)
9          Index: -2.460e+00  0.000e+00 -5.000e+00  0.000e+00 ( 1.000e+00)
10    LowerLimit:  2.000e+01  0.000e+00  2.000e+01  3.000e+05 ( 1.000e+00) fixed
11    UpperLimit:  2.000e+05  0.000e+00  2.000e+01  3.000e+05 ( 1.000e+00) fixed
>>> like2 = unbinnedAnalysis(evfile='filtered.fits', scfile='test_scData_0000.fits', irfs='P6_V1_DIFFUSE', expcube='expCube.fits', srcmdl='anticenter_model.xml', optimizer='minuit', expmap='none')
>>> 
>>> like3 = unbinnedAnalysis(evfile='filtered.fits', mode='h')
  • No labels