magic-cta-pipe is under active development. Expect large and rapid changes in functionality.

get_dl2_mean#

magicctapipe.io.get_dl2_mean(event_data, weight_type='simple', group_index=['obs_id', 'event_id'])[source]#

Gets mean DL2 parameters per shower event.

Parameters:
event_datapandas.DataFrame

Data frame of shower events

weight_typestr, optional

Type of the weights for telescope-wise DL2 parameters - “simple” does not use any weights for calculations, “variance” uses the inverse of the RF variance, and “intensity” uses the linear-scale intensity parameter

group_indexlist, optional

Index to group telescope events

Returns:
pandas.DataFrame

Data frame of the shower events with mean DL2 parameters

Raises:
ValueError

If the input weight type is not known