|
20 | 20 | from murfey.client.contexts.fib import FIBContext |
21 | 21 | from murfey.client.contexts.spa import SPAModularContext |
22 | 22 | from murfey.client.contexts.spa_metadata import SPAMetadataContext |
| 23 | +from murfey.client.contexts.sxt import SXTContext |
23 | 24 | from murfey.client.contexts.tomo import TomographyContext |
24 | 25 | from murfey.client.contexts.tomo_metadata import TomographyMetadataContext |
25 | 26 | from murfey.client.destinations import find_longest_data_directory |
@@ -111,8 +112,12 @@ def _find_extension(self, file_path: Path) -> bool: |
111 | 112 | if subframe_path := mdoc_data_block.get("SubFramePath"): |
112 | 113 | self._extension = Path(subframe_path).suffix |
113 | 114 | return True |
114 | | - # Check for LIF files separately |
115 | | - elif file_path.suffix == ".lif": |
| 115 | + # Check for LIF files and TXRM files separately |
| 116 | + elif ( |
| 117 | + file_path.suffix == ".lif" |
| 118 | + or file_path.suffix == ".txrm" |
| 119 | + or file_path.suffix == ".xrm" |
| 120 | + ): |
116 | 121 | self._extension = file_path.suffix |
117 | 122 | return True |
118 | 123 | return False |
@@ -179,6 +184,13 @@ def _find_context(self, file_path: Path) -> bool: |
179 | 184 | self._context = FIBContext("meteor", self._basepath, self._token) |
180 | 185 | return True |
181 | 186 |
|
| 187 | + # ----------------------------------------------------------------------------- |
| 188 | + # SXT workflow checks |
| 189 | + # ----------------------------------------------------------------------------- |
| 190 | + if file_path.suffix in (".txrm", ".xrm"): |
| 191 | + self._context = SXTContext("zeiss", self._basepath, self._token) |
| 192 | + return True |
| 193 | + |
182 | 194 | # ----------------------------------------------------------------------------- |
183 | 195 | # Tomography and SPA workflow checks |
184 | 196 | # ----------------------------------------------------------------------------- |
@@ -370,6 +382,10 @@ def _analyse(self): |
370 | 382 | ) |
371 | 383 | self.post_transfer(transferred_file) |
372 | 384 |
|
| 385 | + elif isinstance(self._context, SXTContext): |
| 386 | + logger.debug(f"File {transferred_file.name!r} is an SXT file") |
| 387 | + self.post_transfer(transferred_file) |
| 388 | + |
373 | 389 | elif isinstance(self._context, AtlasContext): |
374 | 390 | logger.debug(f"File {transferred_file.name!r} is part of the atlas") |
375 | 391 | self.post_transfer(transferred_file) |
|
0 commit comments