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:
make_test_observation_table
to generate an observation tablemake_test_eventlist
to generate an event list and effective area table for each observationDataStore
to handle the file naming scheme; currently only the H.E.S.S. naming scheme is supported
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
, optionalAzimuth angle range (start, end) for random generation of observation pointing positions.
alt_range :
Angle
, optionalAltitude angle range (start, end) for random generation of observation pointing positions.
date_range :
Time
, optionalDate 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
, optionalWidth 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
}, optionalDefines random number generator initialisation. Passed to
get_random_state
.