class_docstr: Test the FY3D MERSI2 L1B reader.
docstr: Test loading data at counts calibration.
docstr_tok: ["Test","loading","data","at","counts","calibration","."]
code: def test_counts_calib(self):
      """Test loading data at counts calibration."""
      from satpy.readers import load_reader
      from satpy.tests.utils import make_dataid
  
      filenames = self.filenames_all
      reader = load_reader(self.reader_configs)
      files = reader.select_files_from_pathnames(filenames)
      assert 4 == len(files)
      reader.create_filehandlers(files)
      # Make sure we have some files
      assert reader.file_handlers
  
      ds_ids = []
      for band_name in ["1", "2", "3", "4", "5", "20", "24", "25"]:
          ds_ids.append(
              make_dataid(name=band_name, calibration="counts")
          )
      ds_ids.append(make_dataid(name="satellite_zenith_angle"))
      res = reader.load(ds_ids)
      assert len(res) == 9
      assert res["1"].shape == (2 * 40, 2048 * 2)
      assert res["1"].attrs["calibration"] == "counts"
      assert res["1"].dtype == np.uint16
      assert res["1"].attrs["units"] == "1"
      assert res["2"].shape == (2 * 40, 2048 * 2)
      assert res["2"].attrs["calibration"] == "counts"
      assert res["2"].dtype == np.uint16
      assert res["2"].attrs["units"] == "1"
      assert res["3"].shape == (2 * 40, 2048 * 2)
      assert res["3"].attrs["calibration"] == "counts"
      assert res["3"].dtype == np.uint16
      assert res["3"].attrs["units"] == "1"
      assert res["4"].shape == (2 * 40, 2048 * 2)
      assert res["4"].attrs["calibration"] == "counts"
      assert res["4"].dtype == np.uint16
      assert res["4"].attrs["units"] == "1"
      assert res["5"].shape == (2 * 10, 2048)
      assert res["5"].attrs["calibration"] == "counts"
      assert res["5"].dtype == np.uint16
      assert res["5"].attrs["units"] == "1"
      assert res["20"].shape == (2 * 10, 2048)
      assert res["20"].attrs["calibration"] == "counts"
      assert res["20"].dtype == np.uint16
      assert res["20"].attrs["units"] == "1"
      assert res["24"].shape == (2 * 40, 2048 * 2)
      assert res["24"].attrs["calibration"] == "counts"
      assert res["24"].dtype == np.uint16
      assert res["24"].attrs["units"] == "1"
      assert res["25"].shape == (2 * 40, 2048 * 2)
      assert res["25"].attrs["calibration"] == "counts"
      assert res["25"].dtype == np.uint16
      assert res["25"].attrs["units"] == "1"
  
imports: import os
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from satpy.tests.reader_tests.test_hdf5_utils import FakeHDF5FileHandler
label_desc: Use image node_id 2 for calling the TestMERSI2L1B obj's underlying member method code with example usage: obj.test_counts_calib() without return types