utils Package¶
bmath
Module¶
BLonD math and physics core functions
@author Stefan Hegglin, Konstantinos Iliakis @date 20.10.2017
-
blond.utils.bmath.
mpiMode
()¶
-
blond.utils.bmath.
update_active_dict
(new_dict)¶ Update the currently active dictionary. Removes the keys of the currently active dictionary from globals() and spills the keys from new_dict to globals() :param new_dict A dictionary which contents will be spilled to globals():
-
blond.utils.bmath.
use_fftw
()¶ Replace the existing rfft and irfft implementations with the ones coming from butils_wrap.
-
blond.utils.bmath.
use_mpi
()¶ Replace some bm functions with MPI implementations
bphysics_wrap
Module¶
BLonD physics wrapper functions
@author Konstantinos Iliakis @date 20.10.2017
-
blond.utils.bphysics_wrap.
beam_phase
(bin_centers, profile, alpha, omegarf, phirf, bin_size)¶
-
blond.utils.bphysics_wrap.
drift
(dt, dE, solver, t_rev, length_ratio, alpha_order, eta_0, eta_1, eta_2, alpha_0, alpha_1, alpha_2, beta, energy)¶
-
blond.utils.bphysics_wrap.
fast_resonator
(R_S, Q, frequency_array, frequency_R, impedance=None)¶
-
blond.utils.bphysics_wrap.
kick
(dt, dE, voltage, omega_rf, phi_rf, charge, n_rf, acceleration_kick)¶
-
blond.utils.bphysics_wrap.
linear_interp_kick
(dt, dE, voltage, bin_centers, charge, acceleration_kick)¶
-
blond.utils.bphysics_wrap.
linear_interp_kick_n_drift
(dt, dE, total_voltage, bin_centers, charge, acc_kick, solver, t_rev, length_ratio, alpha_order, eta_0, eta_1, eta_2, beta, energy)¶
-
blond.utils.bphysics_wrap.
linear_interp_time_translation
(ring, dt, dE, turn)¶
-
blond.utils.bphysics_wrap.
music_track
(dt, dE, induced_voltage, array_parameters, alpha, omega_bar, const, coeff1, coeff2, coeff3, coeff4)¶
-
blond.utils.bphysics_wrap.
music_track_multiturn
(dt, dE, induced_voltage, array_parameters, alpha, omega_bar, const, coeff1, coeff2, coeff3, coeff4)¶
-
blond.utils.bphysics_wrap.
rf_volt_comp
(voltages, omega_rf, phi_rf, bin_centers)¶
-
blond.utils.bphysics_wrap.
set_random_seed
(seed)¶
-
blond.utils.bphysics_wrap.
slice
(beam_dt, profile, cut_left, cut_right)¶
-
blond.utils.bphysics_wrap.
slice_smooth
(beam_dt, profile, cut_left, cut_right)¶
-
blond.utils.bphysics_wrap.
synchrotron_radiation
(dE, U0, n_kicks, tau_z)¶
-
blond.utils.bphysics_wrap.
synchrotron_radiation_full
(dE, U0, n_kicks, tau_z, sigma_dE, energy, random_array)¶
butils_wrap
Module¶
BLonD math wrapper functions
@author Konstantinos Iliakis @date 20.10.2017
-
blond.utils.butils_wrap.
add
(a, b, result=None, inplace=False)¶
-
blond.utils.butils_wrap.
arange
(start, stop, step, dtype=<class 'float'>, result=None)¶
-
blond.utils.butils_wrap.
argmax
(x)¶
-
blond.utils.butils_wrap.
argmin
(x)¶
-
class
blond.utils.butils_wrap.
c_complex128
(pycomplex)¶ Bases:
_ctypes.Structure
-
imag
¶ Structure/Union member
-
real
¶ Structure/Union member
-
to_complex
()¶
-
-
class
blond.utils.butils_wrap.
c_complex64
(pycomplex)¶ Bases:
_ctypes.Structure
-
imag
¶ Structure/Union member
-
real
¶ Structure/Union member
-
to_complex
()¶
-
-
blond.utils.butils_wrap.
convolve
(signal, kernel, mode='full', result=None)¶
-
blond.utils.butils_wrap.
cos
(x, result=None)¶
-
blond.utils.butils_wrap.
cumtrapz
(y, x=None, dx=1.0, initial=None, result=None)¶
-
blond.utils.butils_wrap.
exp
(x, result=None)¶
-
blond.utils.butils_wrap.
interp
(x, xp, yp, left=None, right=None, result=None)¶
-
blond.utils.butils_wrap.
interp_const_space
(x, xp, yp, left=None, right=None, result=None)¶
-
blond.utils.butils_wrap.
irfft
(a, n=0, result=None)¶
-
blond.utils.butils_wrap.
irfft_packed
(signal, fftsize=0, result=None)¶
-
blond.utils.butils_wrap.
linspace
(start, stop, num=50, retstep=False, result=None)¶
-
blond.utils.butils_wrap.
mean
(x)¶
-
blond.utils.butils_wrap.
mul
(a, b, result=None)¶
-
blond.utils.butils_wrap.
rfft
(a, n=0, result=None)¶
-
blond.utils.butils_wrap.
rfftfreq
(n, d=1.0, result=None)¶
-
blond.utils.butils_wrap.
sin
(x, result=None)¶
-
blond.utils.butils_wrap.
sort
(x, reverse=False)¶
-
blond.utils.butils_wrap.
std
(x)¶
-
blond.utils.butils_wrap.
sum
(x)¶
-
blond.utils.butils_wrap.
trapz
(y, x=None, dx=1.0)¶
-
blond.utils.butils_wrap.
where
(x, more_than=None, less_than=None, result=None)¶