make_test_dataset

gammapy.datasets.make_test_dataset(outdir, overwrite=False, observatory_name='hess', n_obs=10, az_range=<Angle [ 0., 360.] deg>, alt_range=<Angle [45., 90.] deg>, date_range=(<Time object: scale='utc' format='iso' value=2010-01-01 00:00:00.000>, <Time object: scale='utc' format='iso' value=2015-01-01 00:00:00.000>), n_tels_range=(3, 4), sigma=<Angle 5. deg>, spectral_index=2.7, random_state='random-seed')[source]

Make a test dataset and save it to disk.

Uses:

This method is useful for instance to produce samples in order to test the machinery for reconstructing background (cube) models.

See also Simulate event lists.

Parameters:

outdir : str

Path to store the files.

overwrite : bool, optional

Flag to remove previous datasets in outdir (if existing).

observatory_name : str, optional

Name of the observatory; a list of choices is given in observatory_locations.

n_obs : int

Number of observations for the obs table.

az_range : Angle, optional

Azimuth angle range (start, end) for random generation of observation pointing positions.

alt_range : Angle, optional

Altitude angle range (start, end) for random generation of observation pointing positions.

date_range : Time, optional

Date range (start, end) for random generation of observation start time.

n_tels_range : int, optional

Range (start, end) of number of telescopes participating in the observations.

sigma : Angle, optional

Width of the gaussian model used for the spatial coordinates.

spectral_index : float, optional

Index for the power-law model used for the energy coordinate.

random_state : {int, ‘random-seed’, ‘global-rng’, RandomState}, optional

Defines random number generator initialisation. Passed to get_random_state.