<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>> in the event that we are provided only 4 bands, but from an
      8-band system, will this still hold? It is what we have to work
      with, unfortunately or not. <br>
    </p>
    <p>Yes, obviously, the example generalizes to other number of bands.</p>
    <blockquote type="cite"
cite="mid:MW6PR04MB88716A210D0AE5C1FA6687E2C3132@MW6PR04MB8871.namprd04.prod.outlook.com">
      <div class="elementToProof"
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        So, providing either <code>band_nums=[1,2,3,4]</code> along
        with weights and extracting bands 1 and 4 after-the-fact, or
        <code>band_nums=[1,4] and </code><code
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;">providing
          the corresponding weights for those bands, in my mind should
          produce something similar? I haven't tried it just yet.</code></div>
    </blockquote>
    <p>No.</p>
    <p>Let's consider the minimum example:</p>
    <p>A = 10, weightA = 0.7</p>
    <p>B = 20, weightB = 0.3</p>
    <p>P = 30</p>
    <p>PseudoPanchro = 10 * 0.7 + 20 * 0.3 = 13</p>
    <p>then A_pansharpened = A / PseudoPanchro * Panchro = 10. / 13 * 30
      = 23.08</p>
    <p>and  B_pansharpened= B / PseudoPanchro * Panchro = 20. / 13 * 30
      = 46.15</p>
    <p>If you ignore B, than A_pansharpened = 10. / (10 * 0.7) * 30 =
      42.85</p>
    <p>And, even if you rebalance the reduced set of weights so its sum
      is still 1, which makes much more sense, that still won't work,
      because that would in that example just give the value of P.</p>
    <p><a class="moz-txt-link-freetext" href="https://github.com/mapbox/rio-pansharpen/blob/master/docs/pansharpening_methods.rst#brovey">https://github.com/mapbox/rio-pansharpen/blob/master/docs/pansharpening_methods.rst#brovey</a>
      : "It assumes that the spectral range spanned by the panchromatic
      image is the same as that covered by the multispectral
      channels."   If you ignore multispectral channels in the
      computation of the pseudo panchro value, then the assumption no
      longer holds true. Or you need some magic to generate a reference
      panchromatic image that only takes into account the subset of
      bands you are interested in.</p>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.</pre>
  </body>
</html>