Repository: PlasmaPy/PlasmaPy
Pull request #140 (2017-10-03 16:49:21)

Consolidate separate functions for ions and electrons in plasma parameter calculations
Closing #106

The checklist of things to do are:

- [X]  Merge electron_thermal_speed and ion_thermal_speed into thermal_speed
- [x]  Merge electron_gyrofrequency and ion_gyrofrequency into gyrofrequency
- [x]  Merge electron_gyroradius and ion_gyroradius into gyroradius
- [x]  Merge electron_plasma_frequency and ion_plasma_frequency into plasma_frequency
- [x]  Merge electron_inertial_length and ion_inertial_length into inertial_length
- [x] add a parameter method to thermal_speed 
I will be updating as I progress with the tasklist. 


Patch:
diff --git a/plasmapy/physics/__init__.py b/plasmapy/physics/__init__.py
index bef8fb27..e851a391 100644
--- a/plasmapy/physics/__init__.py
+++ b/plasmapy/physics/__init__.py
@@ -3,18 +3,13 @@
 
 from .parameters import (Alfven_speed,
                          ion_sound_speed,
-                         electron_thermal_speed,
-                         ion_thermal_speed,
-                         electron_gyrofrequency,
-                         ion_gyrofrequency,
-                         electron_gyroradius,
-                         ion_gyroradius,
-                         electron_plasma_frequency,
-                         ion_plasma_frequency,
+                         thermal_speed,
+                         gyrofrequency,
+                         gyroradius,
+                         plasma_frequency,
                          Debye_length,
                          Debye_number,
-                         ion_inertial_length,
-                         electron_inertial_length,
+                         inertial_length,
                          magnetic_pressure,
                          magnetic_energy_density,
                          upper_hybrid_frequency,
diff --git a/plasmapy/physics/parameters.py b/plasmapy/physics/parameters.py
index 847d663a..d7ade07d 100644
--- a/plasmapy/physics/parameters.py
+++ b/plasmapy/physics/parameters.py
@@ -313,113 +313,48 @@ def ion_sound_speed(*ignore, T_e=0*units.K, T_i=0*units.K,
 
 @check_relativistic
 @check_quantity({
-    'T_e': {'units': units.K, 'can_be_negative': False}
+    'T': {'units': units.K, 'can_be_negative': False}
 })
-def electron_thermal_speed(T_e):
-    r"""Returns the most probable speed for an electron within a
-    Maxwellian distribution.
-
-    Parameters
-    ----------
-    T_e : Quantity
-        The electron temperature in either kelvin or energy per particle
-
-    Returns
-    -------
-    V_Te : Quantity
-        Electron thermal speed
-
-    Raises
-    ------
-    TypeError
-        The electron temperature is not a Quantity
-
-    UnitConversionError
-        If the electron temperature is not in units of temperature or
-        energy per particle
-
-    ValueError
-        The electron temperature is invalid
-
-    UserWarning
-        If the electron thermal speed exceeds 10% of the speed of
-        light, or if units are not provided and SI units are assumed.
-
-    Notes
-    -----
-    The electron thermal speed is given by:
-
-    .. math::
-    V_{th,e} = \sqrt{\frac{2 k_B T_e}{m_e}}
-
-    This function yields the most probable speed within a distribution
-    function.  However, the definition of thermal velocity varies by
-    the square root of two depending on whether or not this velocity
-    absorbs that factor in the expression for a Maxwellian
-    distribution.  In particular, the expression given in the NRL
-    Plasma Formulary [1] is a square root of two smaller than the
-    result from this function.
-
-    Examples
-    --------
-    >>> from astropy import units as u
-    >>> electron_thermal_speed(5*u.eV)
-    <Quantity 1326205.1212395933 m / s>
-    >>> electron_thermal_speed(1e6*u.K)
-    <Quantity 5505693.988425379 m / s>
-
-    """
-
-    T_e = T_e.to(units.K, equivalencies=units.temperature_energy())
-    V_Te = (np.sqrt(2*k_B*T_e/m_e)).to(units.m/units.s)
-
-    return V_Te
-
-
-@check_relativistic
-@check_quantity({
-    'T_i': {'units': units.K, 'can_be_negative': False}
-})
-def ion_thermal_speed(T_i, ion='p'):
-    r"""Returns the most probable speed for an ion within a Maxwellian
+def thermal_speed(T, particle="e", method="most_probable"):
+    r"""Returns the most probable speed for an particle within a Maxwellian
     distribution.
 
     Parameters
     ----------
-    T_i : Quantity
-        The ion temperature in either kelvin or energy per particle
+    T : Quantity
+        The particle temperature in either kelvin or energy per particle
 
-    ion : string, optional
-        Representation of the ion species (e.g., 'p' for protons, 'D+'
+    particle : string, optional
+        Representation of the particle species (e.g., 'p' for protons, 'D+'
         for deuterium, or 'He-4 +1' for singly ionized helium-4),
-        which defaults to protons.  If no charge state information is
-        provided, then the ions are assumed to be singly charged.
+        which defaults to electrons.  If no charge state information is
+        provided, then the particles are assumed to be singly charged.
 
     Returns
     -------
-    V_Ti : Quantity
-        Ion thermal speed
+    V : Quantity
+        particle thermal speed
 
     Raises
     ------
     TypeError
-        The ion temperature is not a Quantity
+        The particle temperature is not a Quantity
 
     UnitConversionError
-        If the ion temperature is not in units of temperature or
+        If the particle temperature is not in units of temperature or
         energy per particle
 
     ValueError
-        The ion temperature is invalid or ion cannot be used to
-        identify an isotope or ion
+        The particle temperature is invalid or particle cannot be used to
+        identify an isotope or particle
 
     UserWarning
-        If the ion thermal speed exceeds 10% of the speed of light, or
+        If the particle thermal speed exceeds 10% of the speed of light, or
         if units are not provided and SI units are assumed.
 
     Notes
     -----
-    The electron thermal speed is given by:
+    The particle thermal speed is given by:
 
     .. math::
     V_{th,i} = \sqrt{\frac{2 k_B T_i}{m_i}}
@@ -435,136 +370,88 @@ def ion_thermal_speed(T_i, ion='p'):
     Examples
     --------
     >>> from astropy import units as u
-    >>> ion_thermal_speed(5*u.eV)
+    >>> thermal_speed(5*u.eV, 'p')
     <Quantity 30949.690182856546 m / s>
-    >>> ion_thermal_speed(1e6*u.K, ion='p')
+    >>> thermal_speed(1e6*u.K, particle='p')
     <Quantity 128486.55193256242 m / s>
+    >>> thermal_speed(5*u.eV)
+    <Quantity 1326205.1212395933 m / s>
+    >>> thermal_speed(1e6*u.K)
+    <Quantity 5505693.988425379 m / s>
+    >>> thermal_speed(1e6*u.K, method="rms")
+    <Quantity 6743070.475775486 m / s>
+    >>> thermal_speed(1e6*u.K, method="mean_magnitude")
+    <Quantity 19517177.023383822 m / s>
 
     """
 
-    T_i = T_i.to(units.K, equivalencies=units.temperature_energy())
+    T = T.to(units.K, equivalencies=units.temperature_energy())
 
     try:
-        m_i = ion_mass(ion)
+        m = ion_mass(particle)
     except Exception:
-        raise ValueError("Unable to find ion mass in ion_thermal_speed")
+        raise ValueError("Unable to find {} mass in thermal_speed"
+                         .format(particle))
 
-    V_Ti = (np.sqrt(2*k_B*T_i/m_i)).to(units.m/units.s)
+    # different methods, as per https://en.wikipedia.org/wiki/Thermal_velocity
+    if method == "most_probable":
+        V = (np.sqrt(2*k_B*T/m)).to(units.m/units.s)
+    elif method == "rms":
+        V = (np.sqrt(3*k_B*T/m)).to(units.m/units.s)
+    elif method == "mean_magnitude":
+        V = (np.sqrt(8*k_B*T/(m/np.pi))).to(units.m/units.s)
+    else:
+        raise(ValueError("Method {} not supported in thermal_speed"
+                         .format(method)))
 
-    return V_Ti
+    return V
 
 
 @check_quantity({
     'B': {'units': units.T}
 })
-def electron_gyrofrequency(B):
-    r"""Calculate the electron gyrofrequency in units of radians per second.
+def gyrofrequency(B, particle='e'):
+    r"""Calculate the particle gyrofrequency in units of radians per second.
 
     Parameters
     ----------
     B: Quantity
         The magnetic field magnitude in units convertible to tesla.
 
-    Returns
-    -------
-    omega_ce: Quantity
-        Electron gyrofrequency in radians per second.
-
-    Raises
-    ------
-    TypeError
-        The magnetic field is not a Quantity
-
-    UnitConversionError
-        If the magnetic field is in incorrect units
-
-    ValueError
-        If the magnetic field has an invalid value
-
-    UserWarning
-        If units are not provided and SI units are assumed
-
-    Notes
-    -----
-    The electron gyrofrequency is the angular frequency of electrons
-    gyration around magnetic field lines and is given by:
-
-    .. math::
-    omega_{ce} = \frac{e B}{m_e}
-
-    The electron gyrofrequency is also known as the electron cyclotron
-    frequency or the electron Larmor frequency.
-
-    The recommended way to convert from angular frequency to frequency
-    is to use an equivalency between cycles per second and Hertz, as
-    Astropy's dimensionles_angles() equivalency does not account for
-    the factor of 2*pi needed during this conversion.  The
-    dimensionless_angles() equivalency is appropriate when dividing a
-    velocity by an angular frequency to get a length scale.
-
-    Examples
-    --------
-    >>> from astropy import units as u
-    >>> from numpy import pi
-    >>> omega_ce = electron_gyrofrequency(0.1*u.T)
-    >>> print(omega_ce)
-    17588200236.02124 rad / s
-    >>> f_ce = omega_ce.to(u.Hz, equivalencies=[(u.cy/u.s, u.Hz)])
-    >>> print(f_ce)
-    2799249007.6528206 Hz
-
-    """
-
-    omega_ce = units.rad*(e*np.abs(B)/m_e).to(1/units.s)
-
-    return omega_ce
-
-
-@check_quantity({
-    'B': {'units': units.T}
-})
-def ion_gyrofrequency(B, ion='p'):
-    r"""Calculate the ion gyrofrequency in units of radians per second.
-
-    Parameters
-    ----------
-    B: Quantity
-        The magnetic field magnitude in units convertible to tesla.
-
-    ion : string, optional
-        Representation of the ion species (e.g., 'p' for protons, 'D+'
+    particle : string, optional
+        Representation of the particle species (e.g., 'p' for protons, 'D+'
         for deuterium, or 'He-4 +1' for singly ionized helium-4),
-        which defaults to protons.  If no charge state information is
-        provided, then the ions are assumed to be singly charged.
+        which defaults to electrons.  If no charge state information is
+        provided, then the particles are assumed to be singly charged.
 
     Returns
     -------
     omega_ci: Quantity
-        The ion gyrofrequency in units of radians per second
+        The particle gyrofrequency in units of radians per second
 
     Raises
     ------
     TypeError
-        If the magnetic field is not a Quantity or ion is not of an
+        If the magnetic field is not a Quantity or particle is not of an
         appropriate type
 
     ValueError
-        If the magnetic field contains invalid values or ion cannot be
-        used to identify an ion or isotope
+        If the magnetic field contains invalid values or particle cannot be
+        used to identify an particle or isotope
 
     UserWarning
         If units are not provided and SI units are assumed
 
     Notes
     -----
-    The ion gyrofrequency is the angular frequency of ion gyration
+    The particle gyrofrequency is the angular frequency of particle gyration
     around magnetic field lines and is given by:
 
     .. math::
     omega_{ci} = \frac{Z e B}{m_i}
 
-    The ion gyrofrequency is also known as the ion cyclotron frequency
-    or the ion Larmor frequency.
+    The particle gyrofrequency is also known as the particle cyclotron
+    frequency or the particle Larmor frequency.
 
     The recommended way to convert from angular frequency to frequency
     is to use an equivalency between cycles per second and Hertz, as
@@ -575,147 +462,40 @@ def ion_gyrofrequency(B, ion='p'):
 
     Examples
     --------
+    >>> from numpy import pi
     >>> from astropy import units as u
-    >>> ion_gyrofrequency(0.01*u.T)
+    >>> gyrofrequency(0.01*u.T, 'p')
     <Quantity 957883.3224148067 rad / s>
-    >>> ion_gyrofrequency(0.01*u.T, 'p')
+    >>> gyrofrequency(0.01*u.T, 'p')
     <Quantity 957883.3224148067 rad / s>
-    >>> ion_gyrofrequency(0.01*u.T, ion='T')
+    >>> gyrofrequency(0.01*u.T, particle='T')
     <Quantity 319964.54975910933 rad / s>
+    >>> omega_ce = gyrofrequency(0.1*u.T)
+    >>> print(omega_ce)
+    17588200236.02124 rad / s
+    >>> f_ce = omega_ce.to(u.Hz, equivalencies=[(u.cy/u.s, u.Hz)])
+    >>> print(f_ce)
+    2799249007.6528206 Hz
+
     """
 
     try:
-        m_i = ion_mass(ion)
-        Z = charge_state(ion)
+        m_i = ion_mass(particle)
+        Z = charge_state(particle)
         if Z is None:
             Z = 1
+        Z = abs(Z)
     except Exception:
-        raise ValueError("Invalid ion in ion_gyrofrequency")
+        raise ValueError("Invalid particle {} in gyrofrequency"
+                         .format(particle))
 
     omega_ci = units.rad * (Z*e*np.abs(B)/m_i).to(1/units.s)
 
     return omega_ci
 
 
-def electron_gyroradius(B, *args, Vperp=None, T_e=None):
-    r"""Returns the radius of gyration for an electron in a uniform
-    magnetic field.
-
-    Parameters
-    ----------
-    B : Quantity
-        The magnetic field magnitude in units convertible to tesla.
-        If no units are given, a UserWarning will be raised and units
-        of tesla will be assumed.
-
-    Vperp : Quantity, optional
-        The component of electron velocity that is perpendicular to
-        the magnetic field in units convertible to meters per second.
-
-    T_e : Quantity, optional
-        The electron temperature in units convertible to kelvin.
-
-    args : Quantity
-        If the second positional argument is a Quantity with units
-        appropriate to Vperp or T_e, then this argument will take the
-        place of that keyword argument.
-
-    Returns
-    -------
-    r_Le : Quantity
-        The electron gyroradius in units of meters.  This Quantity
-        will be based on either the perpendicular component of
-        electron velocity as inputted, or the most probable speed for
-        an electron within a Maxwellian distribution for the electron
-        temperature.
-
-    Raises
-    ------
-    TypeError
-        If either of the inputs is not a Quantity
-
-    UnitConversionError
-        If either argument is in incorrect units
-
-    ValueError
-        If either argument contains invalid values
-
-    UserWarning
-        If units are not provided and SI units are assumed
-
-    Notes
-    -----
-    One but not both of Vperp and T_i must be inputted.
-
-    If any of B, Vperp, or T_e is a number rather than a Quantity,
-    then SI units will be assumed and a UserWarning will be raised.
-
-    Formula
-    -----
-    The electron gyroradius is also known as the Larmor radius for
-    electrons and is given by:
-
-    .. math::
-    r_{Le} = \frac{V_{perp}}{omega_{ce}}
-
-    where :math:`V_{\perp}` is the component of electron velocity that
-    is perpendicular to the magnetic field and :math:`\omega_{ce}` is
-    the electron gyrofrequency.  If a temperature is provided, then
-    :math:`V_\perp` will be the most probable thermal velocity of an
-    electron at that temperature.
-
-    Examples
-    --------
-    >>> from astropy import units as u
-    >>> electron_gyroradius(B = 0.01*u.T, T_e = 1e6*u.K)
-    <Quantity 0.0031303339253265536 m>
-    >>> electron_gyroradius(B = 0.01*u.T, Vperp = 1e6*u.m/u.s)
-    <Quantity 0.0005685630062091092 m>
-    >>> electron_gyroradius(0.2*u.T, 1e5*u.K)
-    <Quantity 4.9494925204636764e-05 m>
-    >>> electron_gyroradius(5*u.uG, 1*u.eV)
-    <Quantity 6744.259818299466 m>
-    >>> electron_gyroradius(400*u.G, 1e7*u.m/u.s)
-    <Quantity 0.0014214075155227729 m>
-
-    """
-
-    if Vperp is not None and T_e is not None:
-        raise ValueError("Cannot have both Vperp and T_e as arguments to "
-                         "electron_gyroradius")
-
-    if len(args) == 1 and isinstance(args[0], units.Quantity):
-        arg = args[0].si
-        if arg.unit == units.T and B.si.unit in [units.J, units.K,
-                                                 units.m/units.s]:
-            B, arg = arg, B
-
-        if arg.unit == units.m/units.s:
-            Vperp = arg
-        elif arg.unit in (units.J, units.K):
-            T_e = arg.to(units.K, equivalencies=units.temperature_energy())
-        else:
-            raise units.UnitConversionError("Incorrect units for positional "
-                                            "argument in electron_gyroradius")
-    elif len(args) > 0:
-        raise ValueError("Incorrect inputs to electron_gyroradius")
-
-    _check_quantity(B, 'B', 'electron_gyroradius', units.T)
-
-    if Vperp is not None:
-        _check_quantity(Vperp, 'Vperp', 'electron_gyroradius', units.m/units.s)
-    elif T_e is not None:
-        _check_quantity(T_e, 'T_e', 'electron_gyroradius', units.K)
-        Vperp = electron_thermal_speed(T_e)
-
-    omega_ce = electron_gyrofrequency(B)
-    r_L = np.abs(Vperp)/omega_ce
-
-    return r_L.to(units.m, equivalencies=units.dimensionless_angles())
-
-
-def ion_gyroradius(B, *args, Vperp=None, T_i=None, ion='p'):
-    r"""Returns the ion gyroradius.
+def gyroradius(B, *args, Vperp=None, T_i=None, particle='e'):
+    r"""Returns the particle gyroradius.
 
     Parameters
     ----------
@@ -723,17 +503,17 @@ def ion_gyroradius(B, *args, Vperp=None, T_i=None, ion='p'):
         The magnetic field magnitude in units convertible to tesla.
 
     Vperp: Quantity, optional
-        The component of ion velocity that is perpendicular to the
+        The component of particle velocity that is perpendicular to the
         magnetic field in units convertible to meters per second.
 
     T_i: Quantity, optional
-        The ion temperature in units convertible to kelvin.
+        The particle temperature in units convertible to kelvin.
 
-    ion : string, optional
-        Representation of the ion species (e.g., 'p' for protons, 'D+'
+    particle : string, optional
+        Representation of the particle species (e.g., 'p' for protons, 'D+'
         for deuterium, or 'He-4 +1' for singly ionized helium-4),
-        which defaults to protons.  If no charge state information is
-        provided, then the ions are assumed to be singly charged.
+        which defaults to electrons.  If no charge state information is
+        provided, then the particles are assumed to be singly charged.
 
     args : Quantity
         If the second positional argument is a Quantity with units
@@ -743,10 +523,10 @@ def ion_gyroradius(B, *args, Vperp=None, T_i=None, ion='p'):
     Returns
     -------
     r_Li : Quantity
-        The ion gyroradius in units of meters.  This Quantity will be
-        based on either the perpendicular component of ion velocity as
-        inputted, or the most probable speed for an ion within a
-        Maxwellian distribution for the ion temperature.
+        The particle gyroradius in units of meters.  This Quantity will be
+        based on either the perpendicular component of particle velocity as
+        inputted, or the most probable speed for an particle within a
+        Maxwellian distribution for the particle temperature.
 
     Raises
     ------
@@ -771,35 +551,45 @@ def ion_gyroradius(B, *args, Vperp=None, T_i=None, ion='p'):
 
     Formula
     -------
-    The ion gyroradius is also known as the ion Larmor radius and is
+    The particle gyroradius is also known as the particle Larmor radius and is
     given by
 
     .. math::
     r_{Li} = \frac{V_{\perp}}{omega_{ci}}
 
-    where :math:`V_{\perp}` is the component of ion velocity that is
+    where :math:`V_{\perp}` is the component of particle velocity that is
     perpendicular to the magnetic field and :math:`\omega_{ci}` is the
-    ion gyrofrequency.  If a temperature is provided, then
+    particle gyrofrequency.  If a temperature is provided, then
     :math:`V_\perp` will be the most probable thermal velocity of an
-    ion at that temperature.
+    particle at that temperature.
 
     Examples
     --------
     >>> from astropy import units as u
-    >>> ion_gyroradius(0.2*u.T, 1e5*u.K)
+    >>> gyroradius(0.2*u.T, 1e5*u.K, particle='p')
     <Quantity 0.002120874971411475 m>
-    >>> ion_gyroradius(0.2*u.T, 1e5*u.K, ion='p')
+    >>> gyroradius(0.2*u.T, 1e5*u.K, particle='p')
     <Quantity 0.002120874971411475 m>
-    >>> ion_gyroradius(5*u.uG, 1*u.eV, ion='alpha')
+    >>> gyroradius(5*u.uG, 1*u.eV, particle='alpha')
     <Quantity 288002.38837768475 m>
-    >>> ion_gyroradius(400*u.G, 1e7*u.m/u.s, ion='Fe+++')
+    >>> gyroradius(400*u.G, 1e7*u.m/u.s, particle='Fe+++')
     <Quantity 48.23129811339086 m>
+    >>> gyroradius(B = 0.01*u.T, T_i = 1e6*u.K)
+    <Quantity 0.0031303339253265536 m>
+    >>> gyroradius(B = 0.01*u.T, Vperp = 1e6*u.m/u.s)
+    <Quantity 0.0005685630062091092 m>
+    >>> gyroradius(0.2*u.T, 1e5*u.K)
+    <Quantity 4.9494925204636764e-05 m>
+    >>> gyroradius(5*u.uG, 1*u.eV)
+    <Quantity 6744.259818299466 m>
+    >>> gyroradius(400*u.G, 1e7*u.m/u.s)
+    <Quantity 0.0014214075155227729 m>
 
     """
 
     if Vperp is not None and T_i is not None:
         raise ValueError("Cannot have both Vperp and T_i as arguments to "
-                         "ion_gyroradius")
+                         "gyroradius")
 
     if len(args) == 1 and isinstance(args[0], units.Quantity):
         arg = args[0].si
@@ -813,19 +603,19 @@ def ion_gyroradius(B, *args, Vperp=None, T_i=None, ion='p'):
             T_i = arg.to(units.K, equivalencies=units.temperature_energy())
         else:
             raise units.UnitConversionError("Incorrect units for positional "
-                                            "argument in ion_gyroradius")
+                                            "argument in gyroradius")
     elif len(args) > 0:
-        raise ValueError("Incorrect inputs to ion_gyroradius")
+        raise ValueError("Incorrect inputs to gyroradius")
 
-    _check_quantity(B, 'B', 'ion_gyroradius', units.T)
+    _check_quantity(B, 'B', 'gyroradius', units.T)
 
     if Vperp is not None:
-        _check_quantity(Vperp, 'Vperp', 'ion_gyroradius', units.m/units.s)
+        _check_quantity(Vperp, 'Vperp', 'gyroradius', units.m/units.s)
     elif T_i is not None:
-        _check_quantity(T_i, 'T_i', 'ion_gyroradius', units.K)
-        Vperp = ion_thermal_speed(T_i, ion=ion)
+        _check_quantity(T_i, 'T_i', 'gyroradius', units.K)
+        Vperp = thermal_speed(T_i, particle=particle)
 
-    omega_ci = ion_gyrofrequency(B, ion)
+    omega_ci = gyrofrequency(B, particle)
 
     r_Li = np.abs(Vperp)/omega_ci
 
@@ -833,118 +623,46 @@ def ion_gyroradius(B, *args, Vperp=None, T_i=None, ion='p'):
 
 
 @check_quantity({
-    'n_e': {'units': units.m**-3, 'can_be_negative': False}
+    'n': {'units': units.m**-3, 'can_be_negative': False}
 })
-def electron_plasma_frequency(n_e):
-    r"""Calculates the electron plasma frequency.
+def plasma_frequency(n, particle='e'):
+    r"""Calculates the particle plasma frequency.
+    Defaults to the fastest, electron plasma frequency.
 
     Parameters
     ----------
-    n_e: Quantity
-        Electron number density
-
-    Returns
-    -------
-    omega_pe: Quantity
-        Electron plasma frequency in radians per second
-
-    Raises
-    ------
-    TypeError
-        If n_e is not a Quantity
-
-    UnitConversionError
-        If n_e is in incorrect units
-
-    ValueError
-        If n_e contains invalid values
-
-    UserWarning
-        If units are not provided and SI units are assumed
+    n : Quantity
+        Particle number density in units convertible to per cubic meter
 
-    Notes
-    -----
-    In a simple one dimensional model, the separation of charge
-    within a plasma creates an electric field proportional to
-    separation distance with magnitude:
-
-    .. math::
-    E = \frac{e}{\epsilon_0} n_e x
-
-    Where x is the separation distance.
-
-    The electrons will move under the action of this field with force
-    magnitude:
-
-    .. math::
-    F = e E = \frac{e^2}{\epsilon_0} n x = m_e \frac{d^2 x}{d t^2}
-
-    This is a simple harmonic oscillator. Computing its eigenfrequency
-    yields the electron plasma frequency, which is given by:
-
-    .. math::
-    \omega_{pe} = e \sqrt{\frac{n_e}{\epsilon_0 m_e}}
-
-    At present, astropy.units does not allow direct conversions from
-    radians/second for angular frequency to 1/second or Hz for
-    frequency.  The dimensionless_angles equivalency allows that
-    conversion, but does not account for the factor of 2*pi.  The
-    alternatives are to convert to cycle/second or to do the
-    conversion manually, as shown in the examples.
-
-    Example
-    -------
-    >>> from astropy import units as u
-    >>> electron_plasma_frequency(1e19*u.m**-3)
-    <Quantity 178398636471.3789 rad / s>
-
-    """
-
-    omega_pe = (units.rad*e*np.sqrt(n_e/(eps0*m_e))).to(units.rad/units.s)
-
-    return omega_pe
-
-
-@check_quantity({
-    'n_i': {'units': units.m**-3, 'can_be_negative': False}
-})
-def ion_plasma_frequency(n_i, ion='p'):
-    r"""Calculates the ion plasma frequency.
-
-    Parameters
-    ----------
-    n_i : Quantity
-        Ion number density in units convertible to per cubic meter
-
-    ion : string, optional
-        Representation of the ion species (e.g., 'p' for protons, 'D+'
+    particle : string, optional
+        Representation of the particle species (e.g., 'p' for protons, 'D+'
         for deuterium, or 'He-4 +1' for singly ionized helium-4),
-        which defaults to protons.  If no charge state information is
-        provided, then the ions are assumed to be singly charged.
+        which defaults to electrons.  If no charge state information is
+        provided, then the particles are assumed to be singly charged.
 
     Returns
     -------
     omega_pi : Quantity
-        The ion plasma frequency in radians per second.
+        The particle plasma frequency in radians per second.
 
     Raises
     ------
     TypeError
-        If n_i is not a Quantity or ion is not of an appropriate type
+        If n_i is not a Quantity or particle is not of an appropriate type
 
     UnitConversionError
         If n_i is not in correct units
 
     ValueError
-        If n_i contains invalid values or ion cannot be used to
-        identify an ion or isotope.
+        If n_i contains invalid values or particle cannot be used to
+        identify an particle or isotope.
 
     UserWarning
         If units are not provided and SI units are assumed
 
     Notes
     -----
-    The ion plasma frequency is
+    The particle plasma frequency is
 
     .. math::
     \omega_{pi} = Z e \sqrt{\frac{n_i}{\epsilon_0 m_i}}
@@ -959,24 +677,27 @@ def ion_plasma_frequency(n_i, ion='p'):
     Example
     -------
     >>> from astropy import units as u
-    >>> ion_plasma_frequency(1e19*u.m**-3)
+    >>> plasma_frequency(1e19*u.m**-3, particle='p')
     <Quantity 4163294530.6925354 rad / s>
-    >>> ion_plasma_frequency(1e19*u.m**-3, ion='p')
+    >>> plasma_frequency(1e19*u.m**-3, particle='p')
     <Quantity 4163294530.6925354 rad / s>
+    >>> plasma_frequency(1e19*u.m**-3)
+    <Quantity 178398636471.3789 rad / s>
 
     """
 
     try:
-        m_i = ion_mass(ion)
-        Z = charge_state(ion)
+        m = ion_mass(particle)
+        Z = charge_state(particle)
         if Z is None:
             Z = 1
     except Exception:
-        raise ValueError("Invalid ion in ion_gyrofrequency")
+        raise ValueError("Invalid particle {} in gyrofrequency"
+                         .format(particle))
 
-    omega_pi = units.rad*Z*e*np.sqrt(n_i/(eps0*m_i))
+    omega_p = (units.rad*e*np.sqrt(n/(eps0*m)))
 
-    return omega_pi.si
+    return omega_p.si
 
 
 @check_quantity({
@@ -1120,44 +841,44 @@ def Debye_number(T_e, n_e):
 
 
 @check_quantity({
-    'n_i': {'units': units.m**-3, 'can_be_negative': False}
+    'n': {'units': units.m**-3, 'can_be_negative': False}
 })
-def ion_inertial_length(n_i, ion='p'):
-    r"""Calculate the ion inertial length,
+def inertial_length(n, particle='e'):
+    r"""Calculate the particle inertial length,
 
     Parameters
     ----------
     n_i : Quantity
-        Ion number density in units convertible to m**-3
+        Particle number density in units convertible to m**-3
 
-    ion : string, optional
-        Representation of the ion species (e.g., 'p' for protons, 'D+'
+    particle : string, optional
+        Representation of the particle species (e.g., 'p' for protons, 'D+'
         for deuterium, or 'He-4 +1' for singly ionized helium-4),
-        which defaults to protons.  If no charge state information is
-        provided, then the ions are assumed to be singly charged.
+        which defaults to electrons.  If no charge state information is
+        provided, then the particles are assumed to be singly charged.
 
     Returns
     -------
     d_i : Quantity
-        Ion inertial length in meters
+        Particles inertial length in meters
 
     Raises
     ------
     TypeError
-        If n_i not a Quantity or ion is not a string
+        If n_i not a Quantity or particle is not a string
 
     UnitConversionError
         If n_i is not in units of a number density
 
     ValueError
-        The ion density does not have an appropriate value.
+        The particle density does not have an appropriate value.
 
     UserWarning
         If units are not provided and SI units are assumed
 
     Notes
     -----
-    The ion inertial length is also known as an ion skin depth and is
+    The particle inertial length is also known as an particle skin depth and is
     given by:
 
     .. math::
@@ -1166,72 +887,25 @@ def ion_inertial_length(n_i, ion='p'):
     Example
     -------
     >>> from astropy import units as u
-    >>> ion_inertial_length(5*u.m**-3, ion='He+')
+    >>> inertial_length(5*u.m**-3, particle='He+')
     <Quantity 202985801.8507889 m>
+    >>> inertial_length(5*u.m**-3)
+    <Quantity 2376534.756019761 m>
 
     """
 
     try:
-        Z = charge_state(ion)
+        Z = charge_state(particle)
     except Exception:
-        raise ValueError("Invalid ion in ion_inertial_length.")
-
-    omega_pi = ion_plasma_frequency(n_i, ion=ion)
-    d_i = (c/omega_pi).to(units.m, equivalencies=units.dimensionless_angles())
-
-    return d_i
-
-
-@check_quantity({
-    'n_e': {'units': units.m**-3, 'can_be_negative': False}
-})
-def electron_inertial_length(n_e):
-    r"""Returns the electron inertial length.
-
-    Parameters
-    ----------
-    n_e : Quantity
-        Electron number density
-
-    Returns
-    -------
-    d_e : Quantity
-        Electron inertial length in meters
-
-    Raises
-    ------
-    TypeError
-        If n_e is not a Quantity
-
-    UnitConversionError
-        If n_e is not in units of per cubic meter
-
-    ValueError
-        If n_e contains invalid values
-
-    UserWarning
-        If units are not provided and SI units are assumed
-
-    Notes
-    -----
-    The electron inertial length is also known as an electron skin depth and
-    is given by:
-
-    .. math::
-    d_e = \frac{c}{\omega_{pe}}
-
-    Example
-    -------
-    >>> from astropy import units as u
-    >>> electron_inertial_length(5*u.m**-3)
-    <Quantity 2376534.756019761 m>
-
-    """
+        raise ValueError("Invalid particle {} in inertial_length."
+                         .format(particle))
+    if Z:
+        Z = abs(Z)
 
-    omega_pe = electron_plasma_frequency(n_e)
-    d_e = (c/omega_pe).to(units.m, equivalencies=units.dimensionless_angles())
+    omega_p = plasma_frequency(n, particle=particle)
+    d = (c/omega_p).to(units.m, equivalencies=units.dimensionless_angles())
 
-    return d_e
+    return d
 
 
 @check_quantity({
@@ -1410,8 +1084,8 @@ def upper_hybrid_frequency(B, n_e):
     """
 
     try:
-        omega_pe = electron_plasma_frequency(n_e=n_e)
-        omega_ce = electron_gyrofrequency(B)
+        omega_pe = plasma_frequency(n=n_e)
+        omega_ce = gyrofrequency(B)
         omega_uh = (np.sqrt(omega_pe**2 + omega_ce**2)).to(units.rad/units.s)
     except Exception:
         raise ValueError("Unable to find upper hybrid frequency.")
@@ -1490,9 +1164,9 @@ def lower_hybrid_frequency(B, n_i, ion='p'):
         raise ValueError("Invalid ion in lower_hybrid_frequency.")
 
     try:
-        omega_ci = ion_gyrofrequency(B, ion=ion)
-        omega_pi = ion_plasma_frequency(n_i, ion=ion)
-        omega_ce = electron_gyrofrequency(B)
+        omega_ci = gyrofrequency(B, particle=ion)
+        omega_pi = plasma_frequency(n_i, particle=ion)
+        omega_ce = gyrofrequency(B)
         omega_lh = 1/np.sqrt((omega_ci*omega_ce)**-1+omega_pi**-2)
         omega_lh = omega_lh.to(units.rad/units.s)
     except Exception:


Test patch:
diff --git a/plasmapy/physics/tests/__init__.py b/plasmapy/physics/tests/__init__.py
index 569f8ad6..0a8b93b9 100644
--- a/plasmapy/physics/tests/__init__.py
+++ b/plasmapy/physics/tests/__init__.py
@@ -1,17 +1,12 @@
 from .test_parameters import (test_Alfven_speed,
                               test_ion_sound_speed,
-                              test_electron_thermal_speed,
-                              test_ion_thermal_speed,
-                              test_electron_gyrofrequency,
-                              test_ion_gyrofrequency,
-                              test_electron_gyroradius,
-                              test_ion_gyroradius,
-                              test_electron_plasma_frequency,
-                              test_ion_plasma_frequency,
+                              test_thermal_speed,
+                              test_gyrofrequency,
+                              test_gyroradius,
+                              test_plasma_frequency,
                               test_Debye_length,
                               test_Debye_number,
-                              test_ion_inertial_length,
-                              test_electron_inertial_length,
+                              test_inertial_length,
                               test_magnetic_pressure,
                               test_magnetic_energy_density
                               )
diff --git a/plasmapy/physics/tests/test_parameters.py b/plasmapy/physics/tests/test_parameters.py
index eb98c8cc..8f806fbf 100644
--- a/plasmapy/physics/tests/test_parameters.py
+++ b/plasmapy/physics/tests/test_parameters.py
@@ -8,18 +8,13 @@
 from ...constants import c, m_p, m_e, e, mu0
 
 from ..parameters import (Alfven_speed,
-                          electron_gyrofrequency,
-                          ion_gyrofrequency,
-                          electron_gyroradius,
-                          ion_gyroradius,
-                          electron_thermal_speed,
-                          ion_thermal_speed,
-                          electron_plasma_frequency,
-                          ion_plasma_frequency,
+                          gyrofrequency,
+                          gyroradius,
+                          thermal_speed,
+                          plasma_frequency,
                           Debye_length,
                           Debye_number,
-                          electron_inertial_length,
-                          ion_inertial_length,
+                          inertial_length,
                           ion_sound_speed,
                           magnetic_energy_density,
                           magnetic_pressure,
@@ -214,289 +209,281 @@ def test_ion_sound_speed():
         assert ion_sound_speed(T_i=1.3e6) == ion_sound_speed(T_i=1.3e6*u.K)
 
 
-def test_electron_thermal_speed():
-    """Test the electron_thermal_speed function in parameters.py."""
+def test_thermal_speed():
+    """Test the thermal_speed function in parameters.py"""
+    assert thermal_speed(T_e).unit == u.m/u.s
 
-    assert electron_thermal_speed(T_e).unit == u.m/u.s
-
-    assert electron_thermal_speed(T_e) > ion_thermal_speed(T_e)
+    assert thermal_speed(T_e) > thermal_speed(T_e, 'p')
 
     # The NRL Plasma Formulary uses a definition of the electron
     # thermal speed that differs by a factor of sqrt(2).
-    assert np.isclose(electron_thermal_speed(1*u.MK).value,
+    assert np.isclose(thermal_speed(1*u.MK).value,
                       5505694.743141063)
 
     with pytest.raises(u.UnitConversionError):
-        electron_thermal_speed(5*u.m)
+        thermal_speed(5*u.m)
 
     with pytest.raises(ValueError):
-        electron_thermal_speed(-T_e)
+        thermal_speed(-T_e)
 
     with pytest.raises(UserWarning):
-        electron_thermal_speed(1e9*u.K)
+        thermal_speed(1e9*u.K)
 
     with pytest.raises(UserWarning):
-        electron_thermal_speed(5e19*u.K)
+        thermal_speed(5e19*u.K)
 
     with pytest.raises(UserWarning):
-        assert electron_thermal_speed(1e5) == electron_thermal_speed(1e5*u.K)
-
+        assert thermal_speed(1e5) == thermal_speed(1e5*u.K)
 
-def test_ion_thermal_speed():
-    """Test the ion_thermal_speed function in parameters.py"""
+    assert thermal_speed(T_i, particle='p').unit == u.m/u.s
 
-    assert ion_thermal_speed(T_i).unit == u.m/u.s
-
-    # The NRL Plasma Formulary uses a definition of the ion thermal
+    # The NRL Plasma Formulary uses a definition of the particle thermal
     # speed that differs by a factor of sqrt(2).
-    assert np.isclose(ion_thermal_speed(1*u.MK, ion='p').si.value,
+    assert np.isclose(thermal_speed(1*u.MK, particle='p').si.value,
                       128486.56960876315)
 
-    assert ion_thermal_speed(T_i, ion='p') == \
-        ion_thermal_speed(T_i, ion='H-1')
+    assert thermal_speed(T_i, particle='p') == \
+        thermal_speed(T_i, particle='H-1')
 
-    assert ion_thermal_speed(1*u.MK, ion='e+') == \
-        electron_thermal_speed(1*u.MK)
+    assert thermal_speed(1*u.MK, particle='e+') == \
+        thermal_speed(1*u.MK)
 
     with pytest.raises(u.UnitConversionError):
-        ion_thermal_speed(5*u.m)
+        thermal_speed(5*u.m, particle='p')
 
     with pytest.raises(ValueError):
-        ion_thermal_speed(-T_e)
+        thermal_speed(-T_e, particle='p')
 
     with pytest.raises(UserWarning):
-        ion_thermal_speed(1e11*u.K)
+        thermal_speed(1e11*u.K, particle='p')
 
     with pytest.raises(UserWarning):
-        ion_thermal_speed(1e14*u.K)
+        thermal_speed(1e14*u.K, particle='p')
 
     with pytest.raises(ValueError):
-        ion_thermal_speed(T_i, ion='asdfasd')
+        thermal_speed(T_i, particle='asdfasd')
 
     with pytest.raises(UserWarning):
-        assert ion_thermal_speed(1e6) == ion_thermal_speed(1e6*u.K)
+        assert thermal_speed(1e6, particle='p') ==\
+            thermal_speed(1e6*u.K, particle='p')
+
+    assert np.isclose(thermal_speed(1e6*u.K,
+                                    method="mean_magnitude").si.value,
+                      19517177.023383822)
 
+    assert np.isclose(thermal_speed(1e6*u.K, method="rms").si.value,
+                      6743070.475775486)
+
+    with pytest.raises(ValueError):
+        thermal_speed(T_i, method="sadks")
 
-def test_electron_gyrofrequency():
-    """Test the electron_gyrofrequency function in parameters.py."""
 
-    assert electron_gyrofrequency(B).unit == u.rad/u.s
+def test_gyrofrequency():
+    """Test the gyrofrequency function in parameters.py."""
 
-    assert np.isclose(electron_gyrofrequency(1*u.T).value, 175882008784.72018)
+    assert gyrofrequency(B).unit == u.rad/u.s
 
-    assert np.isclose(electron_gyrofrequency(2.4*u.T).value,
+    assert np.isclose(gyrofrequency(1*u.T).value, 175882008784.72018)
+
+    assert np.isclose(gyrofrequency(2.4*u.T).value,
                       422116821083.3284)
 
-    assert np.isclose(electron_gyrofrequency(1*u.G).cgs.value,
+    assert np.isclose(gyrofrequency(1*u.G).cgs.value,
                       1.76e7, rtol=1e-3)
 
     with pytest.raises(TypeError):
-        electron_gyrofrequency(u.m)
+        gyrofrequency(u.m)
 
     with pytest.raises(u.UnitConversionError):
-        electron_gyrofrequency(u.m*1)
+        gyrofrequency(u.m*1)
 
     with pytest.raises(ValueError):
-        electron_gyrofrequency(B_nanarr)
+        gyrofrequency(B_nanarr)
 
     # The following is a test to check that equivalencies from astropy
     # are working.
-    omega_ce = electron_gyrofrequency(2.2*u.T)
+    omega_ce = gyrofrequency(2.2*u.T)
     f_ce = (omega_ce/(2*np.pi))/u.rad
     f_ce_use_equiv = omega_ce.to(u.Hz, equivalencies=[(u.cy/u.s, u.Hz)])
     assert np.isclose(f_ce.value, f_ce_use_equiv.value)
 
     with pytest.raises(UserWarning):
-        assert electron_gyrofrequency(5.0) == electron_gyrofrequency(5.0*u.T)
-
+        assert gyrofrequency(5.0) == gyrofrequency(5.0*u.T)
 
-def test_ion_gyrofrequency():
-    """Test the ion_gyrofrequency function in parameters.py."""
+    assert gyrofrequency(B, particle=ion).unit == u.rad/u.s
 
-    assert ion_gyrofrequency(B, ion=ion).unit == u.rad/u.s
-
-    assert np.isclose(ion_gyrofrequency(1*u.T, ion='p').value,
+    assert np.isclose(gyrofrequency(1*u.T, particle='p').value,
                       95788335.834874)
 
-    assert np.isclose(ion_gyrofrequency(2.4*u.T, ion='p').value,
+    assert np.isclose(gyrofrequency(2.4*u.T, particle='p').value,
                       229892006.00369796)
 
-    assert np.isclose(ion_gyrofrequency(1*u.G, ion='p').cgs.value,
+    assert np.isclose(gyrofrequency(1*u.G, particle='p').cgs.value,
                       9.58e3, rtol=2e-3)
 
-    assert ion_gyrofrequency(-5*u.T) == ion_gyrofrequency(5*u.T)
+    assert gyrofrequency(-5*u.T, 'p') == gyrofrequency(5*u.T, 'p')
 
-    assert ion_gyrofrequency(B, ion='p') == \
-        ion_gyrofrequency(B, ion='H-1')
+    assert gyrofrequency(B, particle='p') == \
+        gyrofrequency(B, particle='H-1')
 
-    assert ion_gyrofrequency(B, ion='e+') == \
-        electron_gyrofrequency(B)
+    assert gyrofrequency(B, particle='e+') == \
+        gyrofrequency(B)
 
     with pytest.raises(UserWarning):
-        ion_gyrofrequency(8)
+        gyrofrequency(8, 'p')
 
     with pytest.raises(u.UnitConversionError):
-        ion_gyrofrequency(5*u.m)
+        gyrofrequency(5*u.m, 'p')
 
     with pytest.raises(ValueError):
-        ion_gyrofrequency(8*u.T, ion='asdfasd')
+        gyrofrequency(8*u.T, particle='asdfasd')
 
     with pytest.raises(UserWarning):
-        assert ion_gyrofrequency(5.0) == ion_gyrofrequency(5.0*u.T)
+        assert gyrofrequency(5.0, 'p') == gyrofrequency(5.0*u.T, 'p')
 
 
-def test_electron_gyroradius():
-    """Test the electron_gyroradius function in parameters.py."""
+def test_gyroradius():
+    """Test the gyroradius function in parameters.py."""
 
-    assert electron_gyroradius(B, T_e).unit == u.m
+    assert gyroradius(B, T_e).unit == u.m
 
-    assert electron_gyroradius(B, 25*u.m/u.s).unit == u.m
+    assert gyroradius(B, 25*u.m/u.s).unit == u.m
 
-    assert electron_gyroradius(T_e, B) == electron_gyroradius(B, T_e)
+    assert gyroradius(T_e, B) == gyroradius(B, T_e)
 
-    assert electron_gyroradius(V, B) == electron_gyroradius(B, V)
+    assert gyroradius(V, B) == gyroradius(B, V)
 
-    assert electron_gyroradius(B, V) == electron_gyroradius(B, -V)
+    assert gyroradius(B, V) == gyroradius(B, -V)
 
     Vperp = 1e6*u.m/u.s
     Bmag = 1*u.T
-    omega_ce = electron_gyrofrequency(Bmag)
-    assert electron_gyroradius(Bmag, Vperp) == \
+    omega_ce = gyrofrequency(Bmag)
+    assert gyroradius(Bmag, Vperp) == \
         (Vperp/omega_ce).to(u.m, equivalencies=u.dimensionless_angles())
 
     with pytest.raises(TypeError):
-        electron_gyroradius(u.T, 8*u.m/u.s)
+        gyroradius(u.T, 8*u.m/u.s)
 
     with pytest.raises(u.UnitConversionError):
-        electron_gyroradius(5*u.A, 8*u.m/u.s)
+        gyroradius(5*u.A, 8*u.m/u.s)
 
     with pytest.raises(u.UnitConversionError):
-        electron_gyroradius(5*u.T, 8*u.m)
+        gyroradius(5*u.T, 8*u.m)
 
     with pytest.raises(ValueError):
-        electron_gyroradius(np.array([5, 6])*u.T, np.array([5, 6, 7])*u.m/u.s)
+        gyroradius(np.array([5, 6])*u.T, np.array([5, 6, 7])*u.m/u.s)
 
     with pytest.raises(ValueError):
-        electron_gyroradius(np.nan*u.T, 1*u.m/u.s)
+        gyroradius(np.nan*u.T, 1*u.m/u.s)
 
     with pytest.raises(ValueError):
-        electron_gyroradius(3.14159*u.T, -1*u.K)
+        gyroradius(3.14159*u.T, -1*u.K)
 
     with pytest.raises(UserWarning):
-        assert electron_gyroradius(1.0, Vperp=1.0) == \
-            electron_gyroradius(1.0*u.T, Vperp=1.0*u.m/u.s)
+        assert gyroradius(1.0, Vperp=1.0) == \
+            gyroradius(1.0*u.T, Vperp=1.0*u.m/u.s)
 
     with pytest.raises(UserWarning):
-        assert electron_gyroradius(1.1, T_e=1.2) == \
-            electron_gyroradius(1.1*u.T, T_e=1.2*u.K)
+        assert gyroradius(1.1, T_i=1.2) == \
+            gyroradius(1.1*u.T, T_i=1.2*u.K)
 
     with pytest.raises(ValueError):
-        electron_gyroradius(1.1*u.T, T_e=1.2*u.K, Vperp=1*u.m/u.s)
+        gyroradius(1.1*u.T, T_i=1.2*u.K, Vperp=1*u.m/u.s)
 
     with pytest.raises(ValueError):
-        electron_gyroradius(1.1*u.T, 1.2*u.K, 1.1*u.m)
-
+        gyroradius(1.1*u.T, 1.2*u.K, 1.1*u.m)
 
-def test_ion_gyroradius():
-    """Test the ion_gyroradius function in parameters.py."""
+    assert gyroradius(B, T_i, particle="p").unit == u.m
 
-    assert ion_gyroradius(B, T_i).unit == u.m
+    assert gyroradius(B, 25*u.m/u.s, particle="p").unit == u.m
 
-    assert ion_gyroradius(B, 25*u.m/u.s).unit == u.m
+    assert gyroradius(B, T_i, particle='p') == \
+        gyroradius(B, T_i, particle='H-1')
 
-    assert ion_gyroradius(B, T_i, ion='p') == \
-        ion_gyroradius(B, T_i, ion='H-1')
+    assert gyroradius(T_i, B, particle="p") == gyroradius(B, T_i, particle="p")
 
-    assert ion_gyroradius(T_i, B) == ion_gyroradius(B, T_i)
+    assert gyroradius(V, B, particle="p") == gyroradius(B, V, particle="p")
 
-    assert ion_gyroradius(V, B) == ion_gyroradius(B, V)
-
-    assert ion_gyroradius(B, V) == ion_gyroradius(B, -V)
+    assert gyroradius(B, V, particle="p") == gyroradius(B, -V, particle="p")
 
     Vperp = 1e6*u.m/u.s
     Bmag = 1*u.T
-    omega_ci = ion_gyrofrequency(Bmag, ion='p')
-    assert ion_gyroradius(Bmag, Vperp) == \
+    omega_ci = gyrofrequency(Bmag, particle='p')
+    assert gyroradius(Bmag, Vperp, particle="p") == \
         (Vperp/omega_ci).to(u.m, equivalencies=u.dimensionless_angles())
 
     T2 = 1.2*u.MK
     B2 = 123*u.G
-    ion2 = 'alpha'
-    Vperp2 = ion_thermal_speed(T2, ion=ion2)
-    assert ion_gyroradius(B2, Vperp=Vperp2, ion='alpha') == \
-        ion_gyroradius(B2, T_i=T2, ion='alpha')
+    particle2 = 'alpha'
+    Vperp2 = thermal_speed(T2, particle=particle2)
+    assert gyroradius(B2, Vperp=Vperp2, particle='alpha') == \
+        gyroradius(B2, T_i=T2, particle='alpha')
 
-    assert ion_gyroradius(1*u.T, 1*u.MK, ion='positron') == \
-        electron_gyroradius(1*u.T, 1*u.MK)
+    assert gyroradius(1*u.T, 1*u.MK, particle='positron') == \
+        gyroradius(1*u.T, 1*u.MK)
 
     with pytest.raises(TypeError):
-        ion_gyroradius(u.T, 8*u.m/u.s)
+        gyroradius(u.T, 8*u.m/u.s, particle="p")
 
     with pytest.raises(ValueError):
-        ion_gyroradius(B, T_i, ion='asfdas')
+        gyroradius(B, T_i, particle='asfdas')
 
     with pytest.raises(ValueError):
-        ion_gyroradius(B, -1*u.K, ion='p')
+        gyroradius(B, -1*u.K, particle='p')
 
     with pytest.raises(UserWarning):
-        assert ion_gyroradius(1.0, Vperp=1.0) == \
-            ion_gyroradius(1.0*u.T, Vperp=1.0*u.m/u.s)
+        assert gyroradius(1.0, Vperp=1.0, particle="p") == \
+            gyroradius(1.0*u.T, Vperp=1.0*u.m/u.s, particle="p")
 
     with pytest.raises(UserWarning):
-        assert ion_gyroradius(1.1, T_i=1.2) == \
-            ion_gyroradius(1.1*u.T, T_i=1.2*u.K)
+        assert gyroradius(1.1, T_i=1.2, particle="p") == \
+            gyroradius(1.1*u.T, T_i=1.2*u.K, particle="p")
 
     with pytest.raises(ValueError):
-        ion_gyroradius(1.1*u.T, T_i=1.2*u.K, Vperp=1*u.m/u.s)
+        gyroradius(1.1*u.T, T_i=1.2*u.K, Vperp=1*u.m/u.s, particle="p")
 
     with pytest.raises(ValueError):
-        ion_gyroradius(1.1*u.T, 1.2*u.K, 1.1*u.m)
+        gyroradius(1.1*u.T, 1.2*u.K, 1.1*u.m, particle="p")
 
     with pytest.raises(ValueError):
-        ion_gyroradius(1.1*u.T, 1.2*u.m, 1.1*u.K)
+        gyroradius(1.1*u.T, 1.2*u.m, 1.1*u.K, particle="p")
 
 
-def test_electron_plasma_frequency():
-    """Test the electron_plasma_frequency function in parameters.py."""
+def test_plasma_frequency():
+    """Test the plasma_frequency function in parameters.py."""
 
-    assert electron_plasma_frequency(n_e).unit == u.rad/u.s
+    assert plasma_frequency(n_e).unit == u.rad/u.s
 
-    assert np.isclose(electron_plasma_frequency(1*u.cm**-3).value,
+    assert np.isclose(plasma_frequency(1*u.cm**-3).value,
                       5.64e4, rtol=1e-2)
 
     with pytest.raises(TypeError):
-        electron_plasma_frequency(u.m**-3)
+        plasma_frequency(u.m**-3)
 
     with pytest.raises(u.UnitConversionError):
-        electron_plasma_frequency(5*u.m**-2)
+        plasma_frequency(5*u.m**-2)
 
     with pytest.raises(ValueError):
-        electron_plasma_frequency(np.nan*u.m**-3)
+        plasma_frequency(np.nan*u.m**-3)
 
     with pytest.raises(UserWarning):
-        assert electron_plasma_frequency(1e19) == \
-            electron_plasma_frequency(1e19*u.m**-3)
-
+        assert plasma_frequency(1e19) == \
+            plasma_frequency(1e19*u.m**-3)
 
-def test_ion_plasma_frequency():
-    """Test the ion_plasma_frequency function in parameters.py."""
+        assert plasma_frequency(n_i, particle='p').unit == u.rad/u.s
 
-    assert ion_plasma_frequency(n_i, ion='p').unit == u.rad/u.s
+    assert plasma_frequency(n_i, particle='H-1') == \
+        plasma_frequency(n_i, particle='p')
 
-    assert ion_plasma_frequency(n_i, ion='H-1') == \
-        ion_plasma_frequency(n_i, ion='p')
-
-    assert np.isclose(ion_plasma_frequency(mu*u.cm**-3, ion='p').value,
+    assert np.isclose(plasma_frequency(mu*u.cm**-3, particle='p').value,
                       1.32e3, rtol=1e-2)
 
-    assert ion_plasma_frequency(n_i, ion='e+') == \
-        electron_plasma_frequency(n_i)
-
     with pytest.raises(ValueError):
-        ion_plasma_frequency(n_i=5*u.m**-3, ion='sdfas')
+        plasma_frequency(n=5*u.m**-3, particle='sdfas')
 
     with pytest.raises(UserWarning):
-        assert ion_plasma_frequency(1e19) == ion_plasma_frequency(1e19*u.m**-3)
+        assert plasma_frequency(1e19, particle='p') ==\
+            plasma_frequency(1e19*u.m**-3, particle='p')
 
 
 def test_Debye_length():
@@ -568,56 +555,53 @@ def test_Debye_number():
         assert Debye_number(1.1*u.K, 1.1) == Debye_number(1.1, 1.1*u.m**-3)
 
 
-def test_ion_inertial_length():
-    """Test the ion_inertial_length function in parameters.py."""
+def test_inertial_length():
+    """Test the inertial_length function in parameters.py."""
 
-    assert ion_inertial_length(n_i, ion='p').unit == u.m
+    assert inertial_length(n_i, particle='p').unit == u.m
 
-    assert np.isclose(ion_inertial_length(mu*u.cm**-3, ion='p').cgs.value,
+    assert np.isclose(inertial_length(mu*u.cm**-3, particle='p').cgs.value,
                       2.28e7, rtol=0.01)
 
-    assert ion_inertial_length(5.351*u.m**-3, ion='e+') == \
-        electron_inertial_length(5.351*u.m**-3)
+    assert inertial_length(5.351*u.m**-3, particle='e+') == \
+        inertial_length(5.351*u.m**-3, particle='e')
 
-    assert ion_inertial_length(n_i, ion='p') == \
-        ion_inertial_length(n_i, ion='H-1')
+    assert inertial_length(n_i, particle='p') == \
+        inertial_length(n_i, particle='H-1')
 
     with pytest.raises(UserWarning):
-        ion_inertial_length(4)
+        inertial_length(4, particle='p')
 
     with pytest.raises(u.UnitConversionError):
-        ion_inertial_length(4*u.m**-2)
+        inertial_length(4*u.m**-2, particle='p')
 
     with pytest.raises(ValueError):
-        ion_inertial_length(-5*u.m**-3)
+        inertial_length(-5*u.m**-3, particle='p')
 
     with pytest.raises(ValueError):
-        ion_inertial_length(n_i, ion=-135)
+        inertial_length(n_i, particle=-135)
 
     with pytest.raises(UserWarning):
-        assert ion_inertial_length(1e19) == ion_inertial_length(1e19*u.m**-3)
-
-
-def test_electron_inertial_length():
-    """Test the electron_inertial_length function in parameters.py."""
+        assert inertial_length(1e19, particle='p') ==\
+            inertial_length(1e19*u.m**-3, particle='p')
 
-    assert electron_inertial_length(n_e).unit == u.m
+    assert inertial_length(n_e).unit == u.m
 
-    assert np.isclose(electron_inertial_length(1*u.cm**-3).cgs.value,
+    assert np.isclose(inertial_length(1*u.cm**-3).cgs.value,
                       5.31e5, rtol=1e-3)
 
     with pytest.raises(UserWarning):
-        electron_inertial_length(5)
+        inertial_length(5)
 
     with pytest.raises(u.UnitConversionError):
-        electron_inertial_length(5*u.m)
+        inertial_length(5*u.m)
 
     with pytest.raises(ValueError):
-        electron_inertial_length(-5*u.m**-3)
+        inertial_length(-5*u.m**-3)
 
     with pytest.raises(UserWarning):
-        assert electron_inertial_length(1e19) == \
-            electron_inertial_length(1e19*u.m**-3)
+        assert inertial_length(1e19) == \
+            inertial_length(1e19*u.m**-3)
 
 
 def test_magnetic_pressure():
@@ -697,8 +681,8 @@ def test_upper_hybrid_frequency():
     """Test the upper_hybrid_frequency function in parameters.py."""
 
     omega_uh = upper_hybrid_frequency(B, n_e=n_e)
-    omega_ce = electron_gyrofrequency(B)
-    omega_pe = electron_plasma_frequency(n_e=n_e)
+    omega_ce = gyrofrequency(B)
+    omega_pe = plasma_frequency(n=n_e)
     assert omega_ce.unit == u.rad/u.s
     assert omega_pe.unit == u.rad/u.s
     assert omega_uh.unit == u.rad/u.s
@@ -722,9 +706,9 @@ def test_lower_hybrid_frequency():
     """Test the lower_hybrid_frequency function in parameters.py."""
 
     ion = 'He-4 1+'
-    omega_ci = ion_gyrofrequency(B, ion=ion)
-    omega_pi = ion_plasma_frequency(n_i=n_i, ion=ion)
-    omega_ce = electron_gyrofrequency(B)
+    omega_ci = gyrofrequency(B, particle=ion)
+    omega_pi = plasma_frequency(n=n_i, particle=ion)
+    omega_ce = gyrofrequency(B)
     omega_lh = lower_hybrid_frequency(B, n_i=n_i, ion=ion)
     assert omega_ci.unit == u.rad/u.s
     assert omega_pi.unit == u.rad/u.s