From 50147759f5aee6117a9f177df51526204e76978b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20N=C3=B6the?= Date: Fri, 1 Jul 2022 19:28:48 +0200 Subject: [PATCH] Remove extensive doctest example from hillas function --- ctapipe/image/hillas.py | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/ctapipe/image/hillas.py b/ctapipe/image/hillas.py index fae58ccb8be..a6a55c3b82d 100644 --- a/ctapipe/image/hillas.py +++ b/ctapipe/image/hillas.py @@ -66,37 +66,18 @@ def hillas_parameters(geom, image): from https://github.com/fact-project/fact-tools - The image passed to this function can be in three forms: - - >>> from ctapipe.image.hillas import hillas_parameters - >>> from ctapipe.image.tests.test_hillas import create_sample_image, compare_hillas - >>> geom, image, clean_mask = create_sample_image(psi='0d') - >>> - >>> # Fastest - >>> geom_selected = geom[clean_mask] - >>> image_selected = image[clean_mask] - >>> hillas_selected = hillas_parameters(geom_selected, image_selected) - >>> - >>> # Mid (1.45 times longer than fastest) - >>> image_zeros = image.copy() - >>> image_zeros[~clean_mask] = 0 - >>> hillas_zeros = hillas_parameters(geom, image_zeros) - >>> - >>> # Slowest (1.51 times longer than fastest) - >>> image_masked = np.ma.masked_array(image, mask=~clean_mask) - >>> hillas_masked = hillas_parameters(geom, image_masked) - >>> - >>> compare_hillas(hillas_selected, hillas_zeros) - >>> compare_hillas(hillas_selected, hillas_masked) + The recommended form is to pass only the sliced geometry and image + for the pixels to be considered. Each method gives the same result, but vary in efficiency Parameters ---------- geom: ctapipe.instrument.CameraGeometry - Camera geometry + Camera geometry, the cleaning mask should be applied to improve performance image : array_like - Charge in each pixel + Charge in each pixel, the cleaning mask should already be applied to + improve performance. Returns -------