Replaced logger.warn to logger.warning, changed *.hgt* to *.hgt and updated RelaxIV download link (#332)

* Replace logger.warn to logger.warning

* Changed *.hgt* to *.hgt

* Updated link for downloading RelaxIV

* Update README.md
LT1AB
Bryan Marfito 2021-09-10 02:05:12 +08:00 committed by GitHub
parent 9f9e2e89fc
commit d1d6b090ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 30 additions and 31 deletions

View File

@ -81,10 +81,9 @@ you want to try the unwrap 2 stage option:
* RelaxIV (a minimum cost flow relaxation algorithm coded in C++ by * RelaxIV (a minimum cost flow relaxation algorithm coded in C++ by
Antonio Frangioni and Claudio Gentile at the University of Pisa, Antonio Frangioni and Claudio Gentile at the University of Pisa,
based on the Fortran code developed by by Dimitri Bertsekas while based on the Fortran code developed by Dimitri Bertsekas while
at MIT) available by request at http://www.di.unipi.it/~frangio. at MIT) is available at https://github.com/frangio68/Min-Cost-Flow-Class.
So that ISCE will compile it properly, the RelaxIV files should The RelaxIV files should be placed in the directory: 'contrib/UnwrapComp/src/RelaxIV' so that ISCE will compile it properly.
be placed in the directory: 'contrib/UnwrapComp/src/RelaxIV'.
* PULP: Use easy\_install or pip to install it or else clone it from, * PULP: Use easy\_install or pip to install it or else clone it from,
https://github.com/coin-or/pulp. Make sure the path to the installed https://github.com/coin-or/pulp. Make sure the path to the installed

View File

@ -754,19 +754,19 @@ class _InsarBase(Application, FrameMixin):
if self.geocode_bbox: if self.geocode_bbox:
####Adjust bbox according to dem ####Adjust bbox according to dem
if self.geocode_bbox[0] < dem_snwe[0]: if self.geocode_bbox[0] < dem_snwe[0]:
logger.warn('Geocoding southern extent changed to match DEM') logger.warning('Geocoding southern extent changed to match DEM')
self.geocode_bbox[0] = dem_snwe[0] self.geocode_bbox[0] = dem_snwe[0]
if self.geocode_bbox[1] > dem_snwe[1]: if self.geocode_bbox[1] > dem_snwe[1]:
logger.warn('Geocoding northern extent changed to match DEM') logger.warning('Geocoding northern extent changed to match DEM')
self.geocode_bbox[1] = dem_snwe[1] self.geocode_bbox[1] = dem_snwe[1]
if self.geocode_bbox[2] < dem_snwe[2]: if self.geocode_bbox[2] < dem_snwe[2]:
logger.warn('Geocoding western extent changed to match DEM') logger.warning('Geocoding western extent changed to match DEM')
self.geocode_bbox[2] = dem_snwe[2] self.geocode_bbox[2] = dem_snwe[2]
if self.geocode_bbox[3] > dem_snwe[3]: if self.geocode_bbox[3] > dem_snwe[3]:
logger.warn('Geocoding eastern extent changed to match DEM') logger.warning('Geocoding eastern extent changed to match DEM')
self.geocode_bbox[3] = dem_snwe[3] self.geocode_bbox[3] = dem_snwe[3]
#Ensure consistency in geocode_list maintained by insarApp and #Ensure consistency in geocode_list maintained by insarApp and

View File

@ -1170,19 +1170,19 @@ class IsceApp(Application, FrameMixin):
if self.geocode_bbox: if self.geocode_bbox:
####Adjust bbox according to dem ####Adjust bbox according to dem
if self.geocode_bbox[0] < dem_snwe[0]: if self.geocode_bbox[0] < dem_snwe[0]:
logger.warn('Geocoding southern extent changed to match DEM') logger.warning('Geocoding southern extent changed to match DEM')
self.geocode_bbox[0] = dem_snwe[0] self.geocode_bbox[0] = dem_snwe[0]
if self.geocode_bbox[1] > dem_snwe[1]: if self.geocode_bbox[1] > dem_snwe[1]:
logger.warn('Geocoding northern extent changed to match DEM') logger.warning('Geocoding northern extent changed to match DEM')
self.geocode_bbox[1] = dem_snwe[1] self.geocode_bbox[1] = dem_snwe[1]
if self.geocode_bbox[2] < dem_snwe[2]: if self.geocode_bbox[2] < dem_snwe[2]:
logger.warn('Geocoding western extent changed to match DEM') logger.warning('Geocoding western extent changed to match DEM')
self.geocode_bbox[2] = dem_snwe[2] self.geocode_bbox[2] = dem_snwe[2]
if self.geocode_bbox[3] > dem_snwe[3]: if self.geocode_bbox[3] > dem_snwe[3]:
logger.warn('Geocoding eastern extent changed to match DEM') logger.warning('Geocoding eastern extent changed to match DEM')
self.geocode_bbox[3] = dem_snwe[3] self.geocode_bbox[3] = dem_snwe[3]
#Ensure consistency in geocode_list maintained by isceApp and #Ensure consistency in geocode_list maintained by isceApp and

View File

@ -320,7 +320,7 @@ class GRDSAR(Application):
#warn if there are any differences in content #warn if there are any differences in content
if g_count > 0: if g_count > 0:
print() print()
logger.warn(( logger.warning((
"Some filenames in rtcApp.geocode_list configuration "+ "Some filenames in rtcApp.geocode_list configuration "+
"are different from those in rtcProc. Using names given"+ "are different from those in rtcProc. Using names given"+
" to grdApp.")) " to grdApp."))

View File

@ -646,7 +646,7 @@ class _RoiBase(Application, FrameMixin):
#warn if there are any differences in content #warn if there are any differences in content
if g_count > 0: if g_count > 0:
print() print()
logger.warn(( logger.warning((
"Some filenames in stripmapApp.geocode_list configuration "+ "Some filenames in stripmapApp.geocode_list configuration "+
"are different from those in StripmapProc. Using names given"+ "are different from those in StripmapProc. Using names given"+
" to stripmapApp.")) " to stripmapApp."))

View File

@ -782,7 +782,7 @@ class TopsInSAR(Application):
#warn if there are any differences in content #warn if there are any differences in content
if g_count > 0: if g_count > 0:
print() print()
logger.warn(( logger.warning((
"Some filenames in insarApp.geocode_list configuration "+ "Some filenames in insarApp.geocode_list configuration "+
"are different from those in InsarProc. Using names given"+ "are different from those in InsarProc. Using names given"+
" to insarApp.")) " to insarApp."))

View File

@ -72,6 +72,6 @@ def runOffoutliers(self, distance, errorLimit=100):
logger.error('Small number of output Offsets after culling: %d .\n Increase number of windows (or) window sizes (or) provide gross offset manually.'%(lenOut)) logger.error('Small number of output Offsets after culling: %d .\n Increase number of windows (or) window sizes (or) provide gross offset manually.'%(lenOut))
raise Exception('Offset estimation Failed.') raise Exception('Offset estimation Failed.')
elif lenOut < warnLimit: elif lenOut < warnLimit:
logger.warn('Number of output offsets after culling are low: %d. Might be ok to continue.'%(lenOut)) logger.warning('Number of output offsets after culling are low: %d. Might be ok to continue.'%(lenOut))
self._insar.setRefinedOffsetField(refinedOffsets) self._insar.setRefinedOffsetField(refinedOffsets)

View File

@ -82,10 +82,10 @@ def runPrepareResamps(self, rangeLooks=None, azLooks=None):
looksaz=int(round(posting/(s2_2 - s2))) looksaz=int(round(posting/(s2_2 - s2)))
if (looksrange < 1): if (looksrange < 1):
logger.warn("Number range looks less than zero, setting to 1") logger.warning("Number range looks less than zero, setting to 1")
looksrange = 1 looksrange = 1
if (looksaz < 1): if (looksaz < 1):
logger.warn("Number azimuth looks less than zero, setting to 1") logger.warning("Number azimuth looks less than zero, setting to 1")
looksaz = 1 looksaz = 1
self._insar.setNumberAzimuthLooks(looksaz) self._insar.setNumberAzimuthLooks(looksaz)

View File

@ -82,10 +82,10 @@ def runPrepareResamps(self, rgLooks=None, azLooks=None):
looksaz = int(round(posting/(s2_2 - s2))) looksaz = int(round(posting/(s2_2 - s2)))
if (looksrange < 1): if (looksrange < 1):
logger.warn("Number range looks less than zero, setting to 1") logger.warning("Number range looks less than zero, setting to 1")
looksrange = 1 looksrange = 1
if (looksaz < 1): if (looksaz < 1):
logger.warn("Number azimuth looks less than zero, setting to 1") logger.warning("Number azimuth looks less than zero, setting to 1")
looksaz = 1 looksaz = 1
self._isce.numberAzimuthLooks = looksaz self._isce.numberAzimuthLooks = looksaz

View File

@ -283,7 +283,7 @@ class ALOS(Sensor):
self.imageFile.width*rangePixelSize self.imageFile.width*rangePixelSize
) )
except TypeError as strerr: except TypeError as strerr:
self.logger.warn(strerr) self.logger.warning(strerr)
self.frame.frameNumber = frame self.frame.frameNumber = frame
self.frame.setOrbitNumber( self.frame.setOrbitNumber(

View File

@ -221,7 +221,7 @@ class ERS(Sensor):
# Sometimes, the ICU on board clock is corrupt, if the time suggested by the on board clock is more than # Sometimes, the ICU on board clock is corrupt, if the time suggested by the on board clock is more than
# 5 days from the satellite clock time, assume its bogus and use the low-precision scene centre time # 5 days from the satellite clock time, assume its bogus and use the low-precision scene centre time
if (math.fabs(deltaSeconds) > 5*86400): if (math.fabs(deltaSeconds) > 5*86400):
self.logger.warn("ICU on board time appears to be corrupt, resorting to low precision clock") self.logger.warning("ICU on board time appears to be corrupt, resorting to low precision clock")
first_line_utc = centerLineTime - datetime.timedelta(microseconds=pulseInterval*(self.imageFile.length/2.0)*1e6) first_line_utc = centerLineTime - datetime.timedelta(microseconds=pulseInterval*(self.imageFile.length/2.0)*1e6)
else: else:
satelliteClockTime = datetime.datetime.strptime(self.leaderFile.sceneHeaderRecord.metadata['Satellite clock time'],"%Y%m%d%H%M%S%f") satelliteClockTime = datetime.datetime.strptime(self.leaderFile.sceneHeaderRecord.metadata['Satellite clock time'],"%Y%m%d%H%M%S%f")
@ -568,7 +568,7 @@ class ImageFile(object):
lineCounter = imageData.metadata['Image format counter'] lineCounter = imageData.metadata['Image format counter']
if (lineCounter == 0): if (lineCounter == 0):
self.logger.warn("Zero line counter at line %s" % (line+1)) self.logger.warning("Zero line counter at line %s" % (line+1))
lastLineCounter += 1 lastLineCounter += 1
continue continue

View File

@ -56,7 +56,7 @@ def force(type_):
self.__class__.__name__, self.__class__.__name__,
setter.__name__) setter.__name__)
if hasattr(self, "logger"): if hasattr(self, "logger"):
self.logger.warn(message) self.logger.warning(message)
else: else:
raise ValueError(message) raise ValueError(message)
pass pass

View File

@ -163,7 +163,7 @@ class Grass(Component):
#####Old files need to be cleaned out #####Old files need to be cleaned out
#####Otherwise will use old result #####Otherwise will use old result
if os.path.exists(flagFilename): if os.path.exists(flagFilename):
self.logger.warn('Old Mask File found. Will be deleted.') self.logger.warning('Old Mask File found. Will be deleted.')
os.remove(flagFilename) os.remove(flagFilename)
intFile_C = ctypes.c_char_p(self.interferogram.getFilename().encode('utf-8')) intFile_C = ctypes.c_char_p(self.interferogram.getFilename().encode('utf-8'))

View File

@ -88,7 +88,7 @@ IEEE Transactions on Geoscience and Remote Sensing, vol. 56, no. 8, pp. 4492-450
cd dem_3_arcsec cd dem_3_arcsec
dem.py -a stitch -b 29 37 125 133 -k -s 3 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL3.003/2000.02.11 dem.py -a stitch -b 29 37 125 133 -k -s 3 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL3.003/2000.02.11
fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f
rm *.hgt* *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml rm *.hgt *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml
cd ../ cd ../
#1 arcsec for creating differential interferogram #1 arcsec for creating differential interferogram
@ -96,7 +96,7 @@ IEEE Transactions on Geoscience and Remote Sensing, vol. 56, no. 8, pp. 4492-450
cd dem_1_arcsec cd dem_1_arcsec
dem.py -a stitch -b 29 37 125 133 -k -s 1 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL1.003/2000.02.11 dem.py -a stitch -b 29 37 125 133 -k -s 1 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL1.003/2000.02.11
fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f
rm *.hgt* *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml rm *.hgt *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml
cd ../ cd ../
#water body #water body

View File

@ -100,7 +100,7 @@ IEEE Transactions on Geoscience and Remote Sensing, vol. 56, no. 8, pp. 4492-450
cd dem_3_arcsec cd dem_3_arcsec
dem.py -a stitch -b 29 37 125 133 -k -s 3 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL3.003/2000.02.11 dem.py -a stitch -b 29 37 125 133 -k -s 3 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL3.003/2000.02.11
fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f
rm *.hgt* *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml rm *.hgt *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml
cd ../ cd ../
#1 arcsec for creating differential interferogram #1 arcsec for creating differential interferogram
@ -108,7 +108,7 @@ IEEE Transactions on Geoscience and Remote Sensing, vol. 56, no. 8, pp. 4492-450
cd dem_1_arcsec cd dem_1_arcsec
dem.py -a stitch -b 29 37 125 133 -k -s 1 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL1.003/2000.02.11 dem.py -a stitch -b 29 37 125 133 -k -s 1 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL1.003/2000.02.11
fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f
rm *.hgt* *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml rm *.hgt *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml
cd ../ cd ../
#water body #water body

View File

@ -95,7 +95,7 @@ IEEE Transactions on Geoscience and Remote Sensing, vol. 56, no. 8, pp. 4492-450
cd dem_3_arcsec cd dem_3_arcsec
dem.py -a stitch -b 29 37 125 133 -k -s 3 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL3.003/2000.02.11 dem.py -a stitch -b 29 37 125 133 -k -s 3 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL3.003/2000.02.11
fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f
rm *.hgt* *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml rm *.hgt *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml
cd ../ cd ../
#1 arcsec for creating differential interferogram #1 arcsec for creating differential interferogram
@ -103,7 +103,7 @@ IEEE Transactions on Geoscience and Remote Sensing, vol. 56, no. 8, pp. 4492-450
cd dem_1_arcsec cd dem_1_arcsec
dem.py -a stitch -b 29 37 125 133 -k -s 1 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL1.003/2000.02.11 dem.py -a stitch -b 29 37 125 133 -k -s 1 -c -f -u http://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL1.003/2000.02.11
fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f fixImageXml.py -i demLat_*_*_Lon_*_*.dem.wgs84 -f
rm *.hgt* *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml rm *.hgt *.log demLat_*_*_Lon_*_*.dem demLat_*_*_Lon_*_*.dem.vrt demLat_*_*_Lon_*_*.dem.xml
cd ../ cd ../
#water body #water body