Calculate the flux density S_ν given a simple physical configuration.

    This is basic radiative transfer as per Dulk (1985) equations 5, 6, and 11.

    eta
      The emissivity, in units of ``erg s^-1 Hz^-1 cm^-3 sr^-1``.
    kappa
      The absorption coefficient, in units of ``cm^-1``.
    width
      The characteristic cross-sectional width of the emitting region, in cm.
    elongation
      The the elongation of the emitting region; ``depth = width * elongation``.
    dist
      The distance to the emitting region, in cm.

    The return value is the flux density, in units of ``erg s^-1 cm^-2
    Hz^-1``. The angular size of the source is taken to be ``(width /
    dist)**2``.

def calc_snu(eta, kappa, width, elongation, dist):
    """Calculate the flux density S_ν given a simple physical configuration.

    This is basic radiative transfer as per Dulk (1985) equations 5, 6, and 11.

    eta
      The emissivity, in units of ``erg s^-1 Hz^-1 cm^-3 sr^-1``.
    kappa
      The absorption coefficient, in units of ``cm^-1``.
    width
      The characteristic cross-sectional width of the emitting region, in cm.
    elongation
      The the elongation of the emitting region; ``depth = width * elongation``.
    dist
      The distance to the emitting region, in cm.

    The return value is the flux density, in units of ``erg s^-1 cm^-2
    Hz^-1``. The angular size of the source is taken to be ``(width /
    dist)**2``.

    """
    omega = (width / dist)**2
    depth = width * elongation
    tau = depth * kappa
    sourcefn = eta / kappa
    return 2 * omega * sourcefn * (1 - np.exp(-tau))