Adapt lightcurve tutorial
" index=3, amplitude=\"1e-11 cm-2 s-1 TeV-1\", reference=\"1 TeV\"\n",
")\n",
"temporal_model = ExpDecayTemporalModel(t0=\"6 h\", t_ref=gti_t0.mjd * u.d)\n",
+ "\n",
"model_simu = SkyModel(\n",
" spectral_model=spectral_model,\n",
" temporal_model=temporal_model,\n",
"lc_maker_1d = LightCurveEstimator(\n",
" energy_edges=[energy_axis.edges[0], energy_axis.edges[-1]],\n",
" source=\"model-fit\",\n",
- " reoptimize=False,\n",
")\n",
"lc_1d = lc_maker_1d.run(datasets)"
]
"metadata": {},
"outputs": [],
"source": [
- "ax = lc_1d.plot(marker=\"o\", label=\"3D\")"
+ "ax = lc_1d.plot(marker=\"o\", label=\"3D\")\n",
+ "plt.ylim(0, 4e-11)"
]
},
{
"outputs": [],
"source": [
"# Define the model:\n",
- "\n",
"spectral_model1 = PowerLawSpectralModel(\n",
" index=2.0, amplitude=\"1e-12 cm-2 s-1 TeV-1\", reference=\"1 TeV\"\n",
")\n",
"temporal_model1 = ExpDecayTemporalModel(t0=\"10 h\", t_ref=gti_t0.mjd * u.d)\n",
+ "\n",
"model = SkyModel(\n",
" spectral_model=spectral_model1,\n",
" temporal_model=temporal_model1,\n",
"metadata": {},
"outputs": [],
"source": [
- "for dataset in datasets:\n",
- " dataset.models = model"
+ "datasets.models = model"
]
},
{
