Gpt BandMaths removes source bands

Hi,
I am trying simple band math and I would like to add the result as a band into the source file (like the GUI version of Band Maths does). XML is attached.gpt_band_math_pcindices.xml (546 Bytes)

I set source and target to be the same file in the gpt call:

/Applications/snap/bin/gpt “./gpt_band_math_pcindices.xml” -t “/data/c2rcc_projected_Subset_S3A_OL_1_EFR____20180114T220850_20180114T221150_20180116T014430_0179_026_357_3600_LN1_O_NT_002.SEN3.dim” “/data/c2rcc_projected_Subset_S3A_OL_1_EFR____20180114T220850_20180114T221150_20180116T014430_0179_026_357_3600_LN1_O_NT_002.SEN3.dim”

After processing, the new band appears in the source .data directory (along with all original bands). However, opening it in SNAP via the DIM file, I only see the new band, not the original bands.

The data is a subset, reprojected, C2RCC processed OLCI image.

Thank you for any help!
Moritz

You can add a new “merge” node and merge the original data with the band math product.

1 Like

Yessss. Thank you :slight_smile: