update ALOS-2 ionospheric correction
parent
fba6542a10
commit
62726a5714
|
@ -80,11 +80,17 @@ def runIonFilt(self):
|
||||||
cor[np.nonzero(cor<0)] = 0.0
|
cor[np.nonzero(cor<0)] = 0.0
|
||||||
cor[np.nonzero(cor>1)] = 0.0
|
cor[np.nonzero(cor>1)] = 0.0
|
||||||
|
|
||||||
|
#remove water body
|
||||||
|
wbd = np.fromfile('wbd'+ml2+'.wbd', dtype=np.int8).reshape(length, width)
|
||||||
|
cor[np.nonzero(wbd==-1)] = 0.0
|
||||||
|
|
||||||
|
#remove small values
|
||||||
|
cor[np.nonzero(cor<corThresholdAdj)] = 0.0
|
||||||
|
|
||||||
#compute ionosphere
|
#compute ionosphere
|
||||||
fl = SPEED_OF_LIGHT / self._insar.subbandRadarWavelength[0]
|
fl = SPEED_OF_LIGHT / self._insar.subbandRadarWavelength[0]
|
||||||
fu = SPEED_OF_LIGHT / self._insar.subbandRadarWavelength[1]
|
fu = SPEED_OF_LIGHT / self._insar.subbandRadarWavelength[1]
|
||||||
adjFlag = 1
|
adjFlag = 1
|
||||||
cor[np.nonzero(cor<corThresholdAdj)] = 0.0
|
|
||||||
ionos = computeIonosphere(lowerUnw, upperUnw, cor**corOrderAdj, fl, fu, adjFlag, 0)
|
ionos = computeIonosphere(lowerUnw, upperUnw, cor**corOrderAdj, fl, fu, adjFlag, 0)
|
||||||
|
|
||||||
#dump ionosphere
|
#dump ionosphere
|
||||||
|
@ -131,13 +137,13 @@ def runIonFilt(self):
|
||||||
# 1 is not good for low coherence case, changed to 20
|
# 1 is not good for low coherence case, changed to 20
|
||||||
#corOrderFit = 1
|
#corOrderFit = 1
|
||||||
corOrderFit = 20
|
corOrderFit = 20
|
||||||
corOrderFilt = 20
|
corOrderFilt = 14
|
||||||
else:
|
else:
|
||||||
#parameters for using lower/upper band coherence
|
#parameters for using lower/upper band coherence
|
||||||
corfile = subbandPrefix[0]+ml2+'.cor'
|
corfile = subbandPrefix[0]+ml2+'.cor'
|
||||||
corThresholdFit = 0.4
|
corThresholdFit = 0.4
|
||||||
corOrderFit = 10
|
corOrderFit = 10
|
||||||
corOrderFilt = 10
|
corOrderFilt = 4
|
||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
|
@ -166,6 +172,10 @@ def runIonFilt(self):
|
||||||
cor[np.nonzero(cor<0)] = 0.0
|
cor[np.nonzero(cor<0)] = 0.0
|
||||||
cor[np.nonzero(cor>1)] = 0.0
|
cor[np.nonzero(cor>1)] = 0.0
|
||||||
|
|
||||||
|
#remove water body
|
||||||
|
wbd = np.fromfile('wbd'+ml2+'.wbd', dtype=np.int8).reshape(length, width)
|
||||||
|
cor[np.nonzero(wbd==-1)] = 0.0
|
||||||
|
|
||||||
# #applying water body mask here
|
# #applying water body mask here
|
||||||
# waterBodyFile = 'wbd'+ml2+'.wbd'
|
# waterBodyFile = 'wbd'+ml2+'.wbd'
|
||||||
# if os.path.isfile(waterBodyFile):
|
# if os.path.isfile(waterBodyFile):
|
||||||
|
|
|
@ -25,6 +25,7 @@ def runIonUwrap(self):
|
||||||
|
|
||||||
masterTrack = self._insar.loadTrack(master=True)
|
masterTrack = self._insar.loadTrack(master=True)
|
||||||
slaveTrack = self._insar.loadTrack(master=False)
|
slaveTrack = self._insar.loadTrack(master=False)
|
||||||
|
wbdFile = os.path.abspath(self._insar.wbd)
|
||||||
|
|
||||||
from isceobj.Alos2Proc.runIonSubband import defineIonDir
|
from isceobj.Alos2Proc.runIonSubband import defineIonDir
|
||||||
ionDir = defineIonDir()
|
ionDir = defineIonDir()
|
||||||
|
@ -40,6 +41,7 @@ def runIonUwrap(self):
|
||||||
############################################################
|
############################################################
|
||||||
from isceobj.Alos2Proc.Alos2ProcPublic import create_xml
|
from isceobj.Alos2Proc.Alos2ProcPublic import create_xml
|
||||||
from contrib.alos2proc.alos2proc import look
|
from contrib.alos2proc.alos2proc import look
|
||||||
|
from isceobj.Alos2Proc.Alos2ProcPublic import waterBodyRadar
|
||||||
|
|
||||||
ml2 = '_{}rlks_{}alks'.format(self._insar.numberRangeLooks1*self._insar.numberRangeLooksIon,
|
ml2 = '_{}rlks_{}alks'.format(self._insar.numberRangeLooks1*self._insar.numberRangeLooksIon,
|
||||||
self._insar.numberAzimuthLooks1*self._insar.numberAzimuthLooksIon)
|
self._insar.numberAzimuthLooks1*self._insar.numberAzimuthLooksIon)
|
||||||
|
@ -69,6 +71,14 @@ def runIonUwrap(self):
|
||||||
# look(wbdOutFile, 'wbd'+ml2+'.wbd', width, self._insar.numberRangeLooksIon, self._insar.numberAzimuthLooksIon, 0, 0, 1)
|
# look(wbdOutFile, 'wbd'+ml2+'.wbd', width, self._insar.numberRangeLooksIon, self._insar.numberAzimuthLooksIon, 0, 0, 1)
|
||||||
# create_xml('wbd'+ml2+'.wbd', width2, length2, 'byte')
|
# create_xml('wbd'+ml2+'.wbd', width2, length2, 'byte')
|
||||||
|
|
||||||
|
#water body
|
||||||
|
if k == 0:
|
||||||
|
look(os.path.join(fullbandDir, self._insar.latitude), 'lat'+ml2+'.lat', width, self._insar.numberRangeLooksIon, self._insar.numberAzimuthLooksIon, 3, 0, 1)
|
||||||
|
look(os.path.join(fullbandDir, self._insar.longitude), 'lon'+ml2+'.lon', width, self._insar.numberRangeLooksIon, self._insar.numberAzimuthLooksIon, 3, 0, 1)
|
||||||
|
create_xml('lat'+ml2+'.lat', width2, length2, 'double')
|
||||||
|
create_xml('lon'+ml2+'.lon', width2, length2, 'double')
|
||||||
|
waterBodyRadar('lat'+ml2+'.lat', 'lon'+ml2+'.lon', wbdFile, 'wbd'+ml2+'.wbd')
|
||||||
|
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# STEP 2. compute coherence
|
# STEP 2. compute coherence
|
||||||
|
|
Loading…
Reference in New Issue