Calculate the residual for the given profile.
log (bool, optional) – calculate the logarithmic residual (default: False).
(numpy.ndarray[float], numpy.ndarray[float])