energy_bias_resolution#

protopipe.perf.energy_bias_resolution(events, energy_bins, energy_type='true', bias_function=<function median>, resolution_function=<function inter_quantile_distance>)[source]#

Calculate bias and energy resolution.

Parameters
events: astropy.table.QTable

Astropy Table object containing the reconstructed events information.

energy_bins: numpy.ndarray(dtype=float, ndim=1)

Bin edges in energy.

energy_type: str

Either “true” or “reco” energy. Default is “true”.

bias_function: callable

Function used to calculate the energy bias

resolution_function: callable

Function used to calculate the energy resolution

Returns
resultastropy.table.Table

Table containing the energy bias and resolution per each bin in true energy.