'If ``ncp_prior`` is not explicitly defined, compute it from ``gamma``
or ``p0``.'

def compute_ncp_prior(self, N):

    if (self.ncp_prior is not None):
        return self.ncp_prior
    elif (self.gamma is not None):
        return (- np.log(self.gamma))
    elif (self.p0 is not None):
        return self.p0_prior(N)
    else:
        raise ValueError(u'``ncp_prior``    is    not    defined,    and    cannot    compute    it    as    neither    ``gamma``    nor    ``p0``    is    defined.')
