class_docstr: File handler for the SGLI l1b data.
class_docstr_tok: ["File","handler","for","the","SGLI","l1b","data","."]
docstr: Calibrate IR channel.
docstr_tok: ["Calibrate","IR","channel","."]
code: def calibrate_ir(self, dataset, calibration):
      """Calibrate IR channel."""
      attrs = dataset.attrs
      if calibration == "counts":
          return dataset
      elif calibration in ["radiance", "brightness_temperature"]:
          calibrated = dataset * attrs["Slope"] + attrs["Offset"]
          if calibration == "brightness_temperature":
              raise NotImplementedError(
                  "Cannot calibrate to brightness temperatures."
              )
              # from pyspectral.radiance_tb_conversion import radiance2tb
              # calibrated = radiance2tb(calibrated, attrs["Center_wavelength"] * 1e-9)
      missing, _ = self.get_missing_and_saturated(attrs)
      return calibrated.where(dataset < missing)
  
imports: import logging
  from datetime import datetime
  import dask.array
  import h5py
  import numpy
  import xarray
  from dask.array.core import normalize_chunks
  from satpy.readers.file_handlers import BaseFileHandler
label_desc: Use image node_id 11 for calling the HDF5SGLI obj's underlying member method code with example usage: obj.calibrate_ir(dataset, calibration) and returns: calibrated, dataset