Skip to content
New issue

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

problem with display of correctly initialised VariableMultipole element #751

Open
lcarver opened this issue Apr 4, 2024 · 1 comment
Open
Assignees

Comments

@lcarver
Copy link
Contributor

lcarver commented Apr 4, 2024

I initalise a VariableMultipole element

var = at.VariableMultipole('h_acd', AmplitudeB = [0.0, 0.0, 1e-6], FuncB=kick_list, MaxOrder=2, Periodic=True, mode=ACMode.ARBITRARY)
In ipython, python interactive shell or with python script.py, if I run print(var) I get the correct output.

In ipython or an interactive python shell:

var

returns an error saying AmplitudeA or AmplitudeB must be defined. It seems like at some point when generating the string to print in the interactive shells it calls the init again which creates the error.

Full test script is pasted below.


import at
import numpy as np
from at import ACMode

ring = at.load_mat('/machfs/carver/Repo/EBSlattices/AT/S28F.mat', mat_key='LOW_EMIT_RING_INJ')

ring.disable_6d()
qx,qy = ring.get_tune()


Nturns = 1000

kick_list = np.sin(2*np.pi*np.arange(Nturns)*(qx))

var = at.VariableMultipole('h_acd', AmplitudeB = [0.0, 0.0, 1e-6], FuncB=kick_list, MaxOrder=2, Periodic=True, mode=ACMode.ARBITRARY)
var

@lcarver lcarver self-assigned this Apr 16, 2024
@lcarver
Copy link
Contributor Author

lcarver commented Apr 16, 2024

I have a fix incoming as part of a larger improvement to VariableMultipole.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant