code: def convert_to_radiance(self, data):
          
  
          bnum = self._header["block5"]['band_number'][0]
          # Check calibration mode and select corresponding coefficients
          if self.calib_mode == "UPDATE" and bnum < 7:
              gain = self._header['calibration']["cali_gain_count2rad_conversion"][0]
              offset = self._header['calibration']["cali_offset_count2rad_conversion"][0]
              if gain == 0 and offset == 0:
                  logger.info(
                      "No valid updated coefficients, fall back to default values.")
                  gain = self._header["block5"]["gain_count2rad_conversion"][0]
                  offset = self._header["block5"]["offset_count2rad_conversion"][0]
          else:
              gain = self._header["block5"]["gain_count2rad_conversion"][0]
              offset = self._header["block5"]["offset_count2rad_conversion"][0]
  
          return (data * gain + offset).clip(0)
docs: Calibrate to radiance.