File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,6 @@ def hdf5_to_timed_dataframe(
221
221
222
222
electron_channels = []
223
223
column_names = []
224
-
225
224
for name , channel in channels .items ():
226
225
if channel ["format" ] == "per_electron" :
227
226
if channel ["dataset_key" ] in test_proc :
@@ -465,16 +464,13 @@ def hdf5_to_timed_array(
465
464
# Delayed array for loading an HDF5 file of reasonable size (e.g. < 1GB)
466
465
467
466
h5file = load_h5_in_memory (h5filename )
468
-
469
467
# Read out groups:
470
468
data_list = []
471
469
ms_marker = np .asarray (h5file [ms_markers_key ])
472
470
for channel in channels :
473
- timed_dataset = np .zeros_like (ms_marker )
474
471
if channel ["format" ] == "per_electron" :
475
472
g_dataset = np .asarray (h5file [channel ["dataset_key" ]])
476
- for i , point in enumerate (ms_marker ):
477
- timed_dataset [i ] = g_dataset [int (point ) - 1 ]
473
+ timed_dataset = g_dataset [np .maximum (ms_marker - 1 , 0 )]
478
474
else :
479
475
raise ValueError (
480
476
f"Invalid 'format':{ channel ['format' ]} for channel { channel ['dataset_key' ]} ." ,
You can’t perform that action at this time.
0 commit comments