class_docstr: Common setup for NC_ABI_L1B tests.
class_docstr_tok: ["Common","setup","for","NC_ABI_L1B","tests","."]
docstr: Create a fake dataset using the given counts data.
docstr_tok: ["Create","a","fake","dataset","using","the","given","counts","data","."]
code: def setUp(self, xr_, counts=None):
      """Create a fake dataset using the given counts data."""
      from satpy.readers.ami_l1b import AMIL1bNetCDF
  
      if counts is None:
          rad_data = (np.arange(10.0).reshape((2, 5)) + 1.0) * 50.0
          rad_data = (rad_data + 1.0) / 0.5
          rad_data = rad_data.astype(np.uint16)
          counts = xr.DataArray(
              da.from_array(rad_data, chunks="auto"),
              dims=("y", "x"),
              attrs={
                  "channel_name": "VI006",
                  "detector_side": 2,
                  "number_of_total_pixels": 484000000,
                  "number_of_error_pixels": 113892451,
                  "max_pixel_value": 32768,
                  "min_pixel_value": 6,
                  "average_pixel_value": 8228.98770845248,
                  "stddev_pixel_value": 13621.130386551,
                  "number_of_total_bits_per_pixel": 16,
                  "number_of_data_quality_flag_bits_per_pixel": 2,
                  "number_of_valid_bits_per_pixel": 12,
                  "data_quality_flag_meaning": "0:good_pixel, 1:conditionally_usable_pixel, 2:out_of_scan_area_pixel, 3:error_pixel",
                  "ground_sample_distance_ew": 1.4e-05,
                  "ground_sample_distance_ns": 1.4e-05,
              },
          )
      sc_position = xr.DataArray(
          0.0,
          attrs={
              "sc_position_center_pixel": [
                  -26113466.1974016,
                  33100139.1630508,
                  3943.75470244799,
              ],
          },
      )
      xr_.open_dataset.return_value = FakeDataset(
          {
              "image_pixel_values": counts,
              "sc_position": sc_position,
              "gsics_coeff_intercept": [0.1859369],
              "gsics_coeff_slope": [0.9967594],
          },
          {
              "satellite_name": "GK-2A",
              "observation_start_time": 623084431.957882,
              "observation_end_time": 623084975.606133,
              "projection_type": "GEOS",
              "sub_longitude": 2.23751210105673,
              "cfac": 81701355.6133574,
              "lfac": -81701355.6133574,
              "coff": 11000.5,
              "loff": 11000.5,
              "nominal_satellite_height": 42164000.0,
              "earth_equatorial_radius": 6378137.0,
              "earth_polar_radius": 6356752.3,
              "number_of_columns": 22000,
              "number_of_lines": 22000,
              "observation_mode": "FD",
              "channel_spatial_resolution": "0.5",
              "Radiance_to_Albedo_c": 1,
              "DN_to_Radiance_Gain": -0.0144806550815701,
              "DN_to_Radiance_Offset": 118.050903320312,
              "Teff_to_Tbb_c0": -0.141418528203155,
              "Teff_to_Tbb_c1": 1.00052232906885,
              "Teff_to_Tbb_c2": -0.00000036287276076109,
              "light_speed": 2.9979245800e08,
              "Boltzmann_constant_k": 1.3806488000e-23,
              "Plank_constant_h": 6.6260695700e-34,
          },
      )
  
      self.reader = AMIL1bNetCDF(
          "filename",
          {"platform_shortname": "gk2a"},
          {"file_type": "ir087"},
      )
  
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 1 for calling the TestAMIL1bNetCDFBase obj's underlying member method code with example usage: obj.setUp(xr_, counts) without return types