Browse Source

include only valid loops in experiment metadata

master
Gregor Lichtner 6 years ago
parent
commit
10601e444c
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 # take the first dictionary element, it contains all loop data
loops = loop_data[six.b('pPeriod')][list(loop_data[six.b('pPeriod')].keys())[0]] 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 return loops


Loading…
Cancel
Save