+ FilterAndCoherence: skip filtering if input filter strength <= 0 and use original phase for coherence estimation
+ Stack: do not add filt_ prefix to output file if input filter strength <= 0
+ topo: merge runMultilookGdal() into runMultilook() with new argument "method" to control to use isce Looks module (averaging) or gdal_translate (extraction; default, same as before).
+ topo: call gdal2isce_xml.py so that xml file for multilooked data are always generate. This fix the warning message from gdal_translate: "Warning 1: Geotransform matrix has non rotational terms"
+ topo: skip multilooking if the data file has vrt/xml file missing, which sometimes happens to incLocal and shadowMask (don't know the cause yet; I used GPU version).
+ crossmul/resampleSlc: re-organize module import at the top of scripts
move the funcationality code from main() to a new function gdal2isce_xml() so that it can be called in a python way in other scripts, instead of using os.system().
@falkamelung noted a race condition in #106 due to non-atomic directory
checking followed by os.makedirs. This pattern exists in many places
in the codebase so I went ahead and replaced the rest of them.
The new exist_ok usage should be terser and more idiomatic.
add back the following imports:
1709a1710,1711
> from scipy import interpolate
> from scipy.interpolate import interp1d
2119a2122,2123
> from scipy import interpolate
> from scipy.interpolate import interp1d
* Fix burst loading in estimateAzimuthMisreg.py
Within the for loop that starts at line 82, looping through range(minBurst, maxBurst) misses the burst with the maximum burst number. In cases where only one burst in a swath is used, the script fails at line 90 when .getWidth() is called on an empty xml. This issue can be fixed by adding the line maxBurst = maxBurst + 1
* Fix burst loading in estimateRangeMisreg.py
Similar to estimateAzimuthMisreg.py, calling range(minBurst,maxBurst) at line 185 will lead to an empty list and the some bursts not being loaded unless line 181 is changed from maxBurst = maxBurst - 1 to maxBurst = maxBurst +1
* move `val` definition to avoid undefined
Currently, with only one swath, or not enough points,
val doesnt get defined, so this error gets thrown:
File ".../isce/components/isceobj/TopsProc/runESD.py", line 115, in runESD
if val.size == 0 :
UnboundLocalError: local variable 'val' referenced before assignment
the `np.array` is added so that the `val.size` check makes sense,
as opposed to doing `.size` on a list
* fix string formats in error messages
+ plot the evolution of offset after each step to better check the changes by masking, filling and filtering operations.
+ plot both azimuth and range offset in one figure and move the plotting to the end after file writing
+ update file path in xml file so that script can work even if the files are moved.
+ convert SNR nan value to zero before used as the mask, to avoid warning message
+ add the following options to customize the plot
- add -v and --v-snr option to change the display range for offset and SNR
- add --figsize and --save option
+ suppress the DEBUG message from matplotlib
+ remove obsolete getShape() and resampleOffset()
+ update IML module import
+ adjust indentation