From 16d65f1d9a3c8233736b776326668e2455448030 Mon Sep 17 00:00:00 2001 From: bpalmeiro Date: Thu, 7 Mar 2024 12:43:41 +0100 Subject: [PATCH] Add void selection_in_band function --- invisible_cities/reco/icaro_components.py | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/invisible_cities/reco/icaro_components.py b/invisible_cities/reco/icaro_components.py index ee8d9f4a7..5de4f87d7 100644 --- a/invisible_cities/reco/icaro_components.py +++ b/invisible_cities/reco/icaro_components.py @@ -133,4 +133,37 @@ def band_selector_and_check(dst : pd.DataFrame, return sel_krband +def selection_in_band(z : np.array, + e : np.array, + range_z : Tuple[float, float], + range_e : Tuple[float, float], + nbins_z : int = 50, + nbins_e : int = 100, + nsigma : float = 3.5) ->np.array: + """ + This function returns a mask for the selection of the events that are inside the Kr E vz Z + + Parameters + ---------- + z: np.array + axial (z) values + e: np.array + energy values + range_z: Tuple[np.array, np.array] + Range in Z-axis + range_e: Tuple[np.array, np.array] + Range in Energy-axis + nbins_z: int + Number of bins in Z-axis + nbins_e: int + Number of bins in energy-axis + nsigma: float + Number of sigmas to set the band width + Returns + ---------- + A mask corresponding to the selection made. + """ + + # To be implemented + return [True] * len(z)