From bc617bd3dbef54a044d71b49192ce72b77cb895f Mon Sep 17 00:00:00 2001
From: zineb aly <aly.zineb.az@gmail.com>
Date: Mon, 20 Jan 2020 12:57:27 +0100
Subject: [PATCH] adapt fitinf to tests

---
 km3io/offline.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/km3io/offline.py b/km3io/offline.py
index 7cd5d9b..ff27182 100644
--- a/km3io/offline.py
+++ b/km3io/offline.py
@@ -179,8 +179,8 @@ class OfflineKeys:
                 'JSTART_NPE_MIP', 'JSTART_NPE_MIP_TOTAL',
                 'JSTART_LENGTH_METRES', 'JVETO_NPE', 'JVETO_NUMBER_OF_HITS',
                 'JENERGY_MUON_RANGE_METRES', 'JENERGY_NOISE_LIKELIHOOD',
-                'JENERGY_NDF', 'JENERGY_NUMBER_OF_HITS'
-            ]  # 'JCOPY_Z_M' is the last element, not found in files!
+                'JENERGY_NDF', 'JENERGY_NUMBER_OF_HITS', 'JCOPY_Z_M'
+            ]  
         return self._fit_keys
 
     @property
@@ -600,7 +600,8 @@ class OfflineTracks:
     @property
     def reco(self):
         if self._reco is None:
-            keys = ", ".join(self._fit_keys)
+            # the last key is not found in files
+            keys = ", ".join(self._fit_keys[:-1]) 
             # i[0] is the reco data of the track with the highest likelihood
             # 18 is always the position of fit info
             fit_data = np.array([i[0] for i in self._values[18] if len(i)!=0])
-- 
GitLab