class_docstr: Calibration handler for SEVIRI HRIT-, native- and netCDF-formats.
  
  Handles selection of calibration coefficients and calls the appropriate
  calibration algorithm.
class_docstr_tok: ["Calibration","handler","for","SEVIRI","HRIT-",",","native-","and","netCDF-formats",".","Handles","selection","of","calibration","coefficients","and","calls","the","appropriate","calibration","algorithm","."]
docstr: Calibrate the given data.
docstr_tok: ["Calibrate","the","given","data","."]
code: def calibrate(self, data, calibration):
      """Calibrate the given data."""
      if calibration == "counts":
          res = data
      elif calibration in [
          "radiance",
          "reflectance",
          "brightness_temperature",
      ]:
          gain, offset = self.get_gain_offset()
          res = self._algo.convert_to_radiance(
              data.astype(np.float32), gain, offset
          )
      else:
          raise ValueError(
              "Invalid calibration {} for channel {}".format(
                  calibration, self._channel_name
              )
          )
  
      if calibration == "reflectance":
          solar_irradiance = CALIB[self._platform_id][
              self._channel_name
          ]["F"]
          res = self._algo.vis_calibrate(res, solar_irradiance)
      elif calibration == "brightness_temperature":
          res = self._algo.ir_calibrate(
              res, self._channel_name, self._coefs["radiance_type"]
          )
  
      return res
  
imports: from __future__ import annotations
  import warnings
  from datetime import datetime, timedelta
  import dask.array
  import numpy
  import pyproj
  from numpy.polynomial.chebyshev import Chebyshev
  from satpy.readers.eum_base import issue_revision, time_cds_short
  from satpy.readers.utils import apply_earthsun_distance_correction
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 2 for calling the SEVIRICalibrationHandler obj's underlying member method code with example usage: obj.calibrate(data, calibration) and returns: res