Adapt light curve tutorial
"\n",
"sky_model = SkyModel(\n",
" spatial_model=spatial_model, spectral_model=spectral_model, name=\"crab\"\n",
- ")\n",
- "# Now we freeze these parameters that we don't want the light curve estimator to change\n",
- "sky_model.parameters[\"index\"].frozen = True\n",
- "sky_model.parameters[\"lon_0\"].frozen = True\n",
- "sky_model.parameters[\"lat_0\"].frozen = True"
+ ")"
]
},
{
"We can now create the light curve estimator. \n",
"\n",
"We pass it the list of datasets and the name of the model component for which we want to build the light curve. \n",
- "We can optionally ask for parameters reoptimization during fit, that is most of the time to fit background normalization in each time bin. \n",
+ "In a given time bin, the only free parameter of the source is its normalization. We can optionally ask for parameters of other model components to be reoptimized during fit, that is most of the time to fit background normalization in each time bin. \n",
"\n",
"If we don't set any time interval, the `~gammapy.estimators.LightCurveEstimator` is determines the flux of each dataset and places it at the corresponding time in the light curve. \n",
"Here one dataset equals to one observing run."
" reference=1 * u.TeV,\n",
")\n",
"\n",
- "sky_model = SkyModel(spectral_model=spectral_model, name=\"crab\")\n",
- "# Now we freeze these parameters that we don't want the light curve estimator to change\n",
- "sky_model.parameters[\"index\"].frozen = True"
+ "sky_model = SkyModel(spectral_model=spectral_model, name=\"crab\")"
]
},
{
"metadata": {
"celltoolbar": "Edit Metadata",
"kernelspec": {
- "display_name": "Python 3",
+ "display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.7.0"
+ "version": "3.8.13"
}
},
"nbformat": 4,
