-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add get freqmap #756
base: master
Are you sure you want to change the base?
Add get freqmap #756
Conversation
Dear @TeresiaOlsson , here is a script you could use to start the test on the function Best regards, '''
This file is used to test the new function get_freqmap
oblanco 2024apr16
'''
import at
import numpy
from matplotlib import pyplot as plt
print(f'{at.__version__}=')
ring = at.load_mat('testring.mat')
# ring.disable_6d()
print(f'{ring.get_tune()=}')
fmaout = at.get_freqmap(ring,
['x','y'],
numpy.array([200,200]),
numpy.array([10e-3,10e-3]),
bounds=[[-1,1],[0,1]],
verbose=True,
)
fmadata = fmaout[0][0]
print('Plot')
# plot diffusion map
fig = plt.figure()
sc = plt.scatter(1e3*fmadata[:,0],1e3*fmadata[:,1],c=fmadata[:,6],s=1)
plt.grid()
plt.xlabel(r'x (mm)')
plt.ylabel(r'y (mm)')
plt.xlim(-10,10)
plt.ylim(-5,5)
clb = plt.colorbar(sc)
clb.ax.set_title(r'$\log_{10} \sqrt{(\Delta\nu_x^2 + \Delta\nu_y^2)/turn}$')
plt.savefig('diffussionmap.pdf')
# plot frequency map
fig = plt.figure()
sc = plt.scatter(fmadata[:,2],fmadata[:,3],c=fmadata[:,6],s=1)
plt.grid()
plt.xlim(0,0.5)
plt.ylim(0,0.5)
plt.xlabel(r'$\nu_x$')
plt.ylabel(r'$\nu_y$')
clb = plt.colorbar(sc)
clb.ax.set_title(r'$\log_{10} \sqrt{(\Delta\nu_x^2 + \Delta\nu_y^2)/turn}$')
plt.savefig('fmap.pdf') |
Dear @TeresiaOlsson , Best regards, |
Dear @swhite2401 and @lfarv , |
Dear all,
this is a Work-In-Progress branch open to address the limitations on the frequency map analysis found by @TeresiaOlsson and mentioned here #755.
No need to review yet.