Added support to import LongTrack settings file and to match with user defined twiss values
This commit is contained in:
+4
-1
@@ -81,7 +81,7 @@ class MatchMaker:
|
||||
|
||||
|
||||
|
||||
def match(self, om, variables = None, Injector=True, Athos = True, Aramis = False, Porthos = False):
|
||||
def match(self, om, variables = None, initCond=None, Injector=True, Athos = True, Aramis = False, Porthos = False):
|
||||
|
||||
self.matchresult.clear()
|
||||
cwd = os.getcwd()
|
||||
@@ -98,6 +98,9 @@ class MatchMaker:
|
||||
madx.updateLattice(om, target) # write lattice
|
||||
madx.commonHeader('SwissFEL', '#s/#e', None) # sets header
|
||||
madx.madx.call('initTwiss.madx')
|
||||
if not initCond is None:
|
||||
madx.madx.input('Twiss0: beta0, betx = %f, alfx = %f, bety = %f, alfy = %f;\n'
|
||||
% (initCond['betax'],initCond['alphax'],initCond['betay'],initCond['alphay']))
|
||||
if not variables is None:
|
||||
madx.definePresets(variables)
|
||||
if Injector:
|
||||
|
||||
Reference in New Issue
Block a user