From 3256e0a19eab13cfa21ff1f5c0fb60353318173f Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Thu, 12 Oct 2023 14:48:03 -0700 Subject: [PATCH] formatting --- iohub/convert.py | 5 +---- iohub/multipagetiff.py | 13 +++++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/iohub/convert.py b/iohub/convert.py index 151a641b..164f98a8 100644 --- a/iohub/convert.py +++ b/iohub/convert.py @@ -310,10 +310,7 @@ def _get_pos_names(self): if self.p > 1: self.pos_names = [] for p in range(self.p): - name = ( - self.reader.stage_positions[p].get("Label") - or p - ) + name = self.reader.stage_positions[p].get("Label") or p self.pos_names.append(name) else: self.pos_names = ["0"] diff --git a/iohub/multipagetiff.py b/iohub/multipagetiff.py index 6f04aef4..eda56ee9 100644 --- a/iohub/multipagetiff.py +++ b/iohub/multipagetiff.py @@ -173,16 +173,21 @@ def _set_mm_meta(self): for ch in self.mm_meta["Summary"]["ChNames"]: self.channel_names.append(ch) - # Parsing of data acquired with the OpenCell + # Parsing of data acquired with the OpenCell # acquisition script on the Dragonfly miroscope - elif mm_version == "2.0.1 20220920" and self.mm_meta["Summary"]["Prefix"] == "raw_data": - file_names = set([(key[0], val[0]) for key, val in self.coord_map.items()]) + elif ( + mm_version == "2.0.1 20220920" + and self.mm_meta["Summary"]["Prefix"] == "raw_data" + ): + file_names = set( + [(key[0], val[0]) for key, val in self.coord_map.items()] + ) if self.mm_meta["Summary"]["Positions"] > 1: self._stage_positions = [None] * self.positions for p_idx, file_name in file_names: - site_idx = int(file_name.split('_')[-1].split('-')[0]) + site_idx = int(file_name.split("_")[-1].split("-")[0]) pos = self._simplify_stage_position( self.mm_meta["Summary"]["StagePositions"][site_idx] )