intensity_ratio_inside_ring#
- ctapipe.image.intensity_ratio_inside_ring(pixel_fov_lon: Quantity, pixel_fov_lat: Quantity, weights: Quantity | ndarray | Sequence[float], ring: MuonRingContainer, width: Quantity) float [source]#
Calculate the ratio of the photons inside a given ring with coordinates (center_fov_lon, center_fov_lat), radius and width.
The ring is assumed to be in [radius - 0.5 * width, radius + 0.5 * width]
- 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.
- weightsQuantity | np.ndarray | Sequence[float]
Weights for the camera pixels, usually the photoelectron charges.
- ringMuonRingContainer
Container with the fitted ring parameters, including center coordinates and radius.
- widthQuantity
Width of the ring.
- Returns:
- float
The ratio of the photons inside the ring to the total photons.
Notes
This function calculates the ratio of the photons inside a given ring by determining the pixels that fall within the specified ring width and summing their weights. The ratio is the sum of the weights inside the ring divided by the total sum of the weights.