Graph XML Format: 1.0 Calibration ${source} string,string,string,... string file boolean boolean boolean boolean string,string,string,... boolean boolean boolean


In [ ]:
from snappy import ProductIO, GPF, jpy
file="/eodata/Sentinel-1/SAR/GRD/2015/12/26/S1A_IW_GRDH_1SDV_20151226T040951_20151226T041020_009208_00D451_7A29.SAFE"
# print("Reading image")
# product = snappy.ProductIO.readProduct(file)
# VH = product.getBand('Amplitude_VH')
# VV = product.getBand('Amplitude_VV')
# m=snappy.Map(int)


s=GPF.getDefaultInstance().getOperatorSpiRegistry().loadOperatorSpis()
HashMap = jpy.get_type('java.util.HashMap')

processed_files = [file]

product_set=[]

# for f in processed_files:
#     product_set.append(ProductIO.readProduct(f))
      
#define the stack parameters
params = HashMap()
params.put('resamplingType', None)
params.put('sourceProduct',file)
params.put('initialOffsetMethod', 'Product Geolocation')
params.put('extent', 'Master')

#make the stack    
create_stack = GPF.createProduct('Calibration', params, product_set)
# print(GPF.getOperatorSpiRegistry())
# print(create_stack)
#write the stack
# ProductIO.writeProduct(create_stack, 'C:\\create_stack', 'BEAM-DIMAP')

In [ ]: