read_eventdisplay_fits

pyirf.io.read_eventdisplay_fits(infile, use_histogram=True)[source]

Read a DL2 FITS file as produced by the EventDisplay DL2 converter from ROOT files: https://github.com/Eventdisplay/Converters/blob/master/DL2/generate_DL2_file.py

Parameters:
infilestr or pathlib.Path

Path to the input fits file

use_histogrambool

If True, use number of simulated events from histogram provided in fits file, if False, estimate this number from the unique run_id, pointing direction combinations and the number of events per run in the run header. This will fail e.g. for protons with cuts already applied, since many runs will have 0 events surviving cuts.

Returns:
events: astropy.QTable

Astropy Table object containing the reconstructed events information.

simulated_events: ~pyirf.simulations.SimulatedEventsInfo