create_histogram_table

pyirf.binning.create_histogram_table(events, bins, key='reco_energy')[source]

Histogram a variable from events data into an astropy table.

Parameters:
eventsastropy.QTable

Astropy Table object containing the reconstructed events information.

bins: ``~np.ndarray`` or ``~astropy.units.Quantity``

Array or Quantity of bin edges. It must have the same units as data if a Quantity.

keystring

Variable to histogram from the events table.

Returns:
hist: astropy.QTable

Astropy table containg the histogram.