本文整理汇总了Python中orbit.teapot.DriftTEAPOT.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python DriftTEAPOT.__init__方法的具体用法?Python DriftTEAPOT.__init__怎么用?Python DriftTEAPOT.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类orbit.teapot.DriftTEAPOT
的用法示例。
在下文中一共展示了DriftTEAPOT.__init__方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from orbit.teapot import DriftTEAPOT [as 别名]
# 或者: from orbit.teapot.DriftTEAPOT import __init__ [as 别名]
def __init__(self, phaseLength, nMacrosMin, nBins,\
bunch, impeDict,\
name = "freq. dep. LImpedance node"):
"""
Constructor. Creates the FreqDep_LImpedance-teapot element.
"""
DriftTEAPOT.__init__(self, name)
self.limpedance = LImpedance(phaseLength, nMacrosMin, nBins)
self.setType("freq. dep. limpedance node")
self.setLength(0.0)
self.phaseLength = phaseLength
self.nBins = nBins
self.localDict = impeDict
self.freq_tuple = self.localDict["freqs"]
self.freq_range = (len(self.freq_tuple) - 1)
self.z_tuple = self.localDict["z_imp"]
self.c = consts.speed_of_light
BetaRel = bunch.getSyncParticle().beta()
Freq0 = (BetaRel * self.c) / self.phaseLength
Z = []
for n in range(self.nBins / 2 - 1):
freq_mode = Freq0 * (n + 1)
z_mode = interp(freq_mode, self.freq_range,\
self.freq_tuple, self.z_tuple)
Z.append(z_mode)
self.limpedance.assignImpedance(Z)
示例2: __init__
# 需要导入模块: from orbit.teapot import DriftTEAPOT [as 别名]
# 或者: from orbit.teapot.DriftTEAPOT import __init__ [as 别名]
def __init__(self, length, name = "base_rfnode"):
"""
Constructor. Creates Base RF Cavity TEAPOT element.
It will never be called.
"""
DriftTEAPOT.__init__(self, name)
self.setType("base rf node")
self.setLength(0.0)
示例3: __init__
# 需要导入模块: from orbit.teapot import DriftTEAPOT [as 别名]
# 或者: from orbit.teapot.DriftTEAPOT import __init__ [as 别名]
def __init__(self, bunch, xbump, xpbump, ybump, ypbump, name = "bump"):
"""
Constructor. Creates the Bumpe TEAPOT element.
"""
DriftTEAPOT.__init__(self,name)
self.simplebump = simpleBump(bunch, xbump, xpbump, ybump, ypbump);
self.setType("Bump")
self.setLength(0.0)
示例4: __init__
# 需要导入模块: from orbit.teapot import DriftTEAPOT [as 别名]
# 或者: from orbit.teapot.DriftTEAPOT import __init__ [as 别名]
def __init__(self, length, ma, density_fac, shape, a, b, c, d, angle, pos = 0, name = "collimator no name"):
"""
Constructor. Creates the Collimator TEAPOT element.
"""
DriftTEAPOT.__init__(self,name)
self.collimator = Collimator(length,ma,density_fac,shape,a,b,c,d,angle,pos)
self.setType("collimator teapot")
self.setLength(length)
示例5: __init__
# 需要导入模块: from orbit.teapot import DriftTEAPOT [as 别名]
# 或者: from orbit.teapot.DriftTEAPOT import __init__ [as 别名]
def __init__(self, angle,\
name = "XY Rotation"):
"""
Constructor. Creates StraightRotationXY element.
"""
DriftTEAPOT.__init__(self, name)
self.setType("xy rotation node")
self.setLength(0.0)
self.angle = angle
示例6: __init__
# 需要导入模块: from orbit.teapot import DriftTEAPOT [as 别名]
# 或者: from orbit.teapot.DriftTEAPOT import __init__ [as 别名]
def __init__(self, a, b, pos = 0, c = 0, d = 0, name = "aperture"):
DriftTEAPOT.__init__(self,name)
self.shape = 3
self.a = a
self.b = b
self.c = c
self.d = d
self.pos = pos
self.Aperture = Aperture(self.shape, self.a, self.b, self.c, self.d, self.pos)
示例7: __init__
# 需要导入模块: from orbit.teapot import DriftTEAPOT [as 别名]
# 或者: from orbit.teapot.DriftTEAPOT import __init__ [as 别名]
def __init__(self, name = "BPMSignal no name"):
"""
Constructor. Creates the StatLats TEAPOT element.
"""
DriftTEAPOT.__init__(self,name)
self.bpm = BPMSignal()
self.setType("BPMSignal")
self.lattlength = 0.0
self.setLength(0.0)
self.position = 0.0
示例8: __init__
# 需要导入模块: from orbit.teapot import DriftTEAPOT [as 别名]
# 或者: from orbit.teapot.DriftTEAPOT import __init__ [as 别名]
def __init__(self, xmin, xmax, ymin, ymax, thick, name = "foil no name"):
"""
Constructor. Creates the Foil TEAPOT element.
"""
DriftTEAPOT.__init__(self,name)
self.foil = Foil(xmin, xmax, ymin, ymax, thick)
self.setType("foil teapot")
self.setLength(0.0)
# The user choice of scattering routine. Defualt (0) is full scatter
self.scatterChoice = 0
示例9: __init__
# 需要导入模块: from orbit.teapot import DriftTEAPOT [as 别名]
# 或者: from orbit.teapot.DriftTEAPOT import __init__ [as 别名]
def __init__(self, bx, by, ax, ay, ex, epx, l, zi, zf, ds, niters,
resid, xrefi, yrefi, eulerai, eulerbi, eulergi, b, filename):
"""
Constructor. Creates the FieldTracker TEAPOT element.
"""
DriftTEAPOT.__init__(self,name)
self.fieldtracker = FieldTracker(order, bx, by, ax, ay, ex, epx, l, zi, zf, ds, niters,
resid, xrefi, yrefi, eulerai, eulerbi, eulergi, apflag, b)
self.setType("fieldtracker teapot")
self.setLength(l)