code: def calibrate(self, data, calibration):
          
          tic = datetime.now()
  
          if calibration == 'counts':
              return data
          elif calibration == 'radiance':
              raise NotImplementedError("Can't calibrate to radiance.")
          else:
              cal = self.calibration_table
              res = data.data.map_blocks(self._interp, cal, dtype=cal[:, 0].dtype)
              res = xr.DataArray(res,
                                 dims=data.dims, attrs=data.attrs,
                                 coords=data.coords)
          res = res.where(data > 0)
          logger.debug("Calibration time " + str(datetime.now() - tic))
          return res
docs: Calibrate the data.