forked from insarlab/MintPy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request insarlab#1 from hfattahi/master
Update from original
- Loading branch information
Showing
83 changed files
with
3,512 additions
and
2,682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#! /usr/bin/env python | ||
|
||
import os | ||
import sys | ||
from numpy import * | ||
import h5py | ||
from pysar import _readfile | ||
from pysar import _writefile | ||
|
||
def main(argv): | ||
try: | ||
dem_file = argv[1] | ||
dem_error = argv[2] | ||
except: | ||
print ''' | ||
******************************************* | ||
Usage: correct_dem.py demFile geo_demErrorFile | ||
Example: | ||
correct_dem.py $DEMDIR/Socorro-30/Socorro_30.dem geo_DEM_error.h5 | ||
correct_dem.py $DEMDIR/Socorro-30/Socorro_30.dem geo_DEM_error.h5 | ||
******************************************* | ||
''' | ||
sys.exit(1) | ||
|
||
|
||
|
||
dem, demrsc = _readfile.read_dem(dem_file) | ||
g = h5py.File(dem_error,'r') | ||
dset = g['dem'].get('dem') | ||
dem_error = dset[0:dset.shape[0]] | ||
|
||
print 'Correcting the DEM' | ||
sum = dem + dem_error | ||
print 'Creating the new DEM' | ||
_writefile.write_dem(sum,'DEM_w_error.dem') | ||
|
||
rsc_file = open('DEM_w_error.dem.rsc','w') | ||
for k in demrsc.keys(): | ||
rsc_file.write(k+' '+demrsc[k]+'\n') | ||
rsc_file.close | ||
|
||
date12_file=open('111111-222222_baseline.rsc','w') | ||
date12_file.write('P_BASELINE_TOP_ODR'+' '+ '000') | ||
date12_file.close | ||
|
||
########## | ||
if __name__ == '__main__': | ||
main(sys.argv[:]) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.