ocelot.gui.genesis4_plot

user interface for viewing genesis simulation results

Module Contents

Functions

plot_gen4_out_all(handle=None, savefig='png', showfig=False, choice=(1, 1, 1, 1, 10, 1, 0, 0, 0, 0, 0, 10, 1), vartype_dfl=complex128, *args, **kwargs)

plot_gen4_out_z(out, z=np.inf, params=['rad_power+el_current', 'el_energy+el_espread+el_bunching', 'rad_spec'], figsize=3, x_units='um', y_units='ev', legend=False, fig_name=None, savefig=False, showfig=True, debug=1, *args, **kwargs)

radiation parameters at distance z

subfig_z_power_curr(ax_curr, out, zi=None, x_units='um', legend=False)

subfig_z_energy_espread_bunching(ax_energy, out, zi=None, x_units='um', legend=False)

subfig_z_energy_espread(ax_energy, out, zi=None, x_units='um', legend=False)

subfig_z_phase(ax_phase, out, zi=None, x_units='um', legend=False, rewrap=False)

subfig_z_spec(ax_spectrum, out, zi=None, loc='near', y_units='ev', estimate_ph_sp_dens=True, legend=False)

plot_gen4_out_e(out, legend=False, figsize=3, fig_name='Electrons', savefig=False, showfig=True, debug=1)

plot_gen4_out_ph(out, legend=False, figsize=3, fig_name='Radiation', savefig=False, showfig=True, debug=1)

plot_gen4_out_evo(out, params=['und_quad', 'el_size', 'el_pos', 'el_energy', 'el_bunching', 'rad_pow_en_log', 'rad_pow_en_lin', 'rad_spec_log', 'rad_size', 'rad_spec_evo_n', 'rad_pow_evo_n'], figsize=3, legend=False, fig_name=None, savefig=False, showfig=True, debug=1)

plots evolution of given parameters from genesis output with undulator length

subfig_evo_und_quad(ax_und, out, legend)

subfig_evo_und(ax_und, out, legend)

subfig_evo_el_size(ax_size_tsize, out, legend, which='both')

subfig_evo_el_pos(ax_size_tpos, out, legend, which='both')

subfig_evo_el_energy(ax_energy, out, legend)

subfig_evo_el_bunching(ax_bunching, out, legend)

subfig_evo_rad_pow_en(ax_rad_pow, out, legend, log=1)

subfig_evo_rad_pow(ax_rad_pow, out, legend, log=1)

subfig_evo_rad_spec(ax_spectrum, out, legend, log=1)

subfig_rad_size(ax_size_t, out, legend)

subfig_evo_rad_pow_sz(ax_power_evo, out, legend, norm=1, **kwargs)

subfig_evo_rad_spec_sz(ax_spectrum_evo, out, legend, norm=1)

ocelot.gui.genesis4_plot._logger
ocelot.gui.genesis4_plot.plot_gen4_out_all(handle=None, savefig='png', showfig=False, choice=1, 1, 1, 1, 10, 1, 0, 0, 0, 0, 0, 10, 1, vartype_dfl=complex128, *args, **kwargs)
ocelot.gui.genesis4_plot.plot_gen4_out_z(out, z=np.inf, params=['rad_power+el_current', 'el_energy+el_espread+el_bunching', 'rad_spec'], figsize=3, x_units='um', y_units='ev', legend=False, fig_name=None, savefig=False, showfig=True, debug=1, *args, **kwargs)

radiation parameters at distance z out/out = GenesisOutput() object z distance along undulator [m] params = parameters of interest:

‘rad_power+el_current’ - radiation power and electron beam current ‘el_energy+el_espread+el_bunching’ - electron beam energy +/- spread and bunching ‘rad_phase’ - phase of radiation ‘rad_spec’ - on-axis spectrum

figsize - np.size of figure (unit-less) x_units - units of time domain (‘um’ of ‘fs’) y_units - units of frequency domain (‘nm’ of ‘ev’) legend - plot legend - tbd fig_name - override figure name savefig - save figure showfig - show figure

ocelot.gui.genesis4_plot.subfig_z_power_curr(ax_curr, out, zi=None, x_units='um', legend=False)
ocelot.gui.genesis4_plot.subfig_z_energy_espread_bunching(ax_energy, out, zi=None, x_units='um', legend=False)
ocelot.gui.genesis4_plot.subfig_z_energy_espread(ax_energy, out, zi=None, x_units='um', legend=False)
ocelot.gui.genesis4_plot.subfig_z_phase(ax_phase, out, zi=None, x_units='um', legend=False, rewrap=False)
ocelot.gui.genesis4_plot.subfig_z_spec(ax_spectrum, out, zi=None, loc='near', y_units='ev', estimate_ph_sp_dens=True, legend=False)
ocelot.gui.genesis4_plot.plot_gen4_out_e(out, legend=False, figsize=3, fig_name='Electrons', savefig=False, showfig=True, debug=1)
ocelot.gui.genesis4_plot.plot_gen4_out_ph(out, legend=False, figsize=3, fig_name='Radiation', savefig=False, showfig=True, debug=1)
ocelot.gui.genesis4_plot.plot_gen4_out_evo(out, params=['und_quad', 'el_size', 'el_pos', 'el_energy', 'el_bunching', 'rad_pow_en_log', 'rad_pow_en_lin', 'rad_spec_log', 'rad_size', 'rad_spec_evo_n', 'rad_pow_evo_n'], figsize=3, legend=False, fig_name=None, savefig=False, showfig=True, debug=1)

plots evolution of given parameters from genesis output with undulator length

ocelot.gui.genesis4_plot.subfig_evo_und_quad(ax_und, out, legend)
ocelot.gui.genesis4_plot.subfig_evo_und(ax_und, out, legend)
ocelot.gui.genesis4_plot.subfig_evo_el_size(ax_size_tsize, out, legend, which='both')
ocelot.gui.genesis4_plot.subfig_evo_el_pos(ax_size_tpos, out, legend, which='both')
ocelot.gui.genesis4_plot.subfig_evo_el_energy(ax_energy, out, legend)
ocelot.gui.genesis4_plot.subfig_evo_el_bunching(ax_bunching, out, legend)
ocelot.gui.genesis4_plot.subfig_evo_rad_pow_en(ax_rad_pow, out, legend, log=1)
ocelot.gui.genesis4_plot.subfig_evo_rad_pow(ax_rad_pow, out, legend, log=1)
ocelot.gui.genesis4_plot.subfig_evo_rad_spec(ax_spectrum, out, legend, log=1)
ocelot.gui.genesis4_plot.subfig_rad_size(ax_size_t, out, legend)
ocelot.gui.genesis4_plot.subfig_evo_rad_pow_sz(ax_power_evo, out, legend, norm=1, **kwargs)
ocelot.gui.genesis4_plot.subfig_evo_rad_spec_sz(ax_spectrum_evo, out, legend, norm=1)