File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1919from murfey .client .contexts .spa import SPAModularContext
2020from murfey .client .contexts .spa_metadata import SPAMetadataContext
2121from murfey .client .contexts .tomo import TomographyContext
22+ from murfey .client .contexts .tomo_metadata import TomographyMetadataContext
2223from murfey .client .instance_environment import MurfeyInstanceEnvironment
2324from murfey .client .rsync import RSyncerUpdate , TransferResult
2425from murfey .util .client import Observer , get_machine_config_client
@@ -226,6 +227,13 @@ def _analyse(self):
226227 and not self ._context
227228 ):
228229 self ._context = SPAMetadataContext ("epu" , self ._basepath )
230+ elif (
231+ "Batch" in transferred_file .parts
232+ or "SearchMap" in transferred_file .parts
233+ or transferred_file .name == "Session.dm"
234+ and not self ._context
235+ ):
236+ self ._context = TomographyMetadataContext ("tomo" , self ._basepath )
229237 self .post_transfer (transferred_file )
230238 else :
231239 dc_metadata = {}
@@ -369,9 +377,10 @@ def _analyse(self):
369377 elif isinstance (
370378 self ._context ,
371379 (
372- TomographyContext ,
373380 SPAModularContext ,
374381 SPAMetadataContext ,
382+ TomographyContext ,
383+ TomographyMetadataContext ,
375384 ),
376385 ):
377386 context = str (self ._context ).split (" " )[0 ].split ("." )[- 1 ]
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def post_transfer(
5050 ** kwargs ,
5151 )
5252
53- if transferred_file .name == "Session.xml " and environment :
53+ if transferred_file .name == "Session.dm " and environment :
5454 logger .info ("Tomography session metadata found" )
5555 with open (transferred_file , "r" ) as session_xml :
5656 session_data = xmltodict .parse (session_xml .read ())
You can’t perform that action at this time.
0 commit comments