ring_completeness#

ctapipe.image.ring_completeness(pixel_fov_lon: Quantity, pixel_fov_lat: Quantity, weights: Quantity | ndarray | Sequence[float], ring: MuonRingContainer, threshold: float = 30, bins: int = 30) float[source]#

Estimate how complete a muon ring is by binning the light distribution along the ring and applying a threshold to the bin content.

Parameters:
pixel_fov_lonQuantity

Longitudes (x-coordinates) of the camera pixels in the TelescopeFrame.

pixel_fov_latQuantity

Latitudes (y-coordinates) of the camera pixels in the TelescopeFrame.

weightsarray-like

Weights for the camera pixels, usually the photoelectron charges.

ringMuonRingContainer

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

thresholdfloat, optional

Number of photoelectrons a bin must contain to be counted. Default is 30.

binsint, optional

Number of bins to use for the histogram. Default is 30.

Returns:
float

The ratio of bins above the threshold, representing the completeness of the ring.

Notes

This function calculates the completeness of the muon ring by dividing the ring into segments and counting the number of segments that have a light intensity above a given threshold. The completeness is the ratio of the number of segments above the threshold to the total number of segments.