From ca4416eb536f47f079372783de4fd3339c6f9fb9 Mon Sep 17 00:00:00 2001 From: zineb aly <aly.zineb.az@gmail.com> Date: Tue, 21 Apr 2020 15:19:17 +0200 Subject: [PATCH] make yapf --- km3io/offline.py | 4 +++- tests/test_offline.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/km3io/offline.py b/km3io/offline.py index 9a29e13..ee643c6 100644 --- a/km3io/offline.py +++ b/km3io/offline.py @@ -45,6 +45,7 @@ def fitinf(fitparam, tracks): params = fit[count_nested(fit, axis=1) > index] return params[:, index] + def fitparams(): """name of the fit parameters as defined in the official KM3NeT-Dataformat. @@ -56,6 +57,7 @@ def fitparams(): """ return fitparameters.keys() + def count_nested(Array, axis=0): """count elements in a nested awkward Array. @@ -80,6 +82,7 @@ def count_nested(Array, axis=0): if axis == 2: return ak1.count(Array, axis=2) + def best_track(tracks, strategy="first", rec_stages=None): """best track selection based on different strategies @@ -96,7 +99,6 @@ def best_track(tracks, strategy="first", rec_stages=None): # mask = tracks.rec_stages[] - EVENTS_MAP = BranchMapper(name="events", key="Evt", extra={ diff --git a/tests/test_offline.py b/tests/test_offline.py index 994df65..2f7bb02 100644 --- a/tests/test_offline.py +++ b/tests/test_offline.py @@ -36,6 +36,7 @@ class TestFitinf(unittest.TestCase): assert "JGANDALF_BETA0_RAD" in keys + class TestCountNested(unittest.TestCase): def test_count_nested(self): fit = OFFLINE_FILE.events.tracks.fitinf -- GitLab