File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
examples/ESRF_tune_example Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1313# Normalize the path (resolves '..')
1414absolute_path = os .path .abspath (relative_path )
1515
16- sr :Instrument = load_instrument (absolute_path )
16+ sr :Instrument = Instrument . load (absolute_path )
1717sr .design .get_lattice ().disable_6d ()
1818
1919quadForTuneDesign = sr .design .get_magnets ("QForTune" )
Original file line number Diff line number Diff line change 77from .lattice .simulator import Simulator
88from .arrays .array import ArrayConfig
99from pydantic import BaseModel ,ConfigDict
10+ from .configuration import load_instrument
1011
1112# Define the main class name for this module
1213PYAMLCLASS = "Instrument"
@@ -85,3 +86,7 @@ def live(self) -> ControlSystem:
8586 @property
8687 def design (self ) -> Simulator :
8788 return self .__design
89+
90+ @staticmethod
91+ def load (filename :str ) -> "Instrument" :
92+ return load_instrument (filename )
You can’t perform that action at this time.
0 commit comments