class_docstr: Test IR specific things about the AMI reader.
class_docstr_tok: ["Test","IR","specific","things","about","the","AMI","reader","."]
docstr: Test IR radiance adjustment using user-supplied coefs.
docstr_tok: ["Test","IR","radiance","adjustment","using","user-supplied","coefs","."]
code: def test_user_radiance_corr(self):
      """Test IR radiance adjustment using user-supplied coefs."""
      from satpy.readers.ami_l1b import rad2temp
  
      self.reader.calib_mode = "FILE"
      self.reader.user_calibration = {
          "IR087": {"slope": 0.99669, "offset": 0.16907}
      }
      expected = np.array(
          [
              [
                  238.073713,
                  238.044043,
                  238.014354,
                  237.984647,
                  237.954921,
              ],
              [
                  237.925176,
                  237.895413,
                  237.865631,
                  237.835829,
                  237.806009,
              ],
          ]
      )
      with mock.patch(
          "satpy.readers.ami_l1b.rad2temp", wraps=rad2temp
      ) as r2t_mock:
          res = self.reader.get_dataset(self.ds_id, self.ds_info)
          r2t_mock.assert_not_called()
      # file coefficients are pretty close, give some wiggle room
      np.testing.assert_allclose(
          res.data.compute(), expected, equal_nan=True, atol=0.01
      )
      # make sure the attributes from the file are in the data array
      assert res.attrs["standard_name"] == "toa_brightness_temperature"
  
imports: import unittest
  from unittest import mock
  import dask.array
  import numpy
  import xarray
  from pytest import approx, raises
label_desc: Use image node_id 5 for calling the TestAMIL1bNetCDFIRCal obj's underlying member method code with example usage: obj.test_user_radiance_corr() without return types