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>, position=None, frame='icrs')[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:
observationObservation

Observation to be simulated.

modelsModels, optional

Models. Default is None.

dataset_namestr, optional

If models contains one or multiple FoVBackgroundModel it should match the dataset_name of the background model to use. Default is None. If None it is determined from the observation ID.

energy_axis_trueMapAxis, optional

True energy axis. Default is None. If None it is determined from the observation IRFs.

energy_axisMapAxis, 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_widthQuantity, optional
Spatial window size. Default is None.

If None it is determined from the observation offset max or rad max.

spatial_width_maxQuantity, optional

Maximal spatial width. Default is 12 degree.

spatial_bin_sizeQuantity, optional

Pixel size. Default is None. If None it is determined from the observation PSF R68.

spatial_bin_size_minQuantity, optional

Minimal spatial bin size. Default is 0.01 degree.

positionSkyCoord, optional

Center of the geometry. Defalut is the observation pointing.

frame: str, optional

frame of the coordinate system. Default is “icrs”.