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: Get gain & offset for calibration from counts to radiance.
  
  Choices for internal coefficients are nominal or GSICS. If no
  GSICS coefficients are available for a certain channel, fall back to
  nominal coefficients. External coefficients take precedence over
  internal coefficients.
docstr_tok: ["Get","gain","&","offset","for","calibration","from","counts","to","radiance",".","Choices","for","internal","coefficients","are","nominal","or","GSICS",".","If","no","GSICS","coefficients","are","available","for","a","certain","channel",",","fall","back","to","nominal","coefficients",".","External","coefficients","take","precedence","over","internal","coefficients","."]
code: def get_gain_offset(self):
      """Get gain & offset for calibration from counts to radiance.
  
      Choices for internal coefficients are nominal or GSICS. If no
      GSICS coefficients are available for a certain channel, fall back to
      nominal coefficients. External coefficients take precedence over
      internal coefficients.
      """
      coefs = self._coefs["coefs"]
  
      # Select internal coefficients for the given calibration mode
      internal_gain = coefs["NOMINAL"]["gain"]
      internal_offset = coefs["NOMINAL"]["offset"]
      if self._calib_mode == "GSICS":
          gsics_gain = coefs["GSICS"]["gain"]
          gsics_offset = coefs["GSICS"]["offset"] * gsics_gain
          if gsics_gain != 0 and gsics_offset != 0:
              # If no GSICS coefficients are available for a certain channel,
              # they are set to zero in the file.
              internal_gain = gsics_gain
              internal_offset = gsics_offset
  
      if should_apply_meirink(self._calib_mode, self._channel_name):
          meirink = MeirinkCalibrationHandler(
              calib_mode=self._calib_mode
          )
          internal_gain = meirink.get_slope(
              self._platform_id, self._channel_name, self._scan_time
          )
  
      # Override with external coefficients, if any.
      gain = coefs["EXTERNAL"].get("gain", internal_gain)
      offset = coefs["EXTERNAL"].get("offset", internal_offset)
      return gain, offset
  
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 3 for calling the SEVIRICalibrationHandler obj's underlying member method code with example usage: obj.get_gain_offset() and returns: gain,  offset