class_docstr: Test NDVI-weighted hybrid green correction of green band.
class_docstr_tok: ["Test","NDVI-weighted","hybrid","green","correction","of","green","band","."]
docstr: Test General functionality with linear scaling from ndvi to blend fraction.
docstr_tok: ["Test","General","functionality","with","linear","scaling","from","ndvi","to","blend","fraction","."]
code: def test_ndvi_hybrid_green(self):
      """Test General functionality with linear scaling from ndvi to blend fraction."""
      with dask.config.set(scheduler=CustomScheduler(max_computes=0)):
          comp = NDVIHybridGreen(
              "ndvi_hybrid_green",
              limits=(0.15, 0.05),
              prerequisites=(0.51, 0.65, 0.85),
              standard_name="toa_bidirectional_reflectance",
          )
  
          # Test General functionality with linear strength (=1.0)
          res = comp((self.c01, self.c02, self.c03))
      assert isinstance(res, xr.DataArray)
      assert isinstance(res.data, da.Array)
      assert res.attrs["name"] == "ndvi_hybrid_green"
      assert (
          res.attrs["standard_name"] == "toa_bidirectional_reflectance"
      )
      data = res.values
      np.testing.assert_array_almost_equal(
          data,
          np.array([[0.2633, 0.3071], [0.2115, 0.3420]]),
          decimal=4,
      )
  
file_path: satpy/satpy/tests/compositor_tests/test_spectral.py
imports: import dask
  import dask.array
  import numpy
  import pytest
  import xarray
  from satpy.composites.spectral import HybridGreen, NDVIHybridGreen, SpectralBlender
  from satpy.tests.utils import CustomScheduler
label_desc: Use image node_id 2 for calling the TestNdviHybridGreenCompositor obj's underlying member method code with example usage: obj.test_ndvi_hybrid_green() without return types