class_docstr: Test case for the file calibration types.
docstr: Test the calibration modes of AHI using the LUTs.
docstr_tok: ["Test","the","calibration","modes","of","AHI","using","the","LUTs","."]
code: def test_calibrate(self, np_loadtxt, os_exist, get_luts):
      """Test the calibration modes of AHI using the LUTs."""
      load_return = np.squeeze(
          np.dstack(
              [np.arange(0, 2048, 1), np.arange(0, 120, 0.05859375)]
          )
      )
  
      np_loadtxt.return_value = load_return
      get_luts.return_value = True
  
      in_data = np.array(
          [[100.0, 300.0, 500.0], [800.0, 1500.0, 2040.0]]
      )
  
      refl_out = np.array(
          [
              [5.859375, 17.578125, 29.296875],
              [46.875, 87.890625, 119.53125],
          ]
      )
  
      os_exist.return_value = False
      # Check that the LUT download is called if we don't have the LUTS
      self.fh.calibrate(in_data, "reflectance")
      get_luts.assert_called()
  
      os_exist.return_value = True
      # Ensure results equal if no calibration applied
      out_data = self.fh.calibrate(in_data, "counts")
      np.testing.assert_equal(in_data, out_data)
  
      # Now ensure results equal if LUT calibration applied
      out_data = self.fh.calibrate(in_data, "reflectance")
      np.testing.assert_allclose(refl_out, out_data)
  
      # Check that exception is raised if bad calibration is passed
      with pytest.raises(NotImplementedError):
          self.fh.calibrate(in_data, "lasers")
  
      # Check that exception is raised if no file is present
      np_loadtxt.side_effect = FileNotFoundError
      with pytest.raises(FileNotFoundError):
          self.fh.calibrate(in_data, "reflectance")
  
imports: import os
  import shutil
  import tempfile
  import unittest
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  from pyresample.geometry import AreaDefinition
  from satpy.readers.ahi_l1b_gridded_bin import AHI_LUT_NAMES, AHIGriddedFileHandler
label_desc: Use image node_id 2 for calling the TestAHIGriddedFileCalibration obj's underlying member method code with example usage: obj.test_calibrate(np_loadtxt, os_exist, get_luts) without return types