ring_containment#

ctapipe.image.ring_containment(ring: MuonRingContainer, camera_radius: Quantity) float[source]#

Estimate the angular containment of a muon ring inside the camera’s field of view.

This function calculates the fraction of the muon ring that is contained within the camera’s field of view. It uses geometric properties to determine the intersection of the ring with the circular boundary of the camera.

Parameters:
ringMuonRingContainer

Container with the fitted ring parameters, including center coordinates and radius.

camera_radiusastropy.units.Quantity

Radius of the camera’s field of view (in degrees).

Returns:
float

The fraction of the ring that is inside the camera’s field of view, ranging from 0.0 to 1.0.

Notes

The calculation is based on the geometric intersection of two circles: the muon ring and the camera’s field of view. The method handles cases where: - The ring is fully contained within the camera. - The ring is partially contained within the camera. - The ring is completely outside the camera.

References

See https://stackoverflow.com/questions/3349125/circle-circle-intersection-points for the geometric approach to circle-circle intersection.