Skip to content

Commit 3ab856e

Browse files
committed
Always set role as detector
1 parent f99070b commit 3ab856e

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

src/murfey/client/analyser.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -200,21 +200,7 @@ def _find_context(self, file_path: Path) -> bool:
200200
self.parameters_model = PreprocessingParametersTomo
201201
# Assign role if not already present
202202
if not self._role:
203-
# Fractions files attributed to the detector
204-
if (
205-
"Fractions" in split_file_name[-1]
206-
or "fractions" in split_file_name[-1]
207-
):
208-
self._role = "detector"
209-
# MDOC files attributed to the microscope
210-
elif (
211-
file_path.suffix == ".mdoc"
212-
or file_path.with_suffix(".mdoc").is_file()
213-
):
214-
self._role = "microscope"
215-
# Attribute all other files to the detector
216-
else:
217-
self._role = "detector"
203+
self._role = "detector"
218204
return True
219205

220206
# Files with these suffixes belong to the serial EM tomography workflow
@@ -240,10 +226,7 @@ def _find_context(self, file_path: Path) -> bool:
240226
self._context = TomographyContext("serialem", self._basepath)
241227
self.parameters_model = PreprocessingParametersTomo
242228
if not self._role:
243-
if "Frames" in file_path.parts:
244-
self._role = "detector"
245-
else:
246-
self._role = "microscope"
229+
self._role = "detector"
247230
return True
248231
return False
249232

0 commit comments

Comments
 (0)