Calculate the frequency of peak synchrotron emission, ν_pk.

    This is Dulk (1985) equation 39, which is a fitting function assuming a
    power-law electron population. Arguments are:

    b
      Magnetic field strength in Gauss
    ne
      The density of electrons per cubic centimeter with energies greater than 10 keV.
    delta
      The power-law index defining the energy distribution of the electron population,
      with ``n(E) ~ E^(-delta)``. The equation is valid for ``2 <~ delta <~ 7``.
    sinth
      The sine of the angle between the line of sight and the magnetic field direction.
      The equation is valid for θ > 20° or ``sinth > 0.34`` or so.
    depth
      The path length through the emitting medium, in cm.

    The return value is peak frequency in Hz.

    No complaints are raised if you attempt to use the equation outside of its
    range of validity.

def calc_gs_nu_pk(b, ne, delta, sinth, depth):
    """Calculate the frequency of peak synchrotron emission, ν_pk.

    This is Dulk (1985) equation 39, which is a fitting function assuming a
    power-law electron population. Arguments are:

    b
      Magnetic field strength in Gauss
    ne
      The density of electrons per cubic centimeter with energies greater than 10 keV.
    delta
      The power-law index defining the energy distribution of the electron population,
      with ``n(E) ~ E^(-delta)``. The equation is valid for ``2 <~ delta <~ 7``.
    sinth
      The sine of the angle between the line of sight and the magnetic field direction.
      The equation is valid for θ > 20° or ``sinth > 0.34`` or so.
    depth
      The path length through the emitting medium, in cm.

    The return value is peak frequency in Hz.

    No complaints are raised if you attempt to use the equation outside of its
    range of validity.

    """
    coldens = ne * depth
    return (2.72e3 *
            10**(0.27 * delta) *
            sinth**(0.41 + 0.03 * delta) *
            coldens**(0.32 - 0.03 * delta) *
            b**(0.68 + 0.03 * delta))