Merge branch 'master' into cmake
commit
a66dcfdb1b
|
@ -143,7 +143,7 @@ jobs:
|
|||
name: Install dependencies
|
||||
command: |
|
||||
apk add --no-cache \
|
||||
python-dev py-pip bash pigz build-base libffi-dev openssl-dev
|
||||
python3-dev py3-pip bash pigz build-base libffi-dev openssl-dev
|
||||
pip install \
|
||||
docker-compose awscli
|
||||
- run:
|
||||
|
@ -170,7 +170,7 @@ jobs:
|
|||
name: Install dependencies
|
||||
command: |
|
||||
apk add --no-cache \
|
||||
python-dev py-pip bash pigz build-base libffi-dev openssl-dev
|
||||
python3-dev py3-pip bash pigz build-base libffi-dev openssl-dev
|
||||
pip install \
|
||||
docker-compose awscli
|
||||
- run:
|
||||
|
@ -196,7 +196,7 @@ jobs:
|
|||
name: Install dependencies
|
||||
command: |
|
||||
apk add --no-cache \
|
||||
python-dev py-pip bash pigz build-base libffi-dev openssl-dev
|
||||
python3-dev py3-pip bash pigz build-base libffi-dev openssl-dev
|
||||
pip install \
|
||||
docker-compose awscli
|
||||
- run:
|
||||
|
|
|
@ -494,6 +494,10 @@ def runPreprocessor(self):
|
|||
mvel = np.array(masterSV.getVelocity())
|
||||
sxyz = np.array(slaveSV.getPosition())
|
||||
|
||||
#to fix abrupt change near zero in baseline grid. JUN-05-2020
|
||||
mvelunit = mvel / np.linalg.norm(mvel)
|
||||
sxyz = sxyz - np.dot ( sxyz-mxyz, mvelunit) * mvelunit
|
||||
|
||||
aa = np.linalg.norm(sxyz-mxyz)
|
||||
costheta = (x[1]*x[1] + aa*aa - slvrng*slvrng)/(2.*x[1]*aa)
|
||||
|
||||
|
|
|
@ -417,6 +417,10 @@ def runPreprocessor(self):
|
|||
mvel = np.array(masterSV.getVelocity())
|
||||
sxyz = np.array(slaveSV.getPosition())
|
||||
|
||||
#to fix abrupt change near zero in baseline grid. JUN-05-2020
|
||||
mvelunit = mvel / np.linalg.norm(mvel)
|
||||
sxyz = sxyz - np.dot ( sxyz-mxyz, mvelunit) * mvelunit
|
||||
|
||||
aa = np.linalg.norm(sxyz-mxyz)
|
||||
costheta = (x[1]*x[1] + aa*aa - slvrng*slvrng)/(2.*x[1]*aa)
|
||||
|
||||
|
|
|
@ -77,6 +77,8 @@ def runComputeBaseline(self):
|
|||
mxyz = np.array(masterSV.getPosition())
|
||||
mvel = np.array(masterSV.getVelocity())
|
||||
sxyz = np.array(slaveSV.getPosition())
|
||||
mvelunit = mvel / np.linalg.norm(mvel)
|
||||
sxyz = sxyz - np.dot ( sxyz-mxyz, mvelunit) * mvelunit
|
||||
|
||||
aa = np.linalg.norm(sxyz-mxyz)
|
||||
costheta = (rng*rng + aa*aa - slvrng*slvrng)/(2.*rng*aa)
|
||||
|
|
|
@ -103,6 +103,8 @@ class Baseline(Component):
|
|||
mxyz = np.array(masterSV.getPosition())
|
||||
mvel = np.array(masterSV.getVelocity())
|
||||
sxyz = np.array(slaveSV.getPosition())
|
||||
mvelunit = mvel / np.linalg.norm(mvel)
|
||||
sxyz = sxyz - np.dot ( sxyz-mxyz, mvelunit) * mvelunit
|
||||
|
||||
aa = np.linalg.norm(sxyz-mxyz)
|
||||
|
||||
|
|
|
@ -912,7 +912,8 @@ class sentinelSLC(object):
|
|||
|
||||
self.SNWE=[min(lats),max(lats),min(lons),max(lons)]
|
||||
|
||||
def get_orbit(self, orbitDir, workDir):
|
||||
def get_orbit(self, orbitDir, workDir, margin=60.0):
|
||||
margin = datetime.timedelta(seconds=margin)
|
||||
datefmt = "%Y%m%dT%H%M%S"
|
||||
orbit_files = glob.glob(os.path.join(orbitDir, self.platform + '*.EOF'))
|
||||
if len(orbit_files) == 0:
|
||||
|
@ -922,10 +923,10 @@ class sentinelSLC(object):
|
|||
for orbit in orbit_files:
|
||||
orbit = os.path.basename(orbit)
|
||||
fields = orbit.split('_')
|
||||
orbit_start_date_time = datetime.datetime.strptime(fields[6].replace('V',''), datefmt)
|
||||
orbit_stop_date_time = datetime.datetime.strptime(fields[7].replace('.EOF',''), datefmt)
|
||||
orbit_start_date_time = datetime.datetime.strptime(fields[6].replace('V',''), datefmt) + margin
|
||||
orbit_stop_date_time = datetime.datetime.strptime(fields[7].replace('.EOF',''), datefmt) - margin
|
||||
|
||||
if self.start_date_time > orbit_start_date_time and self.start_date_time < orbit_stop_date_time:
|
||||
if self.start_date_time >= orbit_start_date_time and self.stop_date_time < orbit_stop_date_time:
|
||||
self.orbit = os.path.join(orbitDir,orbit)
|
||||
self.orbitType = 'precise'
|
||||
match = True
|
||||
|
@ -944,7 +945,7 @@ class sentinelSLC(object):
|
|||
fields = os.path.basename(orbitFile).split('_')
|
||||
orbit_start_date_time = datetime.datetime.strptime(fields[6].replace('V',''), datefmt)
|
||||
orbit_stop_date_time = datetime.datetime.strptime(fields[7].replace('.EOF',''), datefmt)
|
||||
if self.start_date_time > orbit_start_date_time and self.start_date_time < orbit_stop_date_time:
|
||||
if self.start_date_time >= orbit_start_date_time and self.stop_date_time < orbit_stop_date_time:
|
||||
print ("restituted orbit already exists.")
|
||||
self.orbit = orbitFile
|
||||
self.orbitType = 'restituted'
|
||||
|
|
|
@ -38,9 +38,11 @@ def FileToTimeStamp(safename):
|
|||
'''
|
||||
safename = os.path.basename(safename)
|
||||
fields = safename.split('_')
|
||||
sstamp = [] # sstamp for getting SAFE file start time, not needed for orbit file timestamps
|
||||
|
||||
try:
|
||||
tstamp = datetime.datetime.strptime(fields[-4], datefmt)
|
||||
sstamp = datetime.datetime.strptime(fields[-5], datefmt)
|
||||
except:
|
||||
p = re.compile(r'(?<=_)\d{8}')
|
||||
dt2 = p.search(safename).group()
|
||||
|
@ -48,7 +50,7 @@ def FileToTimeStamp(safename):
|
|||
|
||||
satName = fields[0]
|
||||
|
||||
return tstamp, satName
|
||||
return tstamp, satName, sstamp
|
||||
|
||||
|
||||
class MyHTMLParser(HTMLParser):
|
||||
|
@ -144,7 +146,7 @@ if __name__ == '__main__':
|
|||
|
||||
inps = cmdLineParse()
|
||||
|
||||
fileTS, satName = FileToTimeStamp(inps.input)
|
||||
fileTS, satName, fileTSStart = FileToTimeStamp(inps.input)
|
||||
print('Reference time: ', fileTS)
|
||||
print('Satellite name: ', satName)
|
||||
|
||||
|
@ -198,7 +200,7 @@ if __name__ == '__main__':
|
|||
for result in results:
|
||||
tbef, taft, mission = fileToRange(os.path.basename(result))
|
||||
|
||||
if (tbef <= fileTS) and (taft >= fileTS):
|
||||
if (tbef <= fileTSStart) and (taft >= fileTS):
|
||||
datestr2 = FileToTimeStamp(result)[0].strftime(queryfmt2)
|
||||
match = (server2 + spec[1].replace('aux_', '').upper() +
|
||||
'/' +datestr2+ result + '.EOF')
|
||||
|
|
|
@ -193,6 +193,12 @@ def adjustCommonValidRegion(master,slave):
|
|||
master.firstValidLine = max(master.firstValidLine, slave.firstValidLine)
|
||||
master.firstValidSample = max(master.firstValidSample, slave.firstValidSample)
|
||||
|
||||
#set to 0 to avoid negative values
|
||||
if master.firstValidLine<0:
|
||||
master.firstValidLine=0
|
||||
if master.firstValidSample<0:
|
||||
master.firstValidSample=0
|
||||
|
||||
master.numValidLines = igram_lastValidLine - master.firstValidLine + 1
|
||||
master.numValidSamples = igram_lastValidSample - master.firstValidSample + 1
|
||||
|
||||
|
|
|
@ -21,7 +21,8 @@ propagate=0
|
|||
class=handlers.RotatingFileHandler
|
||||
formatter=simpleFormatter
|
||||
# Filename, file mode, maximum file size in bytes,number of backups to keep
|
||||
args=('isce.log','a',1048576,5)
|
||||
# encoding, delay
|
||||
args=('isce.log','a',1048576,5,None,True)
|
||||
|
||||
[handler_consoleHandler]
|
||||
class=StreamHandler
|
||||
|
|
|
@ -92,7 +92,15 @@ in the data. Normally we only process HH polarization, so you can only extract H
|
|||
zip files to save space. If you want to process other polarizations, extract those polarization instead.
|
||||
|
||||
2. DEM and water body
|
||||
If you only process one InSAR pair, there is no need to download DEM and water body. The program will
|
||||
|
||||
You MUST FIRST have an account to download DEM and water body, no matter you download them manually or let
|
||||
the program download them automatically. See
|
||||
https://github.com/isce-framework/isce2#notes-on-digital-elevation-models
|
||||
or
|
||||
https://github.com/isce-framework/isce2
|
||||
for more details.
|
||||
|
||||
If you only process one InSAR pair, there is no need to download DEM and water body manually. The program will
|
||||
do it for you. However, if you want to process a stack of interferograms, we recommend downloading DEM
|
||||
and water body by yourself and set the parameters in the input file; otherwise, the program will download
|
||||
DEM and water body each time it processes a pair. See input file on how to download DEM and water
|
||||
|
|
Loading…
Reference in New Issue