class_docstr: Construct new channel by blending contributions from a set of channels.
  
  This class can be used to compute weighted average of different channels.
  Primarily it's used to correct the green band of AHI and FCI in order to
  allow for proper true color imagery.
  
  Below is an example used to generate a corrected green channel for AHI using a weighted average from
  three channels, with 63% contribution from the native green channel (B02), 29% from the red channel (B03)
  and 8% from the near-infrared channel (B04)::
  
    corrected_green:
      compositor: !!python/name:satpy.composites.spectral.SpectralBlender
      fractions: [0.63, 0.29, 0.08]
      prerequisites:
        - name: B02
          modifiers: [sunz_corrected, rayleigh_corrected]
        - name: B03
          modifiers: [sunz_corrected, rayleigh_corrected]
        - name: B04
          modifiers: [sunz_corrected, rayleigh_corrected]
      standard_name: toa_bidirectional_reflectance
  
  Other examples can be found in the``ahi.yaml`` composite file in the satpy distribution.
class_docstr_tok: ["Construct","new","channel","by","blending","contributions","from","a","set","of","channels",".","This","class","can","be","used","to","compute","weighted","average","of","different","channels",".","Primarily","it","'s","used","to","correct","the","green","band","of","AHI","and","FCI","in","order","to","allow","for","proper","true","color","imagery",".","Below","is","an","example","used","to","generate","a","corrected","green","channel","for","AHI","using","a","weighted","average","from","three","channels",",","with","63","%","contribution","from","the","native","green","channel","(","B02",")",",","29","%","from","the","red","channel","(","B03",")","and","8","%","from","the","near-infrared","channel","(","B04",")",":",":","corrected_green",":","compositor",":","!","!","python\/name",":","satpy.composites.spectral.SpectralBlender","fractions",":","[","0.63",",","0.29",",","0.08","]","prerequisites",":","-","name",":","B02","modifiers",":","[","sunz_corrected",",","rayleigh_corrected","]","-","name",":","B03","modifiers",":","[","sunz_corrected",",","rayleigh_corrected","]","-","name",":","B04","modifiers",":","[","sunz_corrected",",","rayleigh_corrected","]","standard_name",":","toa_bidirectional_reflectance","Other","examples","can","be","found","in","the","``","ahi.yaml","``","composite","file","in","the","satpy","distribution","."]
docstr: Blend channels in projectables using the weights in self.fractions.
docstr_tok: ["Blend","channels","in","projectables","using","the","weights","in","self.fractions","."]
code: def __call__(self, projectables, optional_datasets=None, **attrs):
      """Blend channels in projectables using the weights in self.fractions."""
      if len(self.fractions) != len(projectables):
          raise ValueError(
              "fractions and projectables must have the same length."
          )
  
      projectables = self.match_data_arrays(projectables)
      new_channel = sum(
          fraction * value
          for fraction, value in zip(self.fractions, projectables)
      )
      new_channel.attrs = combine_metadata(*projectables)
      return super().__call__((new_channel,), **attrs)
  
file_path: satpy/satpy/composites/spectral.py
imports: import logging
  from satpy.composites import GenericCompositor
  from satpy.dataset import combine_metadata
label_desc: Use image node_id 2 for calling the SpectralBlender obj's underlying member method code with example usage: obj.__call__(projectables, optional_datasets) and returns: super