N_slots_bsp = 5
b_per_train = 72
movie_range = (0, 475)
n_traces = 25

loss_lim = 0.1

folder_movie = './movieslices_' + tag
try:
    os.mkdir(folder_movie)
except:
    pass

ob_slice = mfm.object_with_arrays_and_scalar_from_h5(tag +
                                                     '_matrices_slices.h5')
ob_bunch = mfm.myloadmat_to_obj(tag + '_matrices.mat')

x_slice = ob_slice.mean_x
y_slice = ob_slice.mean_y
z_slice = ob_slice.mean_z
n_slice = ob_slice.n_macroparticles_per_slice

x_bunch = ob_bunch.mean_x
y_bunch = ob_bunch.mean_y
n_bunch = ob_bunch.macroparticlenumber

n_turns_tot = x_slice.shape[1]

mask_bunch = n_bunch[1, :] > 0

bslots = np.where(mask_bunch)[0] / N_slots_bsp
import PyPARIS.myfilemanager as mfm

import PyECLOUD.mystyle as ms

tag = 'noecloud'
i_bunch = 0

flag_check_damp_time = True
tau_damp_x = 20.
tau_damp_y = 200000.

flag_check_Qs = True
Q_s = 5.664e-03

ob = mfm.myloadmat_to_obj(tag + '_matrices.mat')

plt.close('all')

# Plot transverse positions
fig1 = plt.figure(1, figsize=(8, 6 * 1.2))
fig1.set_facecolor('w')
ms.mystyle_arial(fontsz=16)

axx = fig1.add_subplot(2, 1, 1)
axy = fig1.add_subplot(2, 1, 2, sharex=axx)

axx.plot(ob.mean_x[:, i_bunch])
axy.plot(ob.mean_y[:, i_bunch])

if flag_check_damp_time:
Esempio n. 3
0
import PyPARIS.myfilemanager as mfm

import mystyle as ms

tag = 'noecloud'
i_bunch = 3

flag_check_damp_time = True
tau_damp_x = 200.
tau_damp_y = 100.

flag_check_Qs = True
Q_s = 5.664e-03

ob = mfm.myloadmat_to_obj(tag+'_matrices.mat')

plt.close('all')

# Plot transverse positions
fig1 = plt.figure(1, figsize=(8,6*1.2))
fig1.set_facecolor('w')
ms.mystyle_arial(fontsz=16)

axx = fig1.add_subplot(2,1,1)
axy = fig1.add_subplot(2,1,2, sharex=axx)

axx.plot(ob.mean_x[:, i_bunch])
axy.plot(ob.mean_y[:, i_bunch])

if flag_check_damp_time: