class_docstr: Reader class for VII L1B products in netCDF format.
class_docstr_tok: ["Reader","class","for","VII","L1B","products","in","netCDF","format","."]
docstr: Perform the calibration.
  
  Args:
      variable: xarray DataArray containing the dataset to calibrate.
      dataset_info: dictionary of information about the dataset.
  
  Returns:
      DataArray: array containing the calibrated values and all the original metadata.
docstr_tok: ["Perform","the","calibration",".","Args",":","variable",":","xarray","DataArray","containing","the","dataset","to","calibrate",".","dataset_info",":","dictionary","of","information","about","the","dataset",".","Returns",":","DataArray",":","array","containing","the","calibrated","values","and","all","the","original","metadata","."]
code: def _perform_calibration(self, variable, dataset_info):
      """Perform the calibration.
  
      Args:
          variable: xarray DataArray containing the dataset to calibrate.
          dataset_info: dictionary of information about the dataset.
  
      Returns:
          DataArray: array containing the calibrated values and all the original metadata.
  
      """
      calibration_name = dataset_info["calibration"]
      if calibration_name == "brightness_temperature":
          # Extract the values of calibration coefficients for the current channel
          chan_index = dataset_info["chan_thermal_index"]
          cw = self._channel_cw_thermal[chan_index]
          a = self._bt_conversion_a[chan_index]
          b = self._bt_conversion_b[chan_index]
          # Perform the calibration
          calibrated_variable = self._calibrate_bt(variable, cw, a, b)
          calibrated_variable.attrs = variable.attrs
      elif calibration_name == "reflectance":
          # Extract the values of calibration coefficients for the current channel
          chan_index = dataset_info["chan_solar_index"]
          isi = self._integrated_solar_irradiance[chan_index]
          # Perform the calibration
          calibrated_variable = self._calibrate_refl(
              variable, self.angle_factor.data, isi
          )
          calibrated_variable.attrs = variable.attrs
      elif calibration_name == "radiance":
          calibrated_variable = variable
      else:
          raise ValueError(
              "Unknown calibration %s for dataset %s"
              % (calibration_name, dataset_info["name"])
          )
  
      return calibrated_variable
  
file_path: satpy/satpy/readers/vii_l1b_nc.py
imports: import logging
  import numpy
  from satpy.readers.vii_base_nc import ViiNCBaseFileHandler
  from satpy.readers.vii_utils import C1, C2, MEAN_EARTH_RADIUS
label_desc: Use image node_id 2 for calling the ViiL1bNCFileHandler obj's underlying member method code with example usage: obj._perform_calibration(variable, dataset_info) and returns: calibrated_variable