Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ieivanov committed Sep 25, 2023
1 parent 66458c5 commit 5b859f1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions iohub/reader_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,16 @@ def hcs_position_labels(self):
pos["Label"].split("-Site_") for pos in self.stage_positions
]
return [(well[0], well[1:], fov) for well, fov in labels]
except ValueError:
except Exception:
try:
# Look for "'1-Pos000_000', '2-Pos000_001', ... "
labels = [
pos["Label"].split("-Pos") for pos in self.stage_positions
]
return [("0", well, fov.replace("_", "")) for well, fov in labels]
except ValueError:
return [
("0", well, fov.replace("_", "")) for well, fov in labels
]
except Exception:
labels = [pos.get("Label") for pos in self.stage_positions]
raise ValueError(
"HCS position labels are in the format of "
Expand Down

0 comments on commit 5b859f1

Please sign in to comment.