DatasetsMaker#
- class gammapy.makers.DatasetsMaker(makers, stack_datasets=True, n_jobs=None, cutout_mode='trim', cutout_width=None, parallel_backend=None)[source]#
Bases:
Maker
,ParallelMixin
Run makers in a chain.
- Parameters:
- makerslist of
Maker
objects Makers.
- stack_datasetsbool, optional
If True, stack into the reference dataset (see
run
method arguments). Default is True.- n_jobsint, optional
Number of processes to run in parallel. Default is one, unless
N_JOBS_DEFAULT
was modified.- cutout_mode{‘trim’, ‘partial’, ‘strict’}
Used only to cutout the reference
MapDataset
around each processed observation. Mode is an option for Cutout2D, for details seeCutout2D
. Default is “trim”.- cutout_widthtuple of
Angle
, optional Angular sizes of the region in (lon, lat) in that specific order. If only one value is passed, a square region is extracted. If None it returns an error, except if the list of makers includes a
SafeMaskMaker
with the offset-max method defined. In that case it is set to two timesoffset_max
. Default is None.- parallel_backend{‘multiprocessing’, ‘ray’}, optional
Which backend to use for multiprocessing. Default is None.
- makerslist of
Attributes Summary
Number of jobs as an integer.
Parallel backend as a string.
Methods Summary
callback
(dataset)error_callback
(dataset)make_dataset
(dataset, observation)Make single dataset.
run
(dataset, observations[, datasets])Run data reduction.
Attributes Documentation
- n_jobs#
Number of jobs as an integer.
- offset_max#
- parallel_backend#
Parallel backend as a string.
- safe_mask_maker#
- tag = 'DatasetsMaker'#
Methods Documentation
- make_dataset(dataset, observation)[source]#
Make single dataset.
- Parameters:
- dataset
MapDataset
Reference dataset.
- observation
Observation
Observation.
- dataset
- run(dataset, observations, datasets=None)[source]#
Run data reduction.
- Parameters:
- dataset
MapDataset
Reference dataset (used only for stacking if datasets are provided).
- observations
Observations
Observations.
- datasets
Datasets
Base datasets, if provided its length must be the same as the observations.
- dataset
- Returns:
- datasets
Datasets
Datasets.
- datasets