Compute pivot wavelength assuming equal-energy convention.

    `bpass` should have two properties, `resp` and `wlen`. The units of `wlen`
    can be anything, and `resp` need not be normalized in any particular way.

def pivot_wavelength_ee(bpass):
    """Compute pivot wavelength assuming equal-energy convention.

    `bpass` should have two properties, `resp` and `wlen`. The units of `wlen`
    can be anything, and `resp` need not be normalized in any particular way.

    """
    from scipy.integrate import simps
    return np.sqrt(simps(bpass.resp, bpass.wlen) /
                   simps(bpass.resp / bpass.wlen**2, bpass.wlen))