from time import perf_counter
from wtlike import WtLike, Config, PointSource, PoissonRep
from utilities.ipynb_docgen import *
config = Config()
source = PointSource('BL Lac')
wtl = WtLike('BL Lac', clear=False)
L = wtl.full_likelihood(); PoissonRep(L).info()
pd.set_option('display.precision', 4)
pd.Series(PoissonRep(wtl.full_likelihood()).info())
wtl.plot_flux(source_name=source.name, )
wtl1 = wtl.rebinned_copy((-3,0, 1/24))
wtl1.plot_flux(tzero=59330, fmt='o', source_name=source.name);
plt.gca().axhline(0, color='grey', ls='--');
wtl2 = wtl.rebinned_copy((59331, 59331.5, 5/24/60))
wtl2.plot_flux(tzero=59331, fmt='o',source_name=source.name);
plt.gca().axhline(0, color='grey', ls='--');
wtl2.flux_table().head()