Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With Likelihood v13r18 and pyLikelihood v1r6 (ST v9r8), a facility has been added for calculating photon (ph/cm^2/s) and energy (MeV/cm^2/s) fluxes over a selectable energy range. The errors on these quantities are computed using the procedure described in this presentation made at the September 2008 Collaboration meeting. Here are some usage examples:

Code Block

>>> like.model
Extragalactic Diffuse
   Spectrum: PowerLaw
0      Prefactor:  7.527e-02  7.807e-01  1.000e-05  1.000e+02 ( 1.000e-07)
1          Index: -2.421e+00  1.968e+00 -3.500e+00 -1.000e+00 ( 1.000e+00)
2          Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

GalProp Diffuse
   Spectrum: ConstantValue
3          Value:  1.186e+00  5.273e-02  0.000e+00  1.000e+01 ( 1.000e+00)

Vela
   Spectrum: BrokenPowerLaw2
4       Integral:  9.176e-02  3.730e-03  1.000e-03  1.000e+03 ( 1.000e-04)
5         Index1: -1.683e+00  5.131e-02 -5.000e+00 -1.000e+00 ( 1.000e+00)
6         Index2: -3.077e+00  2.266e-01 -5.000e+00 -1.000e+00 ( 1.000e+00)
7     BreakValue:  1.716e+03  2.250e+02  3.000e+01  1.000e+04 ( 1.000e+00)
8     LowerLimit:  1.000e+02  0.000e+00  2.000e+01  2.000e+05 ( 1.000e+00) fixed
9     UpperLimit:  3.000e+05  0.000e+00  2.000e+01  5.000e+05 ( 1.000e+00) fixed

>>> like.flux('Vela', emin=100, emax=3e5)
9.2005203669330761e-06

>>> like.flux('Vela')
9.2005203669330761e-06

>>> like.fluxError('Vela')
3.73060211564e-07

>>> like.energyFlux('Vela')
0.0047870395747710718

>>> like.energyFluxError('Vela')
0.000260743911378 

The default energy range for the flux and energy flux calculations is (emin, emax) = (100, 3e5) MeV. Either or both of these may be set as keyword arguments to the function call. The errors are available as separate function calls and require that the covariance matrix has been computed using "covar=True" keyword option to the fit function:

Code Block

>>> like.fit(covar=True)