I am using SNAP to process multiple files from command line by iterating through all the files in a folder. I ran into a problem when using “Multilooking” or “BandMath” and I need to select specific bands. Previously with other graphs I have built the graphs in SNAP with example files and changed the input and output string to a variable.
But how do I universally select a parameter. At the moment in the graph the source bands are <sourceBands>i_VV_24Aug2015_17Sep2015,q_VV_24Aug2015_17Sep2015</sourceBands>
, from the example files, but how to I change the source band so that it would work with other files as well. I want to use i and q bands, which are the first and second band.
Can this be solved by using sourceBandPaths? How do I use it?
<node id="GoldsteinPhaseFiltering">
<operator>GoldsteinPhaseFiltering</operator>
<sources>
<sourceProduct refid="TopoPhaseRemoval"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<alpha>1.0</alpha>
<FFTSizeString>64</FFTSizeString>
<windowSizeString>3</windowSizeString>
<useCoherenceMask>false</useCoherenceMask>
<coherenceThreshold>0.2</coherenceThreshold>
</parameters>
</node>
<node id="Multilook">
<operator>Multilook</operator>
<sources>
<sourceProduct refid="GoldsteinPhaseFiltering"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<sourceBands>i_VV_24Aug2015_17Sep2015,q_VV_24Aug2015_17Sep2015</sourceBands>
<nRgLooks>10</nRgLooks>
<nAzLooks>2</nAzLooks>
<outputIntensity>false</outputIntensity>
<grSquarePixel>false</grSquarePixel>
</parameters>
</node>
<node id="BandMaths">
<operator>BandMaths</operator>
<sources>
<sourceProduct refid="Multilook"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<targetBands>
<targetBand>
<name>phase</name>
<type>float32</type>
<expression>phase(i_VV_24Aug2015_17Sep2015,q_VV_24Aug2015_17Sep2015)</expression>
<description/>
<unit/>
<noDataValue>NaN</noDataValue>
</targetBand>
</targetBands>
<variables/>
</parameters>
</node>