Fix modeling nbotebook
"for par in dataset_hess.models.parameters:\n",
" if par.frozen is False:\n",
" profile = fit.stat_profile(parameter=par)\n",
- " plt.plot(profile[\"values\"], profile[\"stat_scan\"] - total_stat)\n",
+ " plt.plot(profile[f\"{par.name}_scan\"], profile[\"stat_scan\"] - total_stat)\n",
" plt.xlabel(f\"{par.unit}\")\n",
" plt.ylabel(\"Delta TS\")\n",
" plt.title(f\"{par.name}: {par.value} +- {par.error}\")\n",
" sigma=sigma,\n",
" )\n",
" contours[f\"contour_{par_1}_{par_2}\"] = {\n",
- " par_1: contour[\"x\"].tolist(),\n",
- " par_2: contour[\"y\"].tolist(),\n",
+ " par_1: contour[par_1].tolist(),\n",
+ " par_2: contour[par_2].tolist(),\n",
" }\n",
" cts_sigma.append(contours)\n",
" return cts_sigma"
"outputs": [],
"source": [
"# Compute TS\n",
- "TS = stat_surface[\"stat\"] - result.total_stat"
+ "TS = stat_surface[\"stat_scan\"] - result.total_stat"
]
},
{
