Browse Source

Merge pull request #20 from glichtner/valid-loops

include only valid loops in experiment metadata
zolfa-add_slices_loading
Ruben Verweij 6 years ago
committed by GitHub
parent
commit
52000ce907
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      nd2reader/common_raw_metadata.py

+ 5
- 0
nd2reader/common_raw_metadata.py View File

@ -48,6 +48,11 @@ def get_loops_from_data(loop_data):
# take the first dictionary element, it contains all loop data
loops = loop_data[six.b('pPeriod')][list(loop_data[six.b('pPeriod')].keys())[0]]
# exclude invalid periods
if six.b('pPeriodValid') in loop_data:
loops = [loops[i] for i in range(len(loops)) if loop_data[six.b('pPeriodValid')][i] == 1]
return loops


Loading…
Cancel
Save