class_docstr: Test case for various AHI calibration types.
class_docstr_tok: ["Test","case","for","various","AHI","calibration","types","."]
docstr: Test updated in-file calibration modes.
docstr_tok: ["Test","updated","in-file","calibration","modes","."]
code: def test_updated_calibrate(self):
      """Test updated in-file calibration modes."""
      # Standard operation
      self.fh.calib_mode = "UPDATE"
      rad_exp = np.array([[30.4, 23.0], [15.6, -6.6]])
      rad = self.fh.calibrate(data=self.counts, calibration="radiance")
      assert np.allclose(rad, rad_exp)
  
      # Case for no updated calibration available (older data)
      self.fh._header = {
          "block5": {
              "band_number": [5],
              "gain_count2rad_conversion": [self.def_cali[0]],
              "offset_count2rad_conversion": [self.def_cali[1]],
              "central_wave_length": [10.4073],
          },
          "calibration": {
              "coeff_rad2albedo_conversion": [0.0019255],
              "speed_of_light": [299792458.0],
              "planck_constant": [6.62606957e-34],
              "boltzmann_constant": [1.3806488e-23],
              "c0_rad2tb_conversion": [-0.116127314574],
              "c1_rad2tb_conversion": [1.00099153832],
              "c2_rad2tb_conversion": [-1.76961091571e-06],
              "cali_gain_count2rad_conversion": [self.bad_cali[0]],
              "cali_offset_count2rad_conversion": [self.bad_cali[1]],
          },
      }
      rad = self.fh.calibrate(data=self.counts, calibration="radiance")
      rad_exp = np.array([[15.2, 11.5], [7.8, -3.3]])
      assert np.allclose(rad, rad_exp)
  
imports: from __future__ import annotations
  import contextlib
  import unittest
  import warnings
  from datetime import datetime
  from typing import Any, Dict
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  from satpy.readers.ahi_hsd import AHIHSDFileHandler
  from satpy.readers.utils import get_geostationary_mask
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 3 for calling the TestAHICalibration obj's underlying member method code with example usage: obj.test_updated_calibrate() without return types