You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to translate a MAD lattice, presumably MAD-X, into Ocelot, but I can't get the built-in converter to work.
I'm trying to use the madx2ocelot() function, where I input the path to a lattice file (if that's what they're called in MAD) as the filename_seq parameter. I then get the error NameError: name 'lattice' is not defined from line 260 in madx.py, pasted below. It looks like the lattice that's being passed to madx_seq2ocelot_seq(), near the bottom of what I've pasted, is never defined.
I guess it's a somewhat niche use case, but I really need to translate this lattice, as other methods we've tried produce a plethora of bugs, requiring lots of manual fixing, and also require the involvement of other people which is usually a bottleneck.
Best regards,
Jonas
The text was updated successfully, but these errors were encountered:
Yes, this is indeed a niche case, and unfortunately, I doubt any of the main developers would dedicate time to translating your specific lattice to Ocelot format. The concept behind Ocelot is that users contribute to its development by creating and sharing useful functions or methods. If you develop something that could benefit other accelerator physicists, for example generalize madx2ocleot adaptor, you can submit a pull request with your contribution.
I wrote tfs adaptor back in 2021 (which is for output from madx). Maybe it will work better for you.
To be honest, translating lattices is generally relatively simple, even if an adaptor does not exist. It is just a one to one mapping of standard components 99% of the time.
Hi,
I need to translate a MAD lattice, presumably MAD-X, into Ocelot, but I can't get the built-in converter to work.
I'm trying to use the
madx2ocelot()
function, where I input the path to a lattice file (if that's what they're called in MAD) as thefilename_seq
parameter. I then get the errorNameError: name 'lattice' is not defined
from line 260 inmadx.py
, pasted below. It looks like thelattice
that's being passed tomadx_seq2ocelot_seq()
, near the bottom of what I've pasted, is never defined.I guess it's a somewhat niche use case, but I really need to translate this lattice, as other methods we've tried produce a plethora of bugs, requiring lots of manual fixing, and also require the involvement of other people which is usually a bottleneck.
Best regards,
Jonas
The text was updated successfully, but these errors were encountered: