Skip to content

Commit

Permalink
Merge pull request #98 from ttngu207/multi-plane-caiman
Browse files Browse the repository at this point in the history
fix(prairie_view_loader): fix file search for single-plane dataset
  • Loading branch information
kushalbakshi authored Jan 30, 2024
2 parents 32d667f + da0ef6b commit 7de446f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion element_interface/prairie_view_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ def get_prairieview_filenames(
assert (
channel in self.meta["channels"]
), f"Invalid 'channel' - Channels: {self.meta['channels']}"


plane_search_string = f"[@index='{plane_idx}']/" if self.meta["num_planes"] > 1 else ""
frames = self._xml_root.findall(
f".//Sequence/Frame/[@index='{plane_idx}']/File/[@channel='{channel}']"
f".//Sequence/Frame/{plane_search_string}File/[@channel='{channel}']"
)

fnames = [f.attrib["filename"] for f in frames]
Expand Down

0 comments on commit 7de446f

Please sign in to comment.