Fermi-LAT via FermiPyLike
In this Example we show how to use the fermipy plugin in threeML. We perform a Binned likelihood analysis and a Bayesian analysis of the Crab, optimizing the parameters of the Crab Pulsar (PSR J0534+2200) keeping fixed the parameters of the Crab Nebula. In the model, the nebula is described by two sources, one representing the synchrotron spectrum, the othet the Inverse Compton emission. In this example we show how to download Fermi-LAT data, how to build a model starting from the 4FGL, how to free and fix parameters of the sources in the model, and how to perform a spectral analysis using the fermipy plugin.
[1]:
import warnings
warnings.simplefilter("ignore")
import numpy as np
np.seterr(all="ignore")
import shutil
from IPython.display import Image, display
import glob
from pathlib import Path
import matplotlib as mpl
from matplotlib import pyplot as plt
from astropy.io import fits as pyfits
import scipy as sp
[2]:
%%capture
from threeML import *
[3]:
from jupyterthemes import jtplot
%matplotlib inline
jtplot.style(context="talk", fscale=1, ticks=True, grid=False)
set_threeML_style()
silence_warnings()
The Fermi 4FGL catalog
Let’s interrogate the 4FGL to get the sources in a radius of 20.0 deg around the Crab
[4]:
lat_catalog = FermiLATSourceCatalog()
ra, dec, table = lat_catalog.search_around_source("Crab", radius=20.0)
table
Trying https://heasarc.gsfc.nasa.gov/cgi-bin/vo/cone/coneGet.pl?table=fermilpsc&
[4]:
| name | source_type | short_source_type | ra | dec | assoc_name | tevcat_assoc | Search_Offset |
|---|---|---|---|---|---|---|---|
| deg | deg | ||||||
| object | str52 | object | float64 | float64 | object | object | float64 |
| 4FGL J0534.5+2201s | pulsar wind nebula | PWN | 83.6331 | 22.0199 | Crab Nebula | Crab | 0.1552 |
| 4FGL J0534.5+2201i | pulsar wind nebula | PWN | 83.6330 | 22.0200 | Crab Nebula | Crab | 0.1597 |
| 4FGL J0534.5+2200 | pulsar, identified by pulsations | PSR | 83.6367 | 22.0149 | PSR J0534+2200 | Crab pulsar | 0.2818 |
| 4FGL J0526.3+2246 | active galaxy of uncertain type | bcu | 81.5908 | 22.7778 | NVSS J052622+224801 | 122.0980 | |
| 4FGL J0544.4+2238 | unknown | 86.1093 | 22.6418 | 142.4807 | |||
| 4FGL J0521.7+2112 | BL Lac type of blazar | bll | 80.4445 | 21.2131 | TXS 0518+211 | VER J0521+211 | 184.2504 |
| 4FGL J0528.3+1817 | unknown | unk | 82.0946 | 18.2943 | 1RXS J052829.6+181657 | 239.5831 | |
| 4FGL J0519.7+1939 | unknown | 79.9457 | 19.6646 | 250.3096 | |||
| 4FGL J0536.2+1733 | BL Lac type of blazar | bll | 84.0719 | 17.5534 | TXS 0533+175 | 268.9858 | |
| ... | ... | ... | ... | ... | ... | ... | ... |
| 4FGL J0431.0+3529c | unknown | 67.7650 | 35.4949 | 1159.0316 | |||
| 4FGL J0653.6+1636 | active galaxy of uncertain type | bcu | 103.4105 | 16.6106 | 2MASX J06533986+1636432 | 1164.8007 | |
| 4FGL J0658.7+2318 | unknown | 104.6808 | 23.3027 | 1166.9461 | |||
| 4FGL J0552.0+0256c | unknown | 88.0140 | 2.9417 | 1172.6725 | |||
| 4FGL J0555.1+0304 | active galaxy of uncertain type | bcu | 88.7776 | 3.0710 | GB6 J0555+0304 | 1175.6395 | |
| 4FGL J0658.2+2709 | active galaxy of uncertain type | bcu | 104.5735 | 27.1501 | B2 0655+27A | 1181.6704 | |
| 4FGL J0642.4+1048 | unknown | 100.6081 | 10.8135 | 1184.0885 | |||
| 4FGL J0506.9+0323 | BL Lac type of blazar | bll | 76.7314 | 3.3917 | NVSS J050650+032401 | 1187.5954 | |
| 4FGL J0409.2+2542 | unknown | 62.3144 | 25.7022 | 1189.0646 |
This gets a 3ML model (a Model instance) from the table above, where every source in the 4FGL becomes a Source instance. Note that by default all parameters of all sources are fixed.
[5]:
model = lat_catalog.get_model()
We have set the min_value of Crab_synch.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of Crab_synch.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
Source 4FGL J0534.5+2201i is extended, but morphology information is unavailable. I will provide a point source instead
We have set the min_value of Crab_IC.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of Crab_IC.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J052622p224801.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0544d4p2238.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0518p211.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0518p211.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x1RXS_J052829d6p181657.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x1RXS_J052829d6p181657.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0519d7p1939.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0533p175.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0533p175.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J053855p164612.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J053855p164612.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J055119p254909.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J055119p254909.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0534d2p2751.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0531d3p1609.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
Source 4FGL J0540.3+2756e is extended, but morphology information is unavailable. I will provide a point source instead
We have set the min_value of Sim_147.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of Sim_147.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x3C_138.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0552d0p2656c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0552d0p2656c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J060149p2324.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J060149p2324.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0506p196.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0600d7p2012c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0600d7p2012c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4C_p27d15.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4C_p27d15.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4C_p22d12.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0559d2p2557.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0559d2p2557.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x7C_0513p2739.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0507p17.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0507p17.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J052429p283918.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J052429p283918.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x1RXS_J053336d0p145115.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of SNR_G190d9m02d2.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of SNR_G190d9m02d2.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0536p145.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0536p145.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0515p1527.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0515p1527.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0609d0p2136c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0609d0p2136c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x1RXS_J050107d1p242318.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x1RXS_J050107d1p242318.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J060900p203746.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J060900p203746.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0504d4p1750.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0609d0p2006.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0609d0p2006.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0533d2p3024c.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0528p134.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0528p134.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0610d9p2040c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0610d9p2040c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x1RXS_J045931d5p192242.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0608d5p1826c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0608d5p1826c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0604d8p1653c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0604d8p1653c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0612d2p1909c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0612d2p1909c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0531d7p1241c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0531d7p1241c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0614p2426.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0614p2426.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0616d5p2235.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0616d5p2235.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
Source 4FGL J0617.2+2234e is extended, but morphology information is unavailable. I will provide a point source instead
We have set the min_value of IC_443.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of IC_443.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J061020p1701.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J061020p1701.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x1RXS_J045214d8p210307.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J054005p120955.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0613d1p1749c.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J045613p2702.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of PSR_J0554p3107.spectrum.main.Super_cutoff_powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0518d6p1227.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0618d9p2240c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0618d9p2240c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0527d1p1152.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0527d1p1152.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0609d1p1544.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0609d1p1544.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0611p2803.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x87GB_055627d1p304251.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x87GB_055627d1p304251.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0610p171.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0610p171.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0620d1p2246.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0548d6p1200.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0620d9p2201.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0614d1p1628c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0614d1p1628c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0526d4p1114.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0502d2p3016.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0527p329.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J060015p124344.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J060015p124344.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0622d7p2248.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0622d7p2248.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PSR_J0621p2514.spectrum.main.Super_cutoff_powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0447d2p2446.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0447d2p2446.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0612d6p1520c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0612d6p1520c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0459p135.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0549p3258.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0501p3048.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0453d3p2843.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of RX_J0620d6p2644.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J060922p140744.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J060922p140744.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of RX_J0621d7p1747.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0448d3p2743.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0448d3p2743.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0532d6p3358.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0532d6p3358.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0537d5p0959.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0535d3p0934.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0535d3p0934.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0512d3p3329.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0512d3p3329.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0529p0934.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0615d9p1416.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0615d9p1416.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0441d8p2600c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0441d8p2600c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x3C_160.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of IERS_B0435p217.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of IERS_B0435p217.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0629p2437.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0629p2437.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x2MASX_J05054288p3321355.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J060835p114942.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0540d0p3501c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0540d0p3501c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0620d4p1445.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0620d4p1445.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0444d4p1621.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J044950p3026.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0445d7p1535.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0445d7p1535.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0506p101.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0628p203.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0628p203.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J045804p115142.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0437p27B.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0437p27B.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0443d9p2921.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0521d8p0843.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0521d8p0843.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PMN_J0517p0858.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PMN_J0517p0858.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0516p087.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0516p087.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0612d9p1150.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0538d9p3549c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0538d9p3549c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0618d4p3150.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J054218p354149.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J054218p354149.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0623p3045.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0623p3045.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0622d5p3120.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0622d5p3120.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0535d0p3615c.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0540d7p3611c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0540d7p3611c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x1RXS_J044127d8p150455.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0557d2p3528.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0618d7p1211.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0618d7p1211.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0517p36.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0517p36.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J050234p3436.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J050234p3436.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of OG_050.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of OG_050.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PSR_J0633p1746.spectrum.main.Super_cutoff_powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0437p145.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0437p145.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0436d9p2915.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0436d9p2915.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0550d2p0730c.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0540d2p0655.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0446p11.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0446p11.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0429p174.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0429p174.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J043337p2905.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J043337p2905.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of RGB_J0640p245B.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0619p33.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0619p33.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of RX_J0638d6p2751.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0534d0p3746c.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of MG1_J043022p1655.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x87GB_042337d5p195307.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x87GB_042337d5p195307.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J054529p061955.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J054529p061955.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J042948p2843.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J042948p2843.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J063010p322608.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0516d3p3753.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of B3_0548p378B.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of B3_0548p378B.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0635d7p3113.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0441p34.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0420p210.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0435d5p3232.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0435d5p3232.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0528d5p3852.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0433d0p1327.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0433d0p1327.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0632d7p1215.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0632d7p1215.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MS_0419d3p1943.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0513p054.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J043307p322840.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of PSR_J0605p3757.spectrum.main.Super_cutoff_powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0649p2228.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J053847p044222.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0506p056.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0506p056.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0557p38.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0459p060.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0610d7p3752.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0610d7p3752.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0624d0p0855.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4C_p06d21.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x1ES_0647p250.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x1ES_0647p250.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J065035p205556.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J065035p205556.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0551d7p0446.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0551d7p0446.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0454p3724.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of PSR_J0631p1036.spectrum.main.Super_cutoff_powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0648p1749.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0600d8p0509c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0600d8p0509c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0537d6p0400.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0442d8p3609.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0442d8p3609.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0424d8p3117.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0450d7p0715.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0640d4p3307.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0552p39A.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0552p39A.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x1RXS_J064814d1p160708.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0634d7p1036.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0634d7p1036.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J065230p1934.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of MG2_J065230p1934.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0502p049.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0502p049.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of RX_J0648d7p1516.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of RX_J0648d7p1516.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0620p3806.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of PSR_J0622p3749.spectrum.main.Super_cutoff_powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0641d4p3349.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0654p24.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x1RXS_J065331d8p181448.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0412d6p2253c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0412d6p2253c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0653p2816.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0653p2816.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of PMN_J0444p0717.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of MG1_J050533p0415.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0559d3p0352.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0559d3p0352.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of TXS_0431p092.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of B3_0509p406.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0635p35.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of PKS_0550p032.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0431d0p3529c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0431d0p3529c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x2MASX_J06533986p1636432.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0658d7p2318.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0552d0p0256c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0552d0p0256c.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0555p0304.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of GB6_J0555p0304.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of B2_0655p27A.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0642d4p1048.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0642d4p1048.spectrum.main.Log_parabola.K to 1e-99 because there was a postive transform
We have set the min_value of NVSS_J050650p032401.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
We have set the min_value of x4FGL_J0409d2p2542.spectrum.main.Powerlaw.K to 1e-99 because there was a postive transform
Let’s free all the normalizations within 3 deg from the center.
[6]:
model.free_point_sources_within_radius(3.0, normalization_only=True)
model.display()
| N | |
|---|---|
| Point sources | 196 |
| Extended sources | 0 |
| Particle sources | 0 |
Free parameters (5):
| value | min_value | max_value | unit | |
|---|---|---|---|---|
| Crab_synch.spectrum.main.Log_parabola.K | 0.0 | 0.0 | 0.0 | keV-1 s-1 cm-2 |
| Crab_IC.spectrum.main.Log_parabola.K | 0.0 | 0.0 | 0.0 | keV-1 s-1 cm-2 |
| PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.K | 0.0 | 0.0 | 0.0 | keV-1 s-1 cm-2 |
| NVSS_J052622p224801.spectrum.main.Powerlaw.K | 0.0 | 0.0 | 0.0 | keV-1 s-1 cm-2 |
| x4FGL_J0544d4p2238.spectrum.main.Powerlaw.K | 0.0 | 0.0 | 0.0 | keV-1 s-1 cm-2 |
Fixed parameters (1089):
(abridged. Use complete=True to see all fixed parameters)
Properties (0):
(none)
Linked parameters (0):
(none)
Independent variables:
(none)
Linked functions (0):
(none)
but then let’s fix the sync and the IC components of the Crab nebula (cannot fit them with just one month of data) (these two methods are equivalent)
[7]:
model["Crab_IC.spectrum.main.Log_parabola.K"].fix = True
model.Crab_synch.spectrum.main.Log_parabola.K.fix = True
However, let’s free the index of the Crab Pulsar
[8]:
model.PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.index.free = True
model.display()
| N | |
|---|---|
| Point sources | 196 |
| Extended sources | 0 |
| Particle sources | 0 |
Free parameters (4):
| value | min_value | max_value | unit | |
|---|---|---|---|---|
| PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.K | 0.0 | 0.0 | 0.0 | keV-1 s-1 cm-2 |
| PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.index | -1.826553 | -10.0 | 10.0 | |
| NVSS_J052622p224801.spectrum.main.Powerlaw.K | 0.0 | 0.0 | 0.0 | keV-1 s-1 cm-2 |
| x4FGL_J0544d4p2238.spectrum.main.Powerlaw.K | 0.0 | 0.0 | 0.0 | keV-1 s-1 cm-2 |
Fixed parameters (1090):
(abridged. Use complete=True to see all fixed parameters)
Properties (0):
(none)
Linked parameters (0):
(none)
Independent variables:
(none)
Linked functions (0):
(none)
[9]:
# Download data from Jan 01 2010 to February 1 2010
tstart = "2010-01-01 00:00:00"
tstop = "2010-02-01 00:00:00"
# Note that this will understand if you already download these files, and will
# not do it twice unless you change your selection or the outdir
evfile, scfile = download_LAT_data(
ra,
dec,
20.0,
tstart,
tstop,
time_type="Gregorian",
destination_directory="Crab_data",
)
Only one FT1 file provided. Skipping the merge...
Configuration for Fermipy
3ML provides and intreface into Fermipy via the FermipyLike plugin. We can use it to generate basic configuration files.
Note
The Fermipy plugin only supports Disk_on_sphere, Gaussian_on_sphere and SpatialTemplate_2D as spatial models.
[10]:
config = FermipyLike.get_basic_config(
evfile=evfile,
scfile=scfile,
ra=ra,
dec=dec,
fermipy_verbosity=1,
fermitools_chatter=0,
)
# See what we just got
config.display()
data:
evfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L9f8de773c6ba4abf7fbabfdb909f7005_FT1.fits
scfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L2606261855415EC101EB24_SC00.fits
binning:
roiwidth: 10.0
binsz: 0.1
binsperdec: 8
selection:
emin: 100.0
emax: 100000.0
zmax: 100.0
evclass: 128
evtype: 3
filter: DATA_QUAL>0 && LAT_CONFIG==1
ra: 83.6324076248989
dec: 22.017394786671968
tmin: 283996802.0
tmax: 286675202.0
logging:
verbosity: 1
chatter: 0
data: evfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L9f8de773c6ba4abf7fbabfdb909f7005_FT1.fits scfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L2606261855415EC101EB24_SC00.fits binning: roiwidth: 10.0 binsz: 0.1 binsperdec: 8 selection: emin: 100.0 emax: 100000.0 zmax: 100.0 evclass: 128 evtype: 3 filter: DATA_QUAL>0 && LAT_CONFIG==1 ra: 83.6324076248989 dec: 22.017394786671968 tmin: 283996802.0 tmax: 286675202.0 logging: verbosity: 1 chatter: 0
You can of course modify the configuration as a dictionary
[11]:
config["selection"]["emax"] = 300000.0
and even add sections
[12]:
config["gtlike"] = {"edisp": False}
config.display()
data:
evfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L9f8de773c6ba4abf7fbabfdb909f7005_FT1.fits
scfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L2606261855415EC101EB24_SC00.fits
binning:
roiwidth: 10.0
binsz: 0.1
binsperdec: 8
selection:
emin: 100.0
emax: 300000.0
zmax: 100.0
evclass: 128
evtype: 3
filter: DATA_QUAL>0 && LAT_CONFIG==1
ra: 83.6324076248989
dec: 22.017394786671968
tmin: 283996802.0
tmax: 286675202.0
logging:
verbosity: 1
chatter: 0
gtlike:
edisp: false
data: evfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L9f8de773c6ba4abf7fbabfdb909f7005_FT1.fits scfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L2606261855415EC101EB24_SC00.fits binning: roiwidth: 10.0 binsz: 0.1 binsperdec: 8 selection: emin: 100.0 emax: 300000.0 zmax: 100.0 evclass: 128 evtype: 3 filter: DATA_QUAL>0 && LAT_CONFIG==1 ra: 83.6324076248989 dec: 22.017394786671968 tmin: 283996802.0 tmax: 286675202.0 logging: verbosity: 1 chatter: 0 gtlike: edisp: false
FermipyLike
Let’s create an instance of the plugin/ Note that here no processing is made, because fermipy still doesn’t know about the model you want to use.
[13]:
LAT = FermipyLike("LAT", config)
The plugin modifies the configuration as needed to get the output files in a unique place, which will stay the same as long as your selection does not change.
[14]:
config.display()
data:
evfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L9f8de773c6ba4abf7fbabfdb909f7005_FT1.fits
scfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L2606261855415EC101EB24_SC00.fits
binning:
roiwidth: 10.0
binsz: 0.1
binsperdec: 8
selection:
emin: 100.0
emax: 300000.0
zmax: 100.0
evclass: 128
evtype: 3
filter: DATA_QUAL>0 && LAT_CONFIG==1
ra: 83.6324076248989
dec: 22.017394786671968
tmin: 283996802.0
tmax: 286675202.0
logging:
verbosity: 1
chatter: 0
gtlike:
edisp: false
fileio:
outdir: __dced055e94ab289af0892c15dd7fd80b
data: evfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L9f8de773c6ba4abf7fbabfdb909f7005_FT1.fits scfile: /home/runner/work/threeML/threeML/docs/md_docs/slow_execute/Crab_data/L2606261855415EC101EB24_SC00.fits binning: roiwidth: 10.0 binsz: 0.1 binsperdec: 8 selection: emin: 100.0 emax: 300000.0 zmax: 100.0 evclass: 128 evtype: 3 filter: DATA_QUAL>0 && LAT_CONFIG==1 ra: 83.6324076248989 dec: 22.017394786671968 tmin: 283996802.0 tmax: 286675202.0 logging: verbosity: 1 chatter: 0 gtlike: edisp: false fileio: outdir: __dced055e94ab289af0892c15dd7fd80b
Here is where the fermipy processing happens (the .setup method)
[15]:
fermipy_output_directory = Path(config["fileio"]["outdir"])
print("Fermipy Output directoty: %s" % fermipy_output_directory)
# This remove the output directory, to start a fresh analysis...
if fermipy_output_directory.exists():
shutil.rmtree(fermipy_output_directory)
# Here is where the fermipy processing happens (the .setup method)
data = DataList(LAT)
jl = JointLikelihood(model, data)
Fermipy Output directoty: __dced055e94ab289af0892c15dd7fd80b
Found Galactic template for IRF. P8R3_SOURCE_V3: /home/runner/miniconda3/envs/test_env/share/fermitools/refdata/fermi/galdiffuse/gll_iem_v07.fits
Cutting the template around the ROI:
Found Isotropic template for irf P8R3_SOURCE_V3: /home/runner/miniconda3/envs/test_env/share/fermitools/refdata/fermi/galdiffuse/iso_P8R3_SOURCE_V3_v1.txt
WARNING: Point source PKS_0459p060 lies 17.6445 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0610d7p3752 lies 17.6638 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0624d0p0855 lies 17.6933 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4C_p06d21 lies 17.7222 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x1ES_0647p250 lies 17.726 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source NVSS_J065035p205556 lies 17.7273 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0551d7p0446 lies 17.7387 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source GB6_J0454p3724 lies 17.747 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source PSR_J0631p1036 lies 17.7845 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source GB6_J0648p1749 lies 17.8418 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0600d8p0509c lies 18.0107 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0537d6p0400 lies 18.0307 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0442d8p3609 lies 18.0625 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0424d8p3117 lies 18.0853 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0450d7p0715 lies 18.1442 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0640d4p3307 lies 18.3144 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source B2_0552p39A lies 18.3271 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x1RXS_J064814d1p160708 lies 18.3626 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0634d7p1036 lies 18.3815 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source MG2_J065230p1934 lies 18.3959 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source PKS_0502p049 lies 18.4231 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source RX_J0648d7p1516 lies 18.8098 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source GB6_J0620p3806 lies 18.8371 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source PSR_J0622p3749 lies 18.8534 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0641d4p3349 lies 18.8651 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source B2_0654p24 lies 18.868 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x1RXS_J065331d8p181448 lies 18.8966 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0412d6p2253c lies 18.9306 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source GB6_J0653p2816 lies 18.9492 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source PMN_J0444p0717 lies 19.0008 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source MG1_J050533p0415 lies 19.0838 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0559d3p0352 lies 19.1179 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source TXS_0431p092 lies 19.1204 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source B3_0509p406 lies 19.2302 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source B2_0635p35 lies 19.2972 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source PKS_0550p032 lies 19.3054 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0431d0p3529c lies 19.3172 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x2MASX_J06533986p1636432 lies 19.4133 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0658d7p2318 lies 19.4491 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0552d0p0256c lies 19.5445 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source GB6_J0555p0304 lies 19.594 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source B2_0655p27A lies 19.6945 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0642d4p1048 lies 19.7348 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source NVSS_J050650p032401 lies 19.7933 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0409d2p2542 lies 19.8177 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
The normalization factors of the LAT background components are included in the models as nuisance parameters. They are only added during the previous step (during the model assignment). Let’s display them:
[16]:
for k, v in LAT.nuisance_parameters.items():
print(k, ":", v)
LAT_isodiff_Normalization : Parameter LAT_isodiff_Normalization = 1.0 []
(min_value = 0.001, max_value = 1000.0, delta = 0.01, free = True)
LAT_galdiff_Prefactor : Parameter LAT_galdiff_Prefactor = 1.0 []
(min_value = 0.1, max_value = 10.0, delta = 0.01, free = True)
We will fix the isotropic BG as we are not sensitive to it with this dataset. We will also fix one more weak source.
[17]:
model.LAT_isodiff_Normalization.fix = True
model.x4FGL_J0544d4p2238.spectrum.main.Powerlaw.K.fix = True
model.display()
| N | |
|---|---|
| Point sources | 196 |
| Extended sources | 0 |
| Particle sources | 0 |
Free parameters (4):
| value | min_value | max_value | unit | |
|---|---|---|---|---|
| PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.K | 0.0 | 0.0 | 0.0 | keV-1 s-1 cm-2 |
| PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.index | -1.826553 | -10.0 | 10.0 | |
| NVSS_J052622p224801.spectrum.main.Powerlaw.K | 0.0 | 0.0 | 0.0 | keV-1 s-1 cm-2 |
| LAT_galdiff_Prefactor | 1.0 | 0.1 | 10.0 |
Fixed parameters (1092):
(abridged. Use complete=True to see all fixed parameters)
Properties (0):
(none)
Linked parameters (0):
(none)
Independent variables:
(none)
Linked functions (0):
(none)
Performing the fit
[18]:
jl.set_minimizer("minuit")
res = jl.fit()
The current value of the parameter K (1.0) was above the new maximum 1.1713999999999984e-07.
The current value of the parameter K (1.0) was above the new maximum 5.500000000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 2.6052624286635456e-10.
The current value of the parameter K (1.0) was above the new maximum 1.5837000000000062e-14.
The current value of the parameter K (1.0) was above the new maximum 1.405899999999999e-11.
The current value of the parameter K (1.0) was above the new maximum 4.684499999999998e-12.
The current value of the parameter K (1.0) was above the new maximum 3.025800000000002e-15.
The current value of the parameter K (1.0) was above the new maximum 9.410999999999976e-15.
The current value of the parameter K (1.0) was above the new maximum 1.0046999999999997e-13.
The current value of the parameter K (1.0) was above the new maximum 1.5421000000000043e-14.
The current value of the parameter K (1.0) was above the new maximum 5.589300000000003e-13.
The current value of the parameter K (1.0) was above the new maximum 1.0745000000000013e-14.
The current value of the parameter K (1.0) was above the new maximum 6.023200000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 9.976900000000019e-12.
The current value of the parameter K (1.0) was above the new maximum 3.555900000000009e-14.
The current value of the parameter K (1.0) was above the new maximum 1.0592000000000012e-12.
The current value of the parameter K (1.0) was above the new maximum 2.4490000000000046e-12.
The current value of the parameter K (1.0) was above the new maximum 6.340400000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 2.7640999999999983e-12.
The current value of the parameter K (1.0) was above the new maximum 7.151899999999999e-15.
The current value of the parameter K (1.0) was above the new maximum 3.1522999999999986e-13.
The current value of the parameter K (1.0) was above the new maximum 1.1499000000000008e-12.
The current value of the parameter K (1.0) was above the new maximum 7.699899999999976e-14.
The current value of the parameter K (1.0) was above the new maximum 3.340099999999997e-12.
The current value of the parameter K (1.0) was above the new maximum 1.5000000000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 5.581899999999986e-15.
The current value of the parameter K (1.0) was above the new maximum 6.717200000000006e-13.
The current value of the parameter K (1.0) was above the new maximum 3.5524000000000005e-12.
The current value of the parameter K (1.0) was above the new maximum 2.526900000000002e-13.
The current value of the parameter K (1.0) was above the new maximum 1.062600000000002e-12.
The current value of the parameter K (1.0) was above the new maximum 5.718000000000024e-15.
The current value of the parameter K (1.0) was above the new maximum 2.5985999999999976e-13.
The current value of the parameter K (1.0) was above the new maximum 3.0684999999999993e-12.
The current value of the parameter K (1.0) was above the new maximum 8.522799999999995e-13.
The current value of the parameter K (1.0) was above the new maximum 2.4757999999999956e-12.
The current value of the parameter K (1.0) was above the new maximum 7.985500000000014e-12.
The current value of the parameter K (1.0) was above the new maximum 6.15770000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 5.0731000000000035e-15.
The current value of the parameter K (1.0) was above the new maximum 5.59440000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 3.1685999999999984e-12.
The current value of the parameter K (1.0) was above the new maximum 2.582700000000004e-12.
The current value of the parameter K (1.0) was above the new maximum 1.4146000000000007e-12.
The current value of the parameter K (1.0) was above the new maximum 1.0610000000000005e-13.
The current value of the parameter K (1.0) was above the new maximum 2.952999999999993e-14.
The current value of the parameter K (1.0) was above the new maximum 2.5733000000000024e-12.
The current value of the parameter K (1.0) was above the new maximum 1.1349999999999993e-12.
The current value of the parameter K (1.0) was above the new maximum 5.914700000000009e-16.
The current value of the parameter K (1.0) was above the new maximum 1.2896000000000024e-13.
The current value of the parameter K (1.0) was above the new maximum 2.4453999999999963e-13.
The current value of the parameter K (1.0) was above the new maximum 3.9742000000000064e-13.
The current value of the parameter K (1.0) was above the new maximum 2.299190622244565e-11.
The current value of the parameter K (1.0) was above the new maximum 1.341200000000002e-12.
The current value of the parameter K (1.0) was above the new maximum 3.4492999999999937e-13.
The current value of the parameter K (1.0) was above the new maximum 3.299699999999997e-13.
The current value of the parameter K (1.0) was above the new maximum 1.2927000000000013e-12.
The current value of the parameter K (1.0) was above the new maximum 2.303599999999997e-13.
The current value of the parameter K (1.0) was above the new maximum 2.0424999999999933e-15.
The current value of the parameter K (1.0) was above the new maximum 1.8849999999999985e-13.
The current value of the parameter K (1.0) was above the new maximum 2.212000000000003e-14.
The current value of the parameter K (1.0) was above the new maximum 5.698000000000006e-13.
The current value of the parameter K (1.0) was above the new maximum 2.873699999999998e-16.
The current value of the parameter K (1.0) was above the new maximum 2.031600000000001e-12.
The current value of the parameter K (1.0) was above the new maximum 1.4786000000000014e-13.
The current value of the parameter K (1.0) was above the new maximum 3.093899999999991e-15.
The current value of the parameter K (1.0) was above the new maximum 5.689800000000001e-15.
The current value of the parameter K (1.0) was above the new maximum 4.841299999999982e-15.
The current value of the parameter K (1.0) was above the new maximum 1.9508000000000024e-13.
The current value of the parameter K (1.0) was above the new maximum 4.104398774240525e-12.
The current value of the parameter K (1.0) was above the new maximum 5.842000000000008e-13.
The current value of the parameter K (1.0) was above the new maximum 4.662300000000007e-13.
The current value of the parameter K (1.0) was above the new maximum 5.5815999999999845e-14.
The current value of the parameter K (1.0) was above the new maximum 1.6025000000000006e-14.
The current value of the parameter K (1.0) was above the new maximum 1.417900000000001e-14.
The current value of the parameter K (1.0) was above the new maximum 6.183600000000008e-13.
The current value of the parameter K (1.0) was above the new maximum 1.4220000000000026e-15.
The current value of the parameter K (1.0) was above the new maximum 8.113400000000018e-13.
The current value of the parameter K (1.0) was above the new maximum 5.578100000000006e-15.
The current value of the parameter K (1.0) was above the new maximum 4.961999999999996e-13.
The current value of the parameter K (1.0) was above the new maximum 1.007699999999999e-12.
The current value of the parameter K (1.0) was above the new maximum 5.3584e-13.
The current value of the parameter K (1.0) was above the new maximum 5.114700000000008e-13.
The current value of the parameter K (1.0) was above the new maximum 2.5499999999999913e-14.
The current value of the parameter K (1.0) was above the new maximum 1.811899999999995e-14.
The current value of the parameter K (1.0) was above the new maximum 9.253299999999988e-13.
The current value of the parameter K (1.0) was above the new maximum 2.480000000000003e-12.
The current value of the parameter K (1.0) was above the new maximum 3.0513000000000043e-16.
The current value of the parameter K (1.0) was above the new maximum 7.756700000000005e-13.
The current value of the parameter K (1.0) was above the new maximum 3.400699999999994e-14.
The current value of the parameter K (1.0) was above the new maximum 2.197100000000009e-14.
The current value of the parameter K (1.0) was above the new maximum 2.1263000000000043e-14.
The current value of the parameter K (1.0) was above the new maximum 2.680699999999996e-13.
The current value of the parameter K (1.0) was above the new maximum 6.044000000000007e-13.
The current value of the parameter K (1.0) was above the new maximum 2.036900000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 3.3912e-13.
The current value of the parameter K (1.0) was above the new maximum 4.3475000000000034e-13.
The current value of the parameter K (1.0) was above the new maximum 1.186900000000001e-12.
The current value of the parameter K (1.0) was above the new maximum 4.742200000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 6.788600000000023e-15.
The current value of the parameter K (1.0) was above the new maximum 1.236400000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 6.163200000000012e-13.
The current value of the parameter K (1.0) was above the new maximum 1.5476999999999973e-12.
The current value of the parameter K (1.0) was above the new maximum 8.173300000000018e-15.
The current value of the parameter K (1.0) was above the new maximum 5.571499999999997e-13.
The current value of the parameter K (1.0) was above the new maximum 8.453500000000017e-14.
The current value of the parameter K (1.0) was above the new maximum 2.7110000000000033e-13.
The current value of the parameter K (1.0) was above the new maximum 2.5789000000000005e-15.
The current value of the parameter K (1.0) was above the new maximum 3.676500000000006e-13.
The current value of the parameter K (1.0) was above the new maximum 4.1507999999999904e-14.
The current value of the parameter K (1.0) was above the new maximum 1.3275000000000022e-12.
The current value of the parameter K (1.0) was above the new maximum 1.976400000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 4.4920000000000065e-13.
The current value of the parameter K (1.0) was above the new maximum 1.3606000000000002e-14.
The current value of the parameter K (1.0) was above the new maximum 7.7328e-13.
The current value of the parameter K (1.0) was above the new maximum 2.9407000000000066e-12.
The current value of the parameter K (1.0) was above the new maximum 3.0088999999999994e-13.
The current value of the parameter K (1.0) was above the new maximum 1.7510000000000035e-12.
The current value of the parameter K (1.0) was above the new maximum 2.0758000000000023e-11.
The current value of the parameter K (1.0) was above the new maximum 1.43533818294098e-09.
The current value of the parameter K (1.0) was above the new maximum 3.5818e-13.
The current value of the parameter K (1.0) was above the new maximum 2.806199999999998e-13.
The current value of the parameter K (1.0) was above the new maximum 1.7634999999999985e-13.
The current value of the parameter K (1.0) was above the new maximum 5.5226000000000215e-15.
The current value of the parameter K (1.0) was above the new maximum 1.942800000000001e-11.
The current value of the parameter K (1.0) was above the new maximum 1.5203999999999982e-13.
The current value of the parameter K (1.0) was above the new maximum 7.922299999999992e-13.
The current value of the parameter K (1.0) was above the new maximum 2.7547000000000043e-15.
The current value of the parameter K (1.0) was above the new maximum 3.853599999999998e-12.
The current value of the parameter K (1.0) was above the new maximum 8.182000000000032e-15.
The current value of the parameter K (1.0) was above the new maximum 6.239200000000013e-13.
The current value of the parameter K (1.0) was above the new maximum 1.9230000000000018e-13.
The current value of the parameter K (1.0) was above the new maximum 6.152900000000012e-13.
The current value of the parameter K (1.0) was above the new maximum 2.514900000000003e-12.
The current value of the parameter K (1.0) was above the new maximum 1.6918999999999986e-13.
The current value of the parameter K (1.0) was above the new maximum 7.876900000000017e-15.
The current value of the parameter K (1.0) was above the new maximum 1.2825999999999998e-14.
The current value of the parameter K (1.0) was above the new maximum 9.778400000000006e-13.
The current value of the parameter K (1.0) was above the new maximum 1.423100000000006e-14.
The current value of the parameter K (1.0) was above the new maximum 6.276000000000003e-14.
The current value of the parameter K (1.0) was above the new maximum 2.502700000000003e-13.
The current value of the parameter K (1.0) was above the new maximum 6.302500000000025e-14.
The current value of the parameter K (1.0) was above the new maximum 4.555699999999988e-15.
The current value of the parameter K (1.0) was above the new maximum 8.917600000000013e-14.
The current value of the parameter K (1.0) was above the new maximum 7.607900000000012e-13.
The current value of the parameter K (1.0) was above the new maximum 1.4411999999999948e-14.
The current value of the parameter K (1.0) was above the new maximum 2.846600000000005e-14.
The current value of the parameter K (1.0) was above the new maximum 1.3324000000000047e-14.
The current value of the parameter K (1.0) was above the new maximum 8.158877567939619e-12.
The current value of the parameter K (1.0) was above the new maximum 1.7499999999999998e-14.
The current value of the parameter K (1.0) was above the new maximum 2.0330000000000084e-15.
The current value of the parameter K (1.0) was above the new maximum 8.161700000000006e-12.
The current value of the parameter K (1.0) was above the new maximum 6.044600000000009e-14.
The current value of the parameter K (1.0) was above the new maximum 6.203900000000012e-13.
The current value of the parameter K (1.0) was above the new maximum 2.9425999999999974e-15.
The current value of the parameter K (1.0) was above the new maximum 6.703200000000009e-15.
The current value of the parameter K (1.0) was above the new maximum 3.366700000000005e-13.
The current value of the parameter K (1.0) was above the new maximum 1.0217999999999991e-12.
The current value of the parameter K (1.0) was above the new maximum 5.602300000000022e-14.
The current value of the parameter K (1.0) was above the new maximum 2.9054000000000046e-12.
The current value of the parameter K (1.0) was above the new maximum 1.7606000000000067e-14.
The current value of the parameter K (1.0) was above the new maximum 7.667650994502062e-12.
The current value of the parameter K (1.0) was above the new maximum 1.509299999999998e-14.
The current value of the parameter K (1.0) was above the new maximum 3.3400999999999976e-13.
The current value of the parameter K (1.0) was above the new maximum 7.149599999999983e-15.
The current value of the parameter K (1.0) was above the new maximum 9.184699999999996e-13.
The current value of the parameter K (1.0) was above the new maximum 1.3248000000000026e-13.
The current value of the parameter K (1.0) was above the new maximum 9.82969999999999e-16.
The current value of the parameter K (1.0) was above the new maximum 4.68990000000002e-15.
The current value of the parameter K (1.0) was above the new maximum 1.3177999999999988e-11.
The current value of the parameter K (1.0) was above the new maximum 6.463299999999982e-15.
The current value of the parameter K (1.0) was above the new maximum 9.009600000000013e-13.
The current value of the parameter K (1.0) was above the new maximum 5.327699999999994e-13.
The current value of the parameter K (1.0) was above the new maximum 1.079300000000002e-11.
The current value of the parameter K (1.0) was above the new maximum 1.2285000000000018e-13.
The current value of the parameter K (1.0) was above the new maximum 6.218499999999977e-14.
The current value of the parameter K (1.0) was above the new maximum 1.167854754797384e-10.
The current value of the parameter K (1.0) was above the new maximum 5.605499999999984e-15.
The current value of the parameter K (1.0) was above the new maximum 5.994200000000011e-13.
The current value of the parameter K (1.0) was above the new maximum 3.4412e-14.
The current value of the parameter K (1.0) was above the new maximum 6.736800000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 3.897199999999994e-13.
The current value of the parameter K (1.0) was above the new maximum 7.446099999999988e-13.
The current value of the parameter K (1.0) was above the new maximum 2.6702999999999967e-14.
The current value of the parameter K (1.0) was above the new maximum 2.6283000000000045e-12.
The current value of the parameter K (1.0) was above the new maximum 7.076400000000023e-14.
The current value of the parameter K (1.0) was above the new maximum 2.955400000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 1.239000000000002e-12.
The current value of the parameter K (1.0) was above the new maximum 4.9576999999999987e-14.
The current value of the parameter K (1.0) was above the new maximum 1.052599999999999e-12.
The current value of the parameter K (1.0) was above the new maximum 3.1823000000000126e-14.
The current value of the parameter K (1.0) was above the new maximum 1.7749999999999965e-14.
The current value of the parameter K (1.0) was above the new maximum 4.882199999999995e-13.
The current value of the parameter K (1.0) was above the new maximum 5.297500000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 4.1767000000000024e-14.
The current value of the parameter K (1.0) was above the new maximum 1.2336999999999985e-12.
The current value of the parameter K (1.0) was above the new maximum 2.240800000000001e-14.
The current value of the parameter K (1.0) was above the new maximum 2.4950000000000013e-14.
Best fit values:
| result | unit | |
|---|---|---|
| parameter | ||
| PSR_J0534p2200...K | (2.46 -0.08 +0.09) x 10^-13 | 1 / (keV s cm2) |
| PSR_J0534p2200...index | -1.790 +/- 0.025 | |
| NVSS_J052622p224801.spectrum.main.Powerlaw.K | (0.9 -0.5 +1.0) x 10^-16 | 1 / (keV s cm2) |
| LAT_galdiff_Prefactor | (9.36 +/- 0.08) x 10^-1 |
Correlation matrix:
| 1.00 | 0.73 | -0.05 | -0.11 |
| 0.73 | 1.00 | 0.09 | 0.16 |
| -0.05 | 0.09 | 1.00 | -0.14 |
| -0.11 | 0.16 | -0.14 | 1.00 |
Values of -log(likelihood) at the minimum:
| -log(likelihood) | |
|---|---|
| LAT | 118143.560677 |
| total | 118143.560677 |
Values of statistical measures:
| statistical measures | |
|---|---|
| AIC | 236295.121497 |
| BIC | 236337.291533 |
Now let’s compute the errors on the best fit parameters
[19]:
res = jl.get_errors()
| result | unit | |
|---|---|---|
| parameter | ||
| PSR_J0534p2200...K | (2.46 +/- 0.09) x 10^-13 | 1 / (keV s cm2) |
| PSR_J0534p2200...index | -1.790 -0.025 +0.024 | |
| NVSS_J052622p224801.spectrum.main.Powerlaw.K | (9 -6 +7) x 10^-17 | 1 / (keV s cm2) |
| LAT_galdiff_Prefactor | (9.36 -0.17 +0.18) x 10^-1 |
We might also want to look at the profile of the likelihood for each parameter.
[20]:
res = jl.get_contours(
model.PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.index, -2.0, -1.6, 30
)
[21]:
res[-1]
[21]:
Or we might want to produce a contour plot
[22]:
res = jl.get_contours(
"PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.K",
2.1e-13,
2.7e-13,
20,
"PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.index",
-2.0,
-1.7,
20,
)
[23]:
res[-1]
[23]:
Pro-trick: We can also axcess the GTAnalysis object of fermipy:
[24]:
# res = jl.fit()
# LAT.gta.write_roi('test',make_plots=True)
All the plots are saved in the output directory as png files:
[25]:
# pngs=Path(f"{fermipy_output_directory}").glob("*png")
# for png in pngs:
# print(png)
# my_image=Image(str(png))
# display(my_image)
We can also plot the resulting model:
[26]:
energies = np.logspace(1, 6, 100) * u.MeV
fig, ax = plt.subplots()
# we only want to visualize the relevant sources...
src_to_plot = ["Crab", "PSR_J0534p2200"]
# Now loop over all point sources and plot them
for source_name, point_source in model.point_sources.items():
for src in src_to_plot:
if src in source_name:
# Plot the sum of all components for this source
ax.loglog(energies, point_source(energies), label=source_name)
# If there is more than one component, plot them also separately
if len(point_source.components) > 1:
for component_name, component in point_source.components.items():
ax.loglog(
energies,
component.shape(energies),
"--",
label=f"{component_name} of {source_name}",
)
# Add a legend
ax.legend(loc=0, frameon=False)
ax.set_xlabel("Energy (MeV)")
ax.set_ylabel(r"Flux (ph cm$^{-2}$ s$^{-1}$ keV$^{-1}$")
ax.set_ylim([1e-18, 1e-8])
# show the plot
fig
[26]:
We can also do a bayesian analysis.
This will set priors based on the current defined min-max (log-uniform or uniform).
[27]:
for param in model.free_parameters.values():
if param.has_transformation():
param.set_uninformative_prior(Log_uniform_prior)
else:
param.set_uninformative_prior(Uniform_prior)
[28]:
# It's better to remove the output directory,...
shutil.rmtree(fermipy_output_directory)
bayes = BayesianAnalysis(model, data)
Found Galactic template for IRF. P8R3_SOURCE_V3: /home/runner/miniconda3/envs/test_env/share/fermitools/refdata/fermi/galdiffuse/gll_iem_v07.fits
Cutting the template around the ROI:
Found Isotropic template for irf P8R3_SOURCE_V3: /home/runner/miniconda3/envs/test_env/share/fermitools/refdata/fermi/galdiffuse/iso_P8R3_SOURCE_V3_v1.txt
WARNING: Point source PKS_0459p060 lies 17.6445 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0610d7p3752 lies 17.6638 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0624d0p0855 lies 17.6933 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4C_p06d21 lies 17.7222 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x1ES_0647p250 lies 17.726 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source NVSS_J065035p205556 lies 17.7273 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0551d7p0446 lies 17.7387 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source GB6_J0454p3724 lies 17.747 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source PSR_J0631p1036 lies 17.7845 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source GB6_J0648p1749 lies 17.8418 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0600d8p0509c lies 18.0107 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0537d6p0400 lies 18.0307 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0442d8p3609 lies 18.0625 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0424d8p3117 lies 18.0853 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0450d7p0715 lies 18.1442 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0640d4p3307 lies 18.3144 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source B2_0552p39A lies 18.3271 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x1RXS_J064814d1p160708 lies 18.3626 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0634d7p1036 lies 18.3815 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source MG2_J065230p1934 lies 18.3959 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source PKS_0502p049 lies 18.4231 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source RX_J0648d7p1516 lies 18.8098 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source GB6_J0620p3806 lies 18.8371 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source PSR_J0622p3749 lies 18.8534 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0641d4p3349 lies 18.8651 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source B2_0654p24 lies 18.868 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x1RXS_J065331d8p181448 lies 18.8966 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0412d6p2253c lies 18.9306 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source GB6_J0653p2816 lies 18.9492 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source PMN_J0444p0717 lies 19.0008 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source MG1_J050533p0415 lies 19.0838 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0559d3p0352 lies 19.1179 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source TXS_0431p092 lies 19.1204 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source B3_0509p406 lies 19.2302 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source B2_0635p35 lies 19.2972 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source PKS_0550p032 lies 19.3054 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0431d0p3529c lies 19.3172 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x2MASX_J06533986p1636432 lies 19.4133 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0658d7p2318 lies 19.4491 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0552d0p0256c lies 19.5445 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source GB6_J0555p0304 lies 19.594 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source B2_0655p27A lies 19.6945 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0642d4p1048 lies 19.7348 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source NVSS_J050650p032401 lies 19.7933 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
WARNING: Point source x4FGL_J0409d2p2542 lies 19.8177 degrees from the ROI center at RA, Dec = 83.6324, 22.0174 7.57107
External parameter LAT_isodiff_Normalization already exist in the model. Overwriting it...
External parameter LAT_galdiff_Prefactor already exist in the model. Overwriting it...
Take care of the nuisance parameters LAT_isodiff_Normalization and LAT_galdiff_Prefactor, which are only created during the previous step.
[29]:
model.LAT_isodiff_Normalization.fix = True
model.LAT_galdiff_Prefactor.set_uninformative_prior(Log_uniform_prior)
[30]:
bayes.set_sampler("emcee")
n_walkers = 10
burn_in = 10
n_samples = 500
bayes.sampler.setup(n_iterations=n_samples, n_burn_in=burn_in, n_walkers=n_walkers)
res = bayes.sample()
The current value of the parameter K (1.0) was above the new maximum 1.1713999999999984e-07.
The current value of the parameter K (1.0) was above the new maximum 5.500000000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 2.6052624286635456e-10.
The current value of the parameter K (1.0) was above the new maximum 1.5837000000000062e-14.
The current value of the parameter K (1.0) was above the new maximum 1.405899999999999e-11.
The current value of the parameter K (1.0) was above the new maximum 4.684499999999998e-12.
The current value of the parameter K (1.0) was above the new maximum 3.025800000000002e-15.
The current value of the parameter K (1.0) was above the new maximum 9.410999999999976e-15.
The current value of the parameter K (1.0) was above the new maximum 1.0046999999999997e-13.
The current value of the parameter K (1.0) was above the new maximum 1.5421000000000043e-14.
The current value of the parameter K (1.0) was above the new maximum 5.589300000000003e-13.
The current value of the parameter K (1.0) was above the new maximum 1.0745000000000013e-14.
The current value of the parameter K (1.0) was above the new maximum 6.023200000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 9.976900000000019e-12.
The current value of the parameter K (1.0) was above the new maximum 3.555900000000009e-14.
The current value of the parameter K (1.0) was above the new maximum 1.0592000000000012e-12.
The current value of the parameter K (1.0) was above the new maximum 2.4490000000000046e-12.
The current value of the parameter K (1.0) was above the new maximum 6.340400000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 2.7640999999999983e-12.
The current value of the parameter K (1.0) was above the new maximum 7.151899999999999e-15.
The current value of the parameter K (1.0) was above the new maximum 3.1522999999999986e-13.
The current value of the parameter K (1.0) was above the new maximum 1.1499000000000008e-12.
The current value of the parameter K (1.0) was above the new maximum 7.699899999999976e-14.
The current value of the parameter K (1.0) was above the new maximum 3.340099999999997e-12.
The current value of the parameter K (1.0) was above the new maximum 1.5000000000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 5.581899999999986e-15.
The current value of the parameter K (1.0) was above the new maximum 6.717200000000006e-13.
The current value of the parameter K (1.0) was above the new maximum 3.5524000000000005e-12.
The current value of the parameter K (1.0) was above the new maximum 2.526900000000002e-13.
The current value of the parameter K (1.0) was above the new maximum 1.062600000000002e-12.
The current value of the parameter K (1.0) was above the new maximum 5.718000000000024e-15.
The current value of the parameter K (1.0) was above the new maximum 2.5985999999999976e-13.
The current value of the parameter K (1.0) was above the new maximum 3.0684999999999993e-12.
The current value of the parameter K (1.0) was above the new maximum 8.522799999999995e-13.
The current value of the parameter K (1.0) was above the new maximum 2.4757999999999956e-12.
The current value of the parameter K (1.0) was above the new maximum 7.985500000000014e-12.
The current value of the parameter K (1.0) was above the new maximum 6.15770000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 5.0731000000000035e-15.
The current value of the parameter K (1.0) was above the new maximum 5.59440000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 3.1685999999999984e-12.
The current value of the parameter K (1.0) was above the new maximum 2.582700000000004e-12.
The current value of the parameter K (1.0) was above the new maximum 1.4146000000000007e-12.
The current value of the parameter K (1.0) was above the new maximum 1.0610000000000005e-13.
The current value of the parameter K (1.0) was above the new maximum 2.952999999999993e-14.
The current value of the parameter K (1.0) was above the new maximum 2.5733000000000024e-12.
The current value of the parameter K (1.0) was above the new maximum 1.1349999999999993e-12.
The current value of the parameter K (1.0) was above the new maximum 5.914700000000009e-16.
The current value of the parameter K (1.0) was above the new maximum 1.2896000000000024e-13.
The current value of the parameter K (1.0) was above the new maximum 2.4453999999999963e-13.
The current value of the parameter K (1.0) was above the new maximum 3.9742000000000064e-13.
The current value of the parameter K (1.0) was above the new maximum 2.299190622244565e-11.
The current value of the parameter K (1.0) was above the new maximum 1.341200000000002e-12.
The current value of the parameter K (1.0) was above the new maximum 3.4492999999999937e-13.
The current value of the parameter K (1.0) was above the new maximum 3.299699999999997e-13.
The current value of the parameter K (1.0) was above the new maximum 1.2927000000000013e-12.
The current value of the parameter K (1.0) was above the new maximum 2.303599999999997e-13.
The current value of the parameter K (1.0) was above the new maximum 2.0424999999999933e-15.
The current value of the parameter K (1.0) was above the new maximum 1.8849999999999985e-13.
The current value of the parameter K (1.0) was above the new maximum 2.212000000000003e-14.
The current value of the parameter K (1.0) was above the new maximum 5.698000000000006e-13.
The current value of the parameter K (1.0) was above the new maximum 2.873699999999998e-16.
The current value of the parameter K (1.0) was above the new maximum 2.031600000000001e-12.
The current value of the parameter K (1.0) was above the new maximum 1.4786000000000014e-13.
The current value of the parameter K (1.0) was above the new maximum 3.093899999999991e-15.
The current value of the parameter K (1.0) was above the new maximum 5.689800000000001e-15.
The current value of the parameter K (1.0) was above the new maximum 4.841299999999982e-15.
The current value of the parameter K (1.0) was above the new maximum 1.9508000000000024e-13.
The current value of the parameter K (1.0) was above the new maximum 4.104398774240525e-12.
The current value of the parameter K (1.0) was above the new maximum 5.842000000000008e-13.
The current value of the parameter K (1.0) was above the new maximum 4.662300000000007e-13.
The current value of the parameter K (1.0) was above the new maximum 5.5815999999999845e-14.
The current value of the parameter K (1.0) was above the new maximum 1.6025000000000006e-14.
The current value of the parameter K (1.0) was above the new maximum 1.417900000000001e-14.
The current value of the parameter K (1.0) was above the new maximum 6.183600000000008e-13.
The current value of the parameter K (1.0) was above the new maximum 1.4220000000000026e-15.
The current value of the parameter K (1.0) was above the new maximum 8.113400000000018e-13.
The current value of the parameter K (1.0) was above the new maximum 5.578100000000006e-15.
The current value of the parameter K (1.0) was above the new maximum 4.961999999999996e-13.
The current value of the parameter K (1.0) was above the new maximum 1.007699999999999e-12.
The current value of the parameter K (1.0) was above the new maximum 5.3584e-13.
The current value of the parameter K (1.0) was above the new maximum 5.114700000000008e-13.
The current value of the parameter K (1.0) was above the new maximum 2.5499999999999913e-14.
The current value of the parameter K (1.0) was above the new maximum 1.811899999999995e-14.
The current value of the parameter K (1.0) was above the new maximum 9.253299999999988e-13.
The current value of the parameter K (1.0) was above the new maximum 2.480000000000003e-12.
The current value of the parameter K (1.0) was above the new maximum 3.0513000000000043e-16.
The current value of the parameter K (1.0) was above the new maximum 7.756700000000005e-13.
The current value of the parameter K (1.0) was above the new maximum 3.400699999999994e-14.
The current value of the parameter K (1.0) was above the new maximum 2.197100000000009e-14.
The current value of the parameter K (1.0) was above the new maximum 2.1263000000000043e-14.
The current value of the parameter K (1.0) was above the new maximum 2.680699999999996e-13.
The current value of the parameter K (1.0) was above the new maximum 6.044000000000007e-13.
The current value of the parameter K (1.0) was above the new maximum 2.036900000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 3.3912e-13.
The current value of the parameter K (1.0) was above the new maximum 4.3475000000000034e-13.
The current value of the parameter K (1.0) was above the new maximum 1.186900000000001e-12.
The current value of the parameter K (1.0) was above the new maximum 4.742200000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 6.788600000000023e-15.
The current value of the parameter K (1.0) was above the new maximum 1.236400000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 6.163200000000012e-13.
The current value of the parameter K (1.0) was above the new maximum 1.5476999999999973e-12.
The current value of the parameter K (1.0) was above the new maximum 8.173300000000018e-15.
The current value of the parameter K (1.0) was above the new maximum 5.571499999999997e-13.
The current value of the parameter K (1.0) was above the new maximum 8.453500000000017e-14.
The current value of the parameter K (1.0) was above the new maximum 2.7110000000000033e-13.
The current value of the parameter K (1.0) was above the new maximum 2.5789000000000005e-15.
The current value of the parameter K (1.0) was above the new maximum 3.676500000000006e-13.
The current value of the parameter K (1.0) was above the new maximum 4.1507999999999904e-14.
The current value of the parameter K (1.0) was above the new maximum 1.3275000000000022e-12.
The current value of the parameter K (1.0) was above the new maximum 1.976400000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 4.4920000000000065e-13.
The current value of the parameter K (1.0) was above the new maximum 1.3606000000000002e-14.
The current value of the parameter K (1.0) was above the new maximum 7.7328e-13.
The current value of the parameter K (1.0) was above the new maximum 2.9407000000000066e-12.
The current value of the parameter K (1.0) was above the new maximum 3.0088999999999994e-13.
The current value of the parameter K (1.0) was above the new maximum 1.7510000000000035e-12.
The current value of the parameter K (1.0) was above the new maximum 2.0758000000000023e-11.
The current value of the parameter K (1.0) was above the new maximum 1.43533818294098e-09.
The current value of the parameter K (1.0) was above the new maximum 3.5818e-13.
The current value of the parameter K (1.0) was above the new maximum 2.806199999999998e-13.
The current value of the parameter K (1.0) was above the new maximum 1.7634999999999985e-13.
The current value of the parameter K (1.0) was above the new maximum 5.5226000000000215e-15.
The current value of the parameter K (1.0) was above the new maximum 1.942800000000001e-11.
The current value of the parameter K (1.0) was above the new maximum 1.5203999999999982e-13.
The current value of the parameter K (1.0) was above the new maximum 7.922299999999992e-13.
The current value of the parameter K (1.0) was above the new maximum 2.7547000000000043e-15.
The current value of the parameter K (1.0) was above the new maximum 3.853599999999998e-12.
The current value of the parameter K (1.0) was above the new maximum 8.182000000000032e-15.
The current value of the parameter K (1.0) was above the new maximum 6.239200000000013e-13.
The current value of the parameter K (1.0) was above the new maximum 1.9230000000000018e-13.
The current value of the parameter K (1.0) was above the new maximum 6.152900000000012e-13.
The current value of the parameter K (1.0) was above the new maximum 2.514900000000003e-12.
The current value of the parameter K (1.0) was above the new maximum 1.6918999999999986e-13.
The current value of the parameter K (1.0) was above the new maximum 7.876900000000017e-15.
The current value of the parameter K (1.0) was above the new maximum 1.2825999999999998e-14.
The current value of the parameter K (1.0) was above the new maximum 9.778400000000006e-13.
The current value of the parameter K (1.0) was above the new maximum 1.423100000000006e-14.
The current value of the parameter K (1.0) was above the new maximum 6.276000000000003e-14.
The current value of the parameter K (1.0) was above the new maximum 2.502700000000003e-13.
The current value of the parameter K (1.0) was above the new maximum 6.302500000000025e-14.
The current value of the parameter K (1.0) was above the new maximum 4.555699999999988e-15.
The current value of the parameter K (1.0) was above the new maximum 8.917600000000013e-14.
The current value of the parameter K (1.0) was above the new maximum 7.607900000000012e-13.
The current value of the parameter K (1.0) was above the new maximum 1.4411999999999948e-14.
The current value of the parameter K (1.0) was above the new maximum 2.846600000000005e-14.
The current value of the parameter K (1.0) was above the new maximum 1.3324000000000047e-14.
The current value of the parameter K (1.0) was above the new maximum 8.158877567939619e-12.
The current value of the parameter K (1.0) was above the new maximum 1.7499999999999998e-14.
The current value of the parameter K (1.0) was above the new maximum 2.0330000000000084e-15.
The current value of the parameter K (1.0) was above the new maximum 8.161700000000006e-12.
The current value of the parameter K (1.0) was above the new maximum 6.044600000000009e-14.
The current value of the parameter K (1.0) was above the new maximum 6.203900000000012e-13.
The current value of the parameter K (1.0) was above the new maximum 2.9425999999999974e-15.
The current value of the parameter K (1.0) was above the new maximum 6.703200000000009e-15.
The current value of the parameter K (1.0) was above the new maximum 3.366700000000005e-13.
The current value of the parameter K (1.0) was above the new maximum 1.0217999999999991e-12.
The current value of the parameter K (1.0) was above the new maximum 5.602300000000022e-14.
The current value of the parameter K (1.0) was above the new maximum 2.9054000000000046e-12.
The current value of the parameter K (1.0) was above the new maximum 1.7606000000000067e-14.
The current value of the parameter K (1.0) was above the new maximum 7.667650994502062e-12.
The current value of the parameter K (1.0) was above the new maximum 1.509299999999998e-14.
The current value of the parameter K (1.0) was above the new maximum 3.3400999999999976e-13.
The current value of the parameter K (1.0) was above the new maximum 7.149599999999983e-15.
The current value of the parameter K (1.0) was above the new maximum 9.184699999999996e-13.
The current value of the parameter K (1.0) was above the new maximum 1.3248000000000026e-13.
The current value of the parameter K (1.0) was above the new maximum 9.82969999999999e-16.
The current value of the parameter K (1.0) was above the new maximum 4.68990000000002e-15.
The current value of the parameter K (1.0) was above the new maximum 1.3177999999999988e-11.
The current value of the parameter K (1.0) was above the new maximum 6.463299999999982e-15.
The current value of the parameter K (1.0) was above the new maximum 9.009600000000013e-13.
The current value of the parameter K (1.0) was above the new maximum 5.327699999999994e-13.
The current value of the parameter K (1.0) was above the new maximum 1.079300000000002e-11.
The current value of the parameter K (1.0) was above the new maximum 1.2285000000000018e-13.
The current value of the parameter K (1.0) was above the new maximum 6.218499999999977e-14.
The current value of the parameter K (1.0) was above the new maximum 1.167854754797384e-10.
The current value of the parameter K (1.0) was above the new maximum 5.605499999999984e-15.
The current value of the parameter K (1.0) was above the new maximum 5.994200000000011e-13.
The current value of the parameter K (1.0) was above the new maximum 3.4412e-14.
The current value of the parameter K (1.0) was above the new maximum 6.736800000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 3.897199999999994e-13.
The current value of the parameter K (1.0) was above the new maximum 7.446099999999988e-13.
The current value of the parameter K (1.0) was above the new maximum 2.6702999999999967e-14.
The current value of the parameter K (1.0) was above the new maximum 2.6283000000000045e-12.
The current value of the parameter K (1.0) was above the new maximum 7.076400000000023e-14.
The current value of the parameter K (1.0) was above the new maximum 2.955400000000001e-13.
The current value of the parameter K (1.0) was above the new maximum 1.239000000000002e-12.
The current value of the parameter K (1.0) was above the new maximum 4.9576999999999987e-14.
The current value of the parameter K (1.0) was above the new maximum 1.052599999999999e-12.
The current value of the parameter K (1.0) was above the new maximum 3.1823000000000126e-14.
The current value of the parameter K (1.0) was above the new maximum 1.7749999999999965e-14.
The current value of the parameter K (1.0) was above the new maximum 4.882199999999995e-13.
The current value of the parameter K (1.0) was above the new maximum 5.297500000000004e-13.
The current value of the parameter K (1.0) was above the new maximum 4.1767000000000024e-14.
The current value of the parameter K (1.0) was above the new maximum 1.2336999999999985e-12.
The current value of the parameter K (1.0) was above the new maximum 2.240800000000001e-14.
The current value of the parameter K (1.0) was above the new maximum 2.4950000000000013e-14.
Maximum a posteriori probability (MAP) point:
| result | unit | |
|---|---|---|
| parameter | ||
| PSR_J0534p2200...K | (2.45 -0.06 +0.13) x 10^-13 | 1 / (keV s cm2) |
| PSR_J0534p2200...index | -1.809 -0.008 +0.05 | |
| NVSS_J052622p224801.spectrum.main.Powerlaw.K | (0.000 +0.013 +1.1) x 10^-16 | 1 / (keV s cm2) |
| LAT_galdiff_Prefactor | (9.31 -0.09 +0.22) x 10^-1 |
Values of -log(posterior) at the minimum:
| -log(posterior) | |
|---|---|
| LAT | -118070.711236 |
| total | -118070.711236 |
Values of statistical measures:
| statistical measures | |
|---|---|
| AIC | 236149.422614 |
| BIC | 236191.592651 |
| DIC | 236158.188875 |
| PDIC | 1.841168 |
You can access to the parameter range like this (HPD):
[31]:
this_K = bayes.results.get_variates(
"PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.K"
)
this_idx = bayes.results.get_variates(
"PSR_J0534p2200.spectrum.main.Super_cutoff_powerlaw.index"
)
print("Highest_posterior_density_intervals :")
print(
"K (68%%): %10.2e,%10.2e" % this_K.highest_posterior_density_interval(cl=0.68)
)
print(
"K (95%%): %10.2e,%10.2e" % this_K.highest_posterior_density_interval(cl=0.95)
)
print(
"Index (68%%): %10.2e,%10.2e" % this_idx.highest_posterior_density_interval(cl=0.68)
)
print(
"Index (95%%): %10.2e,%10.2e" % this_idx.highest_posterior_density_interval(cl=0.95)
)
Highest_posterior_density_intervals :
K (68%): 2.38e-13, 2.57e-13
K (95%): 2.29e-13, 2.66e-13
Index (68%): -1.81e+00, -1.75e+00
Index (95%): -1.85e+00, -1.74e+00
[32]:
corner_figure = bayes.results.corner_plot()
corner_figure
[32]:
[ ]: