class_docstr: Test composites for spectral channel corrections.
class_docstr_tok: ["Test","composites","for","spectral","channel","corrections","."]
docstr: Test the base class for spectral blending of channels.
docstr_tok: ["Test","the","base","class","for","spectral","blending","of","channels","."]
code: def test_spectral_blender(self):
      """Test the base class for spectral blending of channels."""
      comp = SpectralBlender(
          "blended_channel",
          fractions=(0.3, 0.4, 0.3),
          prerequisites=(0.51, 0.65, 0.85),
          standard_name="toa_bidirectional_reflectance",
      )
      res = comp((self.c01, self.c02, self.c03))
      assert isinstance(res, xr.DataArray)
      assert isinstance(res.data, da.Array)
      assert res.attrs["name"] == "blended_channel"
      assert (
          res.attrs["standard_name"] == "toa_bidirectional_reflectance"
      )
      data = res.compute()
      np.testing.assert_allclose(data, 0.3)
  
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 3 for calling the TestSpectralComposites obj's underlying member method code with example usage: obj.test_spectral_blender() without return types