Skip to content
Snippets Groups Projects
Commit 6bb7595b authored by Gaëlle USSEGLIO's avatar Gaëlle USSEGLIO
Browse files

ENH : Change filtering pipeline (in memory) for S1SM and Cosmo sensors

parent e910a895
No related branches found
No related tags found
No related merge requests found
......@@ -130,17 +130,8 @@ def filtering_Others(master_Image, master_Image_base, slave_Image, slave_Image_b
geoGrid_gridstep_azimut = param['geoGrid_gridstep_azimut']
# define partial function with previous parameters
phaseFilteringApp = partial(diapOTBApp.phaseFiltering, withComplex="true",
mlran=ml_filt_interf_range, mlazi=ml_filt_interf_azimut, step=16,
sizetiles=64, alpha=alpha)
addAmpApp = partial(diapOTBApp.addAmpInterferogram, withComplex="true",
mlran=ml_filt_interf_range, mlazi=ml_filt_interf_azimut,
gain=ml_filt_interf_gain)
# Filtering
# Filtering : Pipeline in memory (=> Execute and direct calls to applications)
master_cartesian_mean = "CartMeanMaster.tif"
fine_grid = "fineDeformationGrid.tif"
......@@ -178,22 +169,37 @@ def filtering_Others(master_Image, master_Image_base, slave_Image, slave_Image_b
appComplex.SetParameterString("insarmaster", master_Image)
appComplex.SetParameterInputImage("topographicphase",
appTopoPhase.GetParameterOutputImage("out"))
appComplex.SetParameterString("ram", "4000")
appComplex.SetParameterString("out", os.path.join(filt_dir, complexImg))
appComplex.ExecuteAndWriteOutput()
appComplex.Execute()
# Third SARPhaseFiltering
filt_phacoh = "filfPhaCoh.tif"
filt_phacoh_path = os.path.join(filt_dir, filt_phacoh)
phaseFilteringApp(inForFiltering=os.path.join(filt_dir, complexImg),
outPath=filt_phacoh_path)
appPhaFiltering = otb.Registry.CreateApplication("SARPhaseFiltering")
appPhaFiltering.SetParameterInputImage("incomplex", appComplex.GetParameterOutputImage("out"))
appPhaFiltering.SetParameterInt("mlran", ml_filt_interf_range)
appPhaFiltering.SetParameterInt("mlazi", ml_filt_interf_azimut)
appPhaFiltering.SetParameterInt("step", 16)
appPhaFiltering.SetParameterInt("sizetiles", 64)
appPhaFiltering.SetParameterFloat("alpha", alpha)
appPhaFiltering.SetParameterString("out", filt_phacoh_path)
appPhaFiltering.SetParameterString("ram", "4000")
appPhaFiltering.ExecuteAndWriteOutput()
# Eventually SARAddBandInterfergoram
filt_interferogram = "filtered_interferogram.tif"
addAmpApp(inForAmp=os.path.join(filt_dir, complexImg),
inForPhaCoh=filt_phacoh_path,
outPath=os.path.join(output_dir, filt_interferogram))
appAddAmp = otb.Registry.CreateApplication("SARAddBandInterferogram")
appAddAmp.SetParameterInputImage("incomplexamp", appComplex.GetParameterOutputImage("out"))
appAddAmp.SetParameterString("ininterf", filt_phacoh_path)
appAddAmp.SetParameterInt("mlran", ml_filt_interf_range)
appAddAmp.SetParameterInt("mlazi", ml_filt_interf_azimut)
appAddAmp.SetParameterFloat("gain", ml_filt_interf_gain)
appAddAmp.SetParameterString("out", os.path.join(output_dir, filt_interferogram))
appAddAmp.SetParameterString("ram", "4000")
appAddAmp.ExecuteAndWriteOutput()
def filtering_S1IW(master_Image, master_Image_base, slave_Image, slave_Image_base, master_dir, slave_dir, param, output_dir):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment