def _calibrate(self, data):
        """Visible/IR channel calibration."""
        lut = self.prologue['ImageCalibration'][self.chid]
        if abs(lut).max() > 16777216:
            lut = lut.astype(np.float64)
        else:
            lut = lut.astype(np.float32)
        lut /= 1000
        lut[0] = np.nan
        # Dask/XArray don't support indexing in 2D (yet).
        res = data.data.map_blocks(self._getitem, lut, dtype=lut.dtype)
        res = xr.DataArray(res, dims=data.dims,
                           attrs=data.attrs, coords=data.coords)
        res = res.where(data > 0)
        return res
Visible/IR channel calibration.