Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Feb 21, 2024
1 parent f01d3fc commit de075b5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/nd2/_parse/_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,19 @@ def load_experiment(
if prev.count < loop.count:
dest[-1] = loop


# FIXME:
# hack for file in https://github.com/tlambert03/nd2/issues/190
# there is a better fix, but this is a very rare case
loop_params = src.get("uLoopPars", {})
if "pSubLoops" in loop_params:
loop_params = cast("NETimeLoopPars", loop_params)
subloops = loop_params["pSubLoops"]
if "i0000000000" in subloops:
subnext = subloops["i0000000000"]["ppNextLevelEx"]
if "i0000000000" in subnext:
experiment = subnext["i0000000000"]["SLxExperiment"]
i0 = "i0000000000"
if i0 in subloops:
subnext = subloops[i0]["ppNextLevelEx"]
if i0 in subnext:
experiment = subnext[i0]["SLxExperiment"]
dest.extend(load_experiment(experiment))

next_level_src = src.get("ppNextLevelEx")
Expand Down

0 comments on commit de075b5

Please sign in to comment.