calculate_impact#

magicctapipe.utils.calculate_impact(shower_alt, shower_az, core_x, core_y, tel_pos_x, tel_pos_y, tel_pos_z)[source]#

Calculates the impact parameter, i.e., the closest distance between a shower axis and a telescope position.

It uses the equations derived from a hand calculation, but the result is consistent with what calculated by MARS.

Since ctapipe v0.16.0 a function to calculate the impact parameter is implemented, so we may replace it to the official one in future.

Parameters:
shower_altastropy.units.quantity.Quantity

Altitude of the event arrival direction

shower_azastropy.units.quantity.Quantity

Azimuth of the event arrival direction

core_xastropy.units.quantity.Quantity

Core position along the geographic north

core_yastropy.units.quantity.Quantity

Core position along the geographic west

tel_pos_xastropy.units.quantity.Quantity

Telescope position along the geographic north

tel_pos_yastropy.units.quantity.Quantity

Telescope position along the geographic west

tel_pos_zastropy.units.quantity.Quantity

Telescope height from the reference altitude

Returns:
astropy.units.quantity.Quantity

Impact parameter