This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ekin(p_r, m_r = 1, to_MeV = True): | |
""" compute relativistic kinetic energy from Smilei momentum and mass | |
Parameters | |
---------- | |
p_r : float | |
particle momentum in reduced units. | |
m_r : float, optional | |
particle mass in reduced units, default value is hydrogen mass. | |
to_MeV : bool, optional | |
computes energy in MeV if true, otherwise in E_r (reduced energy units). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gamma(p_r, m_r = 1): | |
""" compute Lorentz factor from Smilei momentum and mass | |
Parameters | |
---------- | |
p_r : float | |
particle momentum in reduced units. | |
m_r : float, optional | |
particle mass in reduced units, default value is hydrogen mass. | |
Returns | |
------- |