@staticmethod
def _e_ref_lafferty(model, e_min, e_max):
    """Helper for `to_sed_type`.

        Compute e_ref that the value at e_ref corresponds
        to the mean value between e_min and e_max.
        """
    flux = model.integral(e_min, e_max)
    dnde_mean = flux / (e_max - e_min)
    return model.inverse(dnde_mean)
