Exemple #1
0
    timestamp,
    struct_lengths,
    n_particles,
    n_emittances,
    screen_bins,
    screen_cutoff,
    smoothen,
    profile_cutoff,
    len_profile,
    quad_wake=quad_wake,
    bp_smoothen=bp_smoothen,
    compensate_negative_screen=compensate_negative_screen)

streaker_offset = 0.00037758839957521145

meas_screen = misc.image_to_screen(image_off, x_axis, True, x_offset=0)
meas_screen.cutoff2(5e-2)
meas_screen.crop()
meas_screen.reshape(len_profile)

#ms.figure('Obtain x-t')
#subplot = ms.subplot_factory(2,2)
#sp_ctr = 1
#
#sp_screen = subplot(sp_ctr, title='Screen', xlabel='x axis', ylabel='Intensity (arb. units)')
#sp_ctr += 1
#
#
#sp_profile = subplot(sp_ctr, title='Profile', xlabel='t [fs]', ylabel='Current [kA]')
#sp_ctr += 1
#
Exemple #2
0
new_img = new_img / new_img.sum() * image2.sum()

sp = subplot(sp_ctr, title='T space', xlabel='t [fs]', ylabel='y [mm]')
sp_ctr += 1
plot_img_and_proj(sp, new_img, new_t_axis, y_axis, x_factor=1e15)

proj = final_profile.current
proj_plot = (y_axis.min() +
             (y_axis.max() - y_axis.min()) * proj / proj.max() * 0.3) * 1e3
sp.plot(new_t_axis * 1e15, proj_plot, color='orange')

sp_screen = subplot(sp_ctr, title='Screen')
sp_ctr += 1

subtract_min = False
meas_screen = misc.image_to_screen(image, x_axis, subtract_min, x_offset=0)
meas_screen_cut = misc.image_to_screen(image_cut,
                                       x_axis_cut,
                                       subtract_min,
                                       x_offset=0)
meas_screen2 = misc.image_to_screen(image2, x_axis2, subtract_min, x_offset=0)

wake_x = xx
wake_time = tt

if wake_x[1] < wake_x[0]:
    wake_x = wake_x[::-1]
    wake_time = wake_time[::-1]

n_particles = int(100e3)
charge = 200e-12