'Return an array which, when multiplied by an image, returns that image
mapped to the range of a uint8, [0, 255] (but not converted to uint8).
The intensity is assumed to have had minimum subtracted (as that can be
done per-band).
Parameters
I : `~numpy.ndarray`
Intensity to be mapped.
Returns
mapped_I : `~numpy.ndarray`
``I`` mapped to uint8'

def map_intensity_to_uint8(self, I):

    with np.errstate(invalid=u'ignore', divide=u'ignore'):
        return np.clip(I, 0, self._uint8Max)
