Commit e665766e authored by Gaëlle USSEGLIO's avatar Gaëlle USSEGLIO
Browse files

ENH : Automatic number of iterations for ESD loop if automatic mode enabled

parent 9ba5ece8
......@@ -87,7 +87,7 @@
"Grid_Gap": {"type": "number"},
"Interferogram_gain": {"type": "number"},
"Interferogram_ortho": {"type": "boolean"},
"ESD_iter" : {"type": "number"}
"ESD_iter" : {"type": ["integer","string"]}
}
}
},
......
......@@ -165,13 +165,21 @@ if __name__ == "__main__":
ml_geoGrid_azimut = ml_azimut
gain_interfero = dict_DInSAR['parameter']['Interferogram_gain']
activateOrthoInterferogram = dict_DInSAR['parameter']['Interferogram_ortho']
# esd loop
esd_AutoMode = False # automatic mode to apply a threshold inside the esd loop
esd_NbIter = 0
if 'ESD_iter' in dict_DInSAR['parameter']:
esd_NbIter = dict_DInSAR['parameter']['ESD_iter']
if not isinstance(esd_NbIter, int) :
esd_AutoMode = True
esd_NbIter = 10 # 10 iterations maximum for automatic mode
else :
esd_AutoMode = True
esd_NbIter = 10 # 10 iterations maximum for automatic mode
print("esd_NbIter" + str(esd_NbIter))
print("esd_NbIter = " + str(esd_NbIter))
print("esd_AutoMode = " + str(esd_AutoMode))
# Check Threshold
if (geoGrid_threshold < 0) or (geoGrid_threshold > 1) :
......@@ -768,7 +776,12 @@ if __name__ == "__main__":
# Store the new interferogram paths
list_of_Interferograms.append(interferogram_path)
# Check azimuth shift to end esd loop if automatic mode enabled
if esd_AutoMode :
absMax_aziShift = abs(max(azimut_shift_esd_global, key=abs))
if absMax_aziShift < 0.01 :
break
######## Step 5 : SARConcatenateBursts #######
######### SARConcatenateBursts (for interferograms) #########
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment