@@ -263,7 +263,9 @@ def __init__(
263263 self ._selected_dir = basepath
264264 self ._add_basepath = add_basepath
265265 cfg = get_machine_config (
266- str (self .app ._environment .url .geturl ()), demo = self .app ._environment .demo
266+ str (self .app ._environment .url .geturl ()),
267+ instrument_name = self .app ._environment .instrument_name ,
268+ demo = self .app ._environment .demo ,
267269 )
268270 self ._context : (
269271 Type [SPAModularContext ] | Type [SPAContext ] | Type [TomographyContext ]
@@ -660,7 +662,7 @@ def on_button_pressed(self, event: Button.Pressed):
660662 self .app .pop_screen ()
661663 session_name = "Client connection"
662664 self .app ._environment .murfey_session = requests .post (
663- f"{ self .app ._environment .url .geturl ()} /instruments/{ self ._environment .instrument_name } /clients/{ self .app ._environment .client_id } /session" ,
665+ f"{ self .app ._environment .url .geturl ()} /instruments/{ self .app . _environment .instrument_name } /clients/{ self .app ._environment .client_id } /session" ,
664666 json = {"session_id" : session_id , "session_name" : session_name },
665667 ).json ()
666668
@@ -897,7 +899,9 @@ def on_button_pressed(self, event: Button.Pressed):
897899 visit_dir .mkdir (exist_ok = True )
898900 self .app ._set_default_acquisition_directories (visit_dir )
899901 machine_config = get_machine_config (
900- str (self .app ._environment .url .geturl ()), demo = self .app ._environment .demo
902+ str (self .app ._environment .url .geturl ()),
903+ instrument_name = self .app ._environment .instrument_name ,
904+ demo = self .app ._environment .demo ,
901905 )
902906 for dir in machine_config ["create_directories" ].values ():
903907 (visit_dir / dir ).mkdir (exist_ok = True )
@@ -936,7 +940,10 @@ def compose(self):
936940 )
937941 yield RadioButton ("Tomography" , value = self ._context is TomographyContext )
938942 if self .app ._multigrid :
939- machine_config = get_machine_config (str (self .app ._environment .url .geturl ()))
943+ machine_config = get_machine_config (
944+ str (self .app ._environment .url .geturl ()),
945+ instrument_name = self .app ._environment .instrument_name ,
946+ )
940947 destinations = []
941948 if self ._destination_overrides :
942949 for k , v in self ._destination_overrides .items ():
@@ -993,7 +1000,10 @@ def compose(self):
9931000 )
9941001 )
9951002 else :
996- machine_config = get_machine_config (str (self .app ._environment .url .geturl ()))
1003+ machine_config = get_machine_config (
1004+ str (self .app ._environment .url .geturl ()),
1005+ instrument_name = self .app ._environment .instrument_name ,
1006+ )
9971007 for s , d in self ._transfer_routes .items ():
9981008 if Path (d ).name not in machine_config ["create_directories" ].values ():
9991009 bulk .append (Label (f"Copy the source { s } to:" ))
@@ -1022,7 +1032,9 @@ def compose(self):
10221032 params_bulk .append (i )
10231033 self ._inputs [i ] = k .name
10241034 machine_config = get_machine_config (
1025- str (self .app ._environment .url .geturl ()), demo = self .app ._environment .demo
1035+ str (self .app ._environment .url .geturl ()),
1036+ instrument_name = self .app ._environment .instrument_name ,
1037+ demo = self .app ._environment .demo ,
10261038 )
10271039 if machine_config .get ("superres" ):
10281040 params_bulk .append (
@@ -1072,7 +1084,9 @@ def on_switch_changed(self, event):
10721084 def on_radio_set_changed (self , event : RadioSet .Changed ) -> None :
10731085 if event .index == 0 :
10741086 cfg = get_machine_config (
1075- str (self .app ._environment .url .geturl ()), demo = self .app ._environment .demo
1087+ str (self .app ._environment .url .geturl ()),
1088+ instrument_name = self .app ._environment .instrument_name ,
1089+ demo = self .app ._environment .demo ,
10761090 )
10771091 if cfg .get ("modular_spa" ):
10781092 self ._context = SPAContext
0 commit comments