create_map_dataset_from_observation#
- gammapy.datasets.create_map_dataset_from_observation(observation, models=None, dataset_name=None, energy_axis_true=None, energy_axis=None, energy_bin_per_decade_max=30, spatial_width=None, spatial_width_max=<Quantity 12. deg>, spatial_bin_size=None, spatial_bin_size_min=<Quantity 0.01 deg>)[source]#
Create a MapDataset, if energy axes, spatial width or bin size are not given they are determined automatically from the observation IRFs, but the estimated value cannot exceed the given limits.
- Parameters
- observation
Observation
Observation to be simulated.
- models
Models
, optional Models. Default is None.
- dataset_namestr, optional
If
models
contains one or multipleFoVBackgroundModel
it should match thedataset_name
of the background model to use. Default is None. If None it is determined from the observation ID.- energy_axis_true
MapAxis
, optional True energy axis. Default is None. If None it is determined from the observation IRFs.
- energy_axis
MapAxis
, optional Reconstructed energy axis. Default is None. If None it is determined from the observation IRFs.
- energy_bin_per_decade_maxint, optional
Maximal number of bin per decade in energy for the reference dataset
- spatial_width
Quantity
, optional - Spatial window size. Default is None.
If None it is determined from the observation offset max or rad max.
- spatial_width_max
Quantity
, optional Maximal spatial width. Default is 12 degree.
- spatial_bin_size
Quantity
, optional Pixel size. Default is None. If None it is determined from the observation PSF R68.
- spatial_bin_size_min
Quantity
, optional Minimal spatial bin size. Default is 0.01 degree.
- observation