class_docstr: Test the NcNWCSAF reader for Geo products.
class_docstr_tok: ["Test","the","NcNWCSAF","reader","for","Geo","products","."]
docstr: Test the scaling of the dataset with floating point values for CTTH NWCSAF/Geo v2016/v2018.
docstr_tok: ["Test","the","scaling","of","the","dataset","with","floating","point","values","for","CTTH","NWCSAF\/Geo","v2016\/v2018","."]
code: def test_scale_dataset_floating_nwcsaf_geo_ctth(
      self, nwcsaf_geo_ct_filehandler
  ):
      """Test the scaling of the dataset with floating point values for CTTH NWCSAF/Geo v2016/v2018."""
      attrs = {
          "scale_factor": np.array(1.0),
          "add_offset": np.array(-2000.0),
          "valid_range": (0.0, 27000.0),
      }
      var = xr.DataArray([1, 2, 3], attrs=attrs)
      var = nwcsaf_geo_ct_filehandler.scale_dataset(var, "dummy")
      np.testing.assert_allclose(var, [-1999.0, -1998.0, -1997.0])
      assert "scale_factor" not in var.attrs
      assert "add_offset" not in var.attrs
      np.testing.assert_equal(
          var.attrs["valid_range"], (-2000.0, 25000.0)
      )
  
imports: import h5netcdf
  import numpy
  import pytest
  import xarray
  from satpy.readers.nwcsaf_nc import NcNWCSAF, read_nwcsaf_time
label_desc: Use image node_id 7 for calling the TestNcNWCSAFGeo obj's underlying member method code with example usage: obj.test_scale_dataset_floating_nwcsaf_geo_ctth(nwcsaf_geo_ct_filehandler) without return types