I do phase unrwapping using snappy+snaphu in python. After snaphu export,
I use the following code for phase unrwapping. Where Folder is the path to my wrapped phase and Tempfolder is a temporary folder for writing products. All products of snaphu export are written in this folder including header information of onrwapped phase and exported ENVI files of wrapped interferogram.
Product = snappy.ProductIO.readProduct(Folder + “/” + Name + “_ifg_ml_fit.dim”)
params = HashMap()
params.put(“targetProductFile”, Folder + “/” + Name + “_ifg_ml_fit.dim”)
Product = GPF.createProduct(“snaphu-unwrapping”, params, Product)
snappy.ProductIO.writeProduct(Product, TempFolder, “ENVI”)
print(“Phase unwrapping performed successfully …”)
My main question here is the last line of the code if it is right way of writing the final product of unwrapped phase into ENVI file. Is there a better correct way of writing the final product into ENVI file to be importated into SNAP in the next step.
Thanks in advance for your guidance,