make_test_eventlist

gammapy.datasets.make_test_eventlist(observation_table, obs_id, sigma=<Angle 5. deg>, spectral_index=2.7, random_state='random-seed')[source]

Make a test event list for a specified observation.

The observation can be specified with an observation table object and the observation ID pointing to the correct observation in the table.

For now, only a very rudimentary event list is generated, containing only detector X, Y coordinates (a.k.a. nominal system) and energy columns for the events. And the livetime of the observations stored in the header.

The model used to simulate events is also very simple. Only dummy background is created (no signal). The background is created following a 2D symmetric gaussian model for the spatial coordinates (X, Y) and a power-law in energy. The gaussian width varies in energy from sigma/2 to sigma. The number of events generated depends linearly on the livetime and on the altitude angle of the observation. The model can be tuned via the sigma and spectral_index parameters.

In addition, an effective area table is produced. For the moment only the low energy threshold is filled.

See also Simulate event lists.

Parameters:

observation_table : ObservationTable

Observation table containing the observation to fake.

obs_id : int

Observation ID of the observation to fake inside the observation table.

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.

Returns:

event_list : EventList

Event list.

aeff_hdu : BinTableHDU

Effective area table.