We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do initialisation for the elegant converter like so:
def init(self): self.init_convert_matrix()
then missing elements could be added:
from ocelot.adaptors.elegant_lattice_converter import * conv = ElegantLatticeConverter() conv.elegant_matrix['KQUAD'] = {'type': Quadrupole, 'params': {'L':'l', 'K1':'k1', "K2": "k2", 'TILT': 'tilt'}} conv.elegant_matrix['KSEXT'] = {'type': Sextupole, 'params': {'L':'l', 'K2':'k2'}} conv.elegant_matrix['KOCT'] = {'type': Octupole, 'params': {'L':'l', 'K3':'k3'}}
conv.elegant_matrix['CSBEND'] = {'type': SBend,'params':{'L': 'l', 'ANGLE': 'angle', "K1": "k1", "K2": "k2", "FINT": "fint",'E1': 'e1', 'E2': 'e2', "HGAP": ["gap", "2"], 'TILT': 'tilt'}}
read_cell = conv.elegant2ocelot('p4-cell.lte') lattice = MagneticLattice(read_cell)
The text was updated successfully, but these errors were encountered:
Submit a pull request with proposed changes
Sorry, something went wrong.
just move self.init_convert_matrix()
to init() no need for pull request for this
sergey-tomin
No branches or pull requests
do initialisation for the elegant converter like so:
def init(self):
self.init_convert_matrix()
then missing elements could be added:
from ocelot.adaptors.elegant_lattice_converter import *
conv = ElegantLatticeConverter()
conv.elegant_matrix['KQUAD'] = {'type': Quadrupole, 'params': {'L':'l', 'K1':'k1', "K2": "k2", 'TILT': 'tilt'}}
conv.elegant_matrix['KSEXT'] = {'type': Sextupole, 'params': {'L':'l', 'K2':'k2'}}
conv.elegant_matrix['KOCT'] = {'type': Octupole, 'params': {'L':'l', 'K3':'k3'}}
conv.elegant_matrix['CSBEND'] = {'type': SBend,'params':{'L': 'l', 'ANGLE': 'angle', "K1": "k1", "K2": "k2", "FINT": "fint",'E1': 'e1', 'E2': 'e2', "HGAP": ["gap", "2"], 'TILT': 'tilt'}}
read_cell = conv.elegant2ocelot('p4-cell.lte')
lattice = MagneticLattice(read_cell)
The text was updated successfully, but these errors were encountered: