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 @@ -224,7 +224,6 @@ def hdf5_to_timed_dataframe(
224
224
225
225
electron_channels = []
226
226
column_names = []
227
-
228
227
for name , channel in channels .items ():
229
228
if channel ["format" ] == "per_electron" :
230
229
if channel ["dataset_key" ] in test_proc :
@@ -468,16 +467,13 @@ def hdf5_to_timed_array(
468
467
# Delayed array for loading an HDF5 file of reasonable size (e.g. < 1GB)
469
468
470
469
h5file = load_h5_in_memory (h5filename )
471
-
472
470
# Read out groups:
473
471
data_list = []
474
472
ms_marker = np .asarray (h5file [ms_markers_key ])
475
473
for channel in channels :
476
- timed_dataset = np .zeros_like (ms_marker )
477
474
if channel ["format" ] == "per_electron" :
478
475
g_dataset = np .asarray (h5file [channel ["dataset_key" ]])
479
- for i , point in enumerate (ms_marker ):
480
- timed_dataset [i ] = g_dataset [int (point ) - 1 ]
476
+ timed_dataset = g_dataset [np .maximum (ms_marker - 1 , 0 )]
481
477
else :
482
478
raise ValueError (
483
479
f"Invalid 'format':{ channel ['format' ]} for channel { channel ['dataset_key' ]} ." ,
You can’t perform that action at this time.
0 commit comments