create_event_hdu#

magicctapipe.io.create_event_hdu(event_table, on_time, deadc, source_name, source_ra=None, source_dec=None)[source]#

Creates a fits binary table HDU for shower events.

Parameters:
event_tableastropy.table.table.QTable

Table of the DL2 events surviving gammaness cuts

on_timeastropy.table.table.QTable

ON time of the input data

deadcfloat

Dead time correction factor

source_namestr

Name of the observed source

source_rastr, optional

Right ascension of the observed source, whose format should be acceptable by astropy.coordinates.sky_coordinate.SkyCoord (Used only when the source name cannot be resolved)

source_decstr, optional

Declination of the observed source, whose format should be acceptable by astropy.coordinates.sky_coordinate.SkyCoord (Used only when the source name cannot be resolved)

Returns:
astropy.io.fits.hdu.table.BinTableHDU

Event HDU

Raises:
ValueError

If the source name cannot be resolved and also either or both of source RA/Dec coordinate is set to None