Conversion to boosted-frame¶
- class fbpic.lpa_utils.boosted_frame.BoostConverter(gamma0)[source]¶
Initialize the object by calculating the velocity of the boosted frame.
- Parameters:
gamma0 (float) – Lorentz factor of the boosted frame
- boost_particle_arrays(x, y, z, ux, uy, uz, inv_gamma)[source]¶
Transforms particles to the boosted frame and propagates them to a fixed time t_boost = 0. without taking any electromagnetic effects into account. (This is useful for the initialization of a bunch distribution in the boosted frame.)
- Parameters:
x (1darray of float (in meter)) – The position of the particles in the lab frame (One element per macroparticle)
y (1darray of float (in meter)) – The position of the particles in the lab frame (One element per macroparticle)
z (1darray of float (in meter)) – The position of the particles in the lab frame (One element per macroparticle)
ux (1darray of floats (dimensionless)) – The momenta of the particles (One element per macroparticle)
uy (1darray of floats (dimensionless)) – The momenta of the particles (One element per macroparticle)
uz (1darray of floats (dimensionless)) – The momenta of the particles (One element per macroparticle)
inv_gamma (1darray of floats (dimensionless)) – The inverse of the Lorentz factor (One element per macroparticle)
- Return type:
The same arrays (in the same order) but in the boosted frame
- copropag_density(lab_frame_vars, beta_object=1.0)[source]¶
Converts a list of densities that correspond to copropagating objects (e.g. an electron bunch) from the lab frame to the boosted frame, i.e: n’ = n * [ gamma0*(1 - beta_object*beta0) ]
- Parameters:
lab_frame_vars (list of floats) – A list containing several densities to be converted
beta_object (float, optional) – The normalized velocity of the object whose density is being converted
- Return type:
A list with the same number of elements, with the converted quantities
- copropag_length(lab_frame_vars, beta_object=1.0)[source]¶
Converts a list of lengths that correspond to copropagating objects (e.g. the laser) from the lab frame to the boosted frame, i.e: L’ = L / [ gamma0*(1 - beta_object*beta0) ]
- Parameters:
lab_frame_vars (list of floats) – A list containing several length to be converted
beta_object (float, optional) – The normalized velocity of the object whose length is being converted
- Return type:
A list with the same number of elements, with the converted quantities
- gamma(lab_frame_vars)[source]¶
Converts a list of Lorentz factors from the lab frame to the boosted frame: gamma’ = gamma0 * ( gamma - beta0 * sqrt( gamma**2 - 1 ) )
Warning: The above formula assumes that the corresponding particle has no transverse motion at all.
- Parameters:
lab_frame_vars (list of floats) – A list containing several Lorentz factors to be converted
- Return type:
A list with the same number of elements, with the converted quantities
- interaction_time(L_interact, l_window, v_window)[source]¶
Calculates the interaction time in the boosted frame: (Time it takes for the moving window to slide once across the total interaction length, i.e. the plasma)
L_interact’ = L_interact / gamma0 l_window’ = l_window * gamma0 * ( 1 + beta0 ) v_window’ = ( v_window - c * beta0 )/( 1 - beta0*v_window/c ) v_plasma’ = -beta0 * c
T_interact’ = L_interact’ + l_window’ / ( v_window’ - v_plasma’ )
- Parameters:
L_interact (float (in meter)) – The total interaction length (typically the length of the plasma) in the lab frame.
l_window (float (in meter)) – The length of the moving window in the lab frame.
v_window (float (in meter/second)) – The velocity of the moving window in the lab frame.
- Returns:
T_interact – The interaction time in the boosted frame.
- Return type:
float (in seconds)
- longitudinal_momentum(lab_frame_vars)[source]¶
Converts a list of momenta from the lab frame to the boosted frame: u_z’ = gamma0 * ( u_z - sqrt(1 + u_z**2) * beta0 )
Warning: The above formula assumes that the corresponding particle has no transverse motion at all.
- Parameters:
lab_frame_vars (list of floats) – A list containing several momenta to be converted
- Return type:
A list with the same number of elements, with the converted quantities
- static_density(lab_frame_vars)[source]¶
Converts a list of densities that correspond to static objects (e.g. the plasma) from the lab frame to the boosted frame, i.e: n’ = n * gamma0
- Parameters:
lab_frame_vars (list of floats) – A list containing several length to be converted
- Return type:
A list with the same number of elements, with the converted quantities
- static_length(lab_frame_vars)[source]¶
Converts a list of lengths that correspond to static objects (e.g. the plasma) from the lab frame to the boosted frame, i.e: L’ = L / gamma0
- Parameters:
lab_frame_vars (list of floats) – A list containing several length to be converted
- Return type:
A list with same number of elements, with the converted quantities
- velocity(lab_frame_vars)[source]¶
Converts a list of velocities from the lab frame to the boosted frame: v’ = ( v - c * beta0 )/( 1 - beta0*v/c )
- Parameters:
lab_frame_vars (list of floats) – A list containing several velocities to be converted
- Return type:
A list with the same number of elements, with the converted quantities
- wavenumber(lab_frame_vars)[source]¶
Converts a list of wavenumbers from the lab frame to the boosted frame: k’ = k / ( gamma0 ( 1 + beta0 ) )
- Parameters:
lab_frame_vars (list of floats) – A list containing several wavenumbers to be converted
- Return type:
A list with the same number of elements, with the converted quantities