hillas_parameters#
- ctapipe.image.hillas.hillas_parameters(geom, image)[source]#
Compute Hillas parameters for a given shower image.
Implementation uses a PCA analogous to the implementation in src/main/java/fact/features/HillasParameters.java from fact-project/fact-tools
The recommended form is to pass only the sliced geometry and image for the pixels to be considered.
The method also supports giving a full geometry with image as a masked array, however this performs worse than passing geometry and image only for the selected pixels.
- Parameters:
- geomctapipe.instrument.CameraGeometry
Camera geometry transformed to
TelescopeFrame. The pixel coordinates must have angular units. The cleaning mask should be applied to improve performance.- imagearray_like
Charge in each pixel, the cleaning mask should already be applied to improve performance.
- Returns:
- ctapipe.containers.HillasParametersContainer
Container of Hillas parameters in angular units.
- Raises:
- HillasParameterizationError:
If the sum of image is equal to 0.0.
- HillasParameterizationError:
If at least one element of image is negative.
- ValueError
If the geometry does not use angular pixel coordinates or if the shape of image and the number of pixels in geom do not match.