Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zolfa-nd2reader
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo ZOLFANELLI
zolfa-nd2reader
Commits
0a16ce90
"...git@gitlab.pasteur.fr:rpellari/recursive-gmconvert.git" did not exist on "master"
Commit
0a16ce90
authored
5 years ago
by
Ruben Verweij
Browse files
Options
Downloads
Patches
Plain Diff
Fix error in loop handling
parent
c0f289f4
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs
+1
-1
1 addition, 1 deletion
docs
nd2reader/common_raw_metadata.py
+18
-13
18 additions, 13 deletions
nd2reader/common_raw_metadata.py
with
19 additions
and
14 deletions
docs
@
f700c239
Compare
47a1165d
...
f700c239
Subproject commit
47a1165d5558515d6df67fb20b3032172de56279
Subproject commit
f700c239f8f9d7d1f99a3c10d9f67e2b3b8ef307
This diff is collapsed.
Click to expand it.
nd2reader/common_raw_metadata.py
+
18
−
13
View file @
0a16ce90
...
...
@@ -40,20 +40,25 @@ def parse_roi_type(type_no):
def
get_loops_from_data
(
loop_data
):
loops
=
[
loop_data
]
if
six
.
b
(
'
uiPeriodCount
'
)
in
loop_data
and
loop_data
[
six
.
b
(
'
uiPeriodCount
'
)]
>
0
:
# special ND experiment
if
six
.
b
(
'
pPeriod
'
)
not
in
loop_data
:
return
[]
# take the first dictionary element, it contains all
loop
data
loops
=
loop_data
[
six
.
b
(
'
pPeriod
'
)][
list
(
loop_data
[
six
.
b
(
'
pPeriod
'
)].
keys
())[
0
]
]
if
six
.
b
(
'
uiPeriodCount
'
)
in
loop_data
and
loop
_
data
[
six
.
b
(
'
uiPeriodCount
'
)]
>
0
:
loops
=
[
]
for
i
,
period
in
enumerate
(
loop_data
[
six
.
b
(
'
pPeriod
'
)]):
# 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
]
try
:
if
loop_data
[
six
.
b
(
'
pPeriodValid
'
)][
i
]
==
1
:
loops
.
append
(
loop_data
[
six
.
b
(
'
pPeriod
'
)][
period
])
except
IndexError
:
continue
else
:
# we can't be sure, append all
loops
.
append
(
loop_data
[
six
.
b
(
'
pPeriod
'
)][
period
])
return
loop
s
return
[
loop
_data
]
def
guess_sampling_from_loops
(
duration
,
loop
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment