From 9b49927d1324865aeb0b5f8ade6e601fd8d03522 Mon Sep 17 00:00:00 2001 From: Simon Heybrock Date: Thu, 10 Oct 2024 09:37:04 +0200 Subject: [PATCH] Fix grow_nexus script length calculation --- src/ess/reduce/scripts/grow_nexus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ess/reduce/scripts/grow_nexus.py b/src/ess/reduce/scripts/grow_nexus.py index cfb2734c..3fade41a 100644 --- a/src/ess/reduce/scripts/grow_nexus.py +++ b/src/ess/reduce/scripts/grow_nexus.py @@ -14,8 +14,8 @@ def _scale_group(event_data: h5py.Group, scale: int): event_data['event_index'][:] = event_index size = event_data['event_id'].size - event_data['event_id'].resize(event_index[-1], axis=0) - event_data['event_time_offset'].resize(event_index[-1], axis=0) + event_data['event_id'].resize(size * scale, axis=0) + event_data['event_time_offset'].resize(size * scale, axis=0) for s in range(1, scale): event_data['event_id'][s * size : (s + 1) * size] = event_data['event_id'][