I’m trying to process RADARSAT-2 Imagery and I’m running into the problem where I want to process two bands but I’m not sure how to. Below is the method that I have created to calibrate and apply a speckle-filter on an image with just the VV and HH Intensities. Is there anyway I can do the calibration with just these two bands as the sourceBands/Polarizations, instead of creating two products for each band?
def MergeFcn(source1, source2):
parameters = HashMap()
sources = HashMap()
sources.put('masterProduct',source1)
sources.put('slaveProduct',source2)
target = GPF.createProduct('Merge',parameters, sources)
return target
def CalibSpeckOp(p):
pols = ['VV', 'HH']
for x in pols:
polarization = x
parameters = HashMap()
speckParam = HashMap()
parameters.put('auxFile','Latest Auxiliary File')
parameters.put('oututSigmaBand', True)
parameters.put('sourceBands','Intensity_' + polarization)
parameters.put('selectedPolarisations', polarization)
speckParam.put('sourceBands', 'Sigma0_' + polarization)
speckParam.put('filter','Boxcar')
speckParam.put('filterSizeX', 5)
speckParam.put('filterSizeY', 5)
if x == 'VV':
resultVV = GPF.createProduct("Calibration", parameters, p)
speckVV = GPF.createProduct("Speckle-Filter", speckParam, resultVV)
else:
resultHH = GPF.createProduct("Calibration", parameters, p)
speckHH = GPF.createProduct("Speckle-Filter", speckParam, resultHH)
return MergeFcn(speckVV,speckHH)