Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _boilerPlate(T: u.K, species: (particles.Particle, particles.Particle), V):
"""
Some boiler plate code for checking if inputs to functions in
collisions.py are good. Also obtains reduced in mass in a
2 particle collision system along with thermal velocity.
"""
masses = [p.mass for p in species]
charges = [np.abs(p.charge) for p in species]
# obtaining reduced mass of 2 particle collision system
reduced_mass = particles.reduced_mass(*species)
# getting thermal velocity of system if no velocity is given
V = _replaceNanVwithThermalV(V, T, reduced_mass)
_check_relativistic(V, "V")
return T, masses, charges, reduced_mass, V