Fix pulsar tutorial
" index=4, amplitude=\"1.3e-9 cm-2 s-1 TeV-1\", reference=\"0.02 TeV\"\n",
")\n",
"\n",
- "fit_range = (0.04 * u.TeV, 0.4 * u.TeV)\n",
+ "emin_fit, emax_fit = (0.04 * u.TeV, 0.4 * u.TeV)\n",
"\n",
"for obs in extraction.spectrum_observations:\n",
" obs.model = model\n",
- " obs.set_fit_energy_range(fit_range[0], fit_range[1])\n",
+ " obs.mask_fit = obs.counts.energy_mask(emin=emin_fit, emax=emax_fit)\n",
"\n",
"joint_fit = Fit(extraction.spectrum_observations)\n",
"joint_result = joint_fit.run()\n",
"\n",
"spec_model_true.plot(\n",
" ax=ax_spectrum,\n",
- " energy_range=fit_range,\n",
+ " energy_range=(emin_fit, emax_fit),\n",
" label=\"Reference model\",\n",
" c=\"black\",\n",
" linestyle=\"dashed\",\n",
