class_docstr: Testing the file handler.
class_docstr_tok: ["Testing","the","file","handler","."]
docstr: Test conversion from IR counts to radiance.
code: def test_ircounts2radiance(self):
      """Test conversion from IR counts to radiance."""
      # Test counts
      counts = xr.DataArray([0, 100, 500, 1000, 1023])
  
      # Reference Radiance from NOAA lookup tables (same for detectors 1 and
      # 2, see [IR])
      rad_expected = {
          "03_9": np.array([0, 0.140, 1.899, 4.098, 4.199]),
          "06_5": np.array([0, 1.825, 12.124, 24.998, 25.590]),
          "10_7": np.array([0, 16.126, 92.630, 188.259, 192.658]),
          "13_3": np.array([0, 15.084, 87.421, 177.842, 182.001]),
      }
  
      # The input counts are exact, but the accuracy of the output radiance is
      # limited to 3 digits
      atol = 1e-3
  
      for ch in sorted(rad_expected.keys()):
          coefs = self.coefs[ch]
          rad = self.reader._ircounts2radiance(
              counts=counts,
              scale=coefs["scale"],
              offset=coefs["offset"],
          )
          assert np.allclose(
              rad.data, rad_expected[ch], atol=atol
          ), "Incorrect conversion from IR counts to radiance in channel {}".format(
              ch
          )
  
imports: import datetime
  import unittest
  from unittest import mock
  import numpy
  import pytest
  import xarray
  from pyresample.geometry import AreaDefinition
  from satpy.readers.goes_imager_nc import is_vis_channel
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 5 for calling the GOESNCBaseFileHandlerTest obj's underlying member method code with example usage: obj.test_ircounts2radiance() without return types