From ab791cf465e527a554dfaa5714781ed45ff6a5ed Mon Sep 17 00:00:00 2001 From: Manu Le Guirriec <eleguirriec@km3net.de> Date: Fri, 24 Jun 2022 14:36:35 +0000 Subject: [PATCH] Test for nanobeacon flag --- tests/test_tools.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_tools.py b/tests/test_tools.py index 5cad5ff..c55cf6f 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -31,6 +31,7 @@ from km3io.tools import ( is_3dshower, is_mxshower, is_3dmuon, + is_nanobeacon, ) OFFLINE_FILE = OfflineReader(data_path("offline/km3net_offline.root")) @@ -642,3 +643,13 @@ class TestTriggerMaskChecks(unittest.TestCase): [False, False, False, True, False, False, True, False, True, True], list(is_3dmuon(GENHEN_OFFLINE_FILE.events.trigger_mask)), ) + + def test_is_nanobeacon(self): + assert np.allclose( + [False, False, False, False, False, False, False, False, False, False], + list(is_nanobeacon(OFFLINE_FILE.events.trigger_mask)), + ) + assert np.allclose( + [False, False, False, False, False, False, False, False, False, False], + list(is_nanobeacon(GENHEN_OFFLINE_FILE.events.trigger_mask)), + ) -- GitLab