2222from murfey .client .instance_environment import MurfeyInstanceEnvironment
2323from murfey .client .rsync import RSyncerUpdate , TransferResult
2424from murfey .client .tui .forms import FormDependency
25- from murfey .util import Observer , get_machine_config
25+ from murfey .util import Observer , get_machine_config_client
2626from murfey .util .models import PreprocessingParametersTomo , ProcessingParametersSPA
2727
2828logger = logging .getLogger ("murfey.client.analyser" )
@@ -73,7 +73,7 @@ def __init__(
7373 self ._stopping = False
7474 self ._halt_thread = False
7575 self ._murfey_config = (
76- get_machine_config (
76+ get_machine_config_client (
7777 str (environment .url .geturl ()),
7878 instrument_name = environment .instrument_name ,
7979 demo = environment .demo ,
@@ -86,6 +86,10 @@ def _find_extension(self, file_path: Path):
8686 """
8787 Identifies the file extension and stores that information in the class.
8888 """
89+ if "atlas" in file_path .parts :
90+ self ._extension = file_path .suffix
91+ return True
92+
8993 if (
9094 required_substrings := self ._murfey_config .get (
9195 "data_required_substrings" , {}
@@ -121,6 +125,10 @@ def _find_context(self, file_path: Path) -> bool:
121125 stages of processing. Actions to take for individual files will be determined
122126 in the Context classes themselves.
123127 """
128+ if "atlas" in file_path .parts :
129+ self ._role = "detector"
130+ self ._context = SPAMetadataContext ("epu" , self ._basepath )
131+ return True
124132
125133 # CLEM workflow checks
126134 # Look for LIF and XLIF files
@@ -137,7 +145,7 @@ def _find_context(self, file_path: Path) -> bool:
137145 and self ._environment
138146 ):
139147 created_directories = set (
140- get_machine_config (
148+ get_machine_config_client (
141149 str (self ._environment .url .geturl ()),
142150 instrument_name = self ._environment .instrument_name ,
143151 demo = self ._environment .demo ,
@@ -157,7 +165,7 @@ def _find_context(self, file_path: Path) -> bool:
157165 logger .info ("Acquisition software: EPU" )
158166 if self ._environment :
159167 try :
160- cfg = get_machine_config (
168+ cfg = get_machine_config_client (
161169 str (self ._environment .url .geturl ()),
162170 instrument_name = self ._environment .instrument_name ,
163171 demo = self ._environment .demo ,
@@ -310,7 +318,10 @@ def _analyse(self):
310318 )
311319 except Exception as e :
312320 logger .error (f"Exception encountered: { e } " )
313- if self ._role == "detector" :
321+ if (
322+ self ._role == "detector"
323+ and "atlas" not in transferred_file .parts
324+ ):
314325 if not dc_metadata :
315326 try :
316327 dc_metadata = self ._context .gather_metadata (
@@ -376,7 +387,10 @@ def _analyse(self):
376387 )
377388 except Exception as e :
378389 logger .error (f"Exception encountered: { e } " )
379- if self ._role == "detector" :
390+ if (
391+ self ._role == "detector"
392+ and "atlas" not in transferred_file .parts
393+ ):
380394 if not dc_metadata :
381395 try :
382396 dc_metadata = self ._context .gather_metadata (
0 commit comments