Working on the design optics for SF+
This commit is contained in:
1 parent
85e73c09d5
commit
85b8e89917
5 files changed
+20
-8
No files matched your search
+5
-5
@@ -82,7 +82,7 @@ class MatchMaker:
|
||||
|
||||
|
||||
|
||||
def match(self, om, variables = None, initCond=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, full =False):
|
||||
|
||||
self.matchresult.clear()
|
||||
cwd = os.getcwd()
|
||||
@@ -110,13 +110,13 @@ class MatchMaker:
|
||||
print('Matching Injector ...')
|
||||
madx.madx.call('matchInjector.madx')
|
||||
self.updateOnlineModel(om,madx.madx, self.filter['injector'])
|
||||
self.parseMatchOutput(f.getvalue().split('\n'),'Injector')
|
||||
self.parseMatchOutput(f.getvalue().split('\n'),'Injector',full=full)
|
||||
if Athos:
|
||||
f.truncate(0)
|
||||
print('Matching Athos ...')
|
||||
madx.madx.call('matchAthos.madx')
|
||||
self.updateOnlineModel(om, madx.madx, self.filter['athos'])
|
||||
self.parseMatchOutput(f.getvalue().split('\n'), 'Athos')
|
||||
self.parseMatchOutput(f.getvalue().split('\n'), 'Athos',full=full)
|
||||
if Aramis:
|
||||
f.truncate(0)
|
||||
print('Matching Aramis ...')
|
||||
@@ -128,7 +128,7 @@ class MatchMaker:
|
||||
madx.madx.call('initTwiss.madx')
|
||||
madx.madx.call('matchAramis.madx')
|
||||
self.updateOnlineModel(om, madx.madx, self.filter['aramis'])
|
||||
self.parseMatchOutput(f.getvalue().split('\n'), 'Aramis')
|
||||
self.parseMatchOutput(f.getvalue().split('\n'), 'Aramis',full=full)
|
||||
|
||||
if Porthos:
|
||||
f.truncate(0)
|
||||
@@ -141,7 +141,7 @@ class MatchMaker:
|
||||
madx.madx.call('initTwiss.madx')
|
||||
madx.madx.call('matchPorthos.madx')
|
||||
self.updateOnlineModel(om, madx.madx, self.filter['porthos'])
|
||||
self.parseMatchOutput(f.getvalue().split('\n'), 'Porthos')
|
||||
self.parseMatchOutput(f.getvalue().split('\n'), 'Porthos',full=full)
|
||||
os.chdir(cwd)
|
||||
return madx.madx.table.twiss
|
||||
|
||||
|
||||
Reference in new issue
Block a user