Skip to content

Commit

Permalink
attempt to (manually) merge (#31)
Browse files Browse the repository at this point in the history
* 1 reload patches (#6)

* Add option to restart processing

* Update .gitignore

* Add some testing print statements

* Add xarray

* Allow storing and loading of patches

* 3 aggressive nullification (#7)

* Add reset nulls script

* Add aggressive nullifying, nullmask and null both

* Add remove noloops script

* Add backup unnulled data option

* 2 add in polymask option (#8)

* Add def polymask

* Add polyclipping, using inverted polymask

* 4 coherence masking (#9)

* Add option to plot coherence

* Update with qi's networks, and log scales ofr coherence

* And poly mask and coherence masking

* supervised autocorrection

correcting some of typos etc.

* trying fix permissions from windows

* Allow polyclips and range_str to be used

* Add print statement in case no patches are found

* 12 clip05 bugs (#13)

* Add check for -r, -g or -p

* Add rangestr for polyclip

* Set coherence to 0 rather than NaN

* Invert bool mask

* Always use a bool mask

* 12 clip05 bugs (#14)

* Add check for -r, -g or -p

* Add rangestr for polyclip

* Set coherence to 0 rather than NaN

* Invert bool mask

* Always use a bool mask

* Drop try/finally statements when clipping

* Update LiCSBAS13_sb_inv.py

fixed bug (cumfile definition)

* bug fix LiCSBAS01

* regular update

* Unwrapping correction

* cum2vel_weighted

* 130_sb_inv to allow for user defined ifg list
133 to recalculate stats and make final cum.h5

* make a cum from epoch data

* densify network from a given ifg list by adding a target number of new ifgs

* choose reference from 4 proxies

* remove reference effect

* graph theory and some io changes

* added functional LiCSBAS02to05

* regular update

* updated permissions

* updated reqs (networkx)

* Update environment.yml

* added snaphu to binder

* set OMP_NUM_THREADS to 1

* Update LiCSBAS12_loop_closure.py

* Update environment.yml

removed faulty pip install of licsar_extra... keep it manually then

* Update LiCSBAS_meta.py

bug fix

* Update postBuild

tutorial: prepare also preprocessed data (TS folder)

* Update postBuild

* Update postBuild

* Update licsbas_tutorial.ipynb

minor edit

* Update licsbas_tutorial.ipynb

---------

Co-authored-by: JackDMcGrath <[email protected]>
Co-authored-by: laz048 <[email protected]>
Co-authored-by: Lin Shen
Co-authored-by: qi-ou <[email protected]>
Co-authored-by: qi-ou <[email protected]>
  • Loading branch information
5 people authored Sep 6, 2023
1 parent c5b5db5 commit b866a1a
Show file tree
Hide file tree
Showing 37 changed files with 6,081 additions and 978 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,5 @@ venv.bak/
.idea/modules.xml
.idea/vcs.xml
.idea/workspace.xml

.vscode/
1 change: 1 addition & 0 deletions LiCSBAS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ dependencies:
- shapely
- statsmodels
- colorcet
- xarray
36 changes: 31 additions & 5 deletions LiCSBAS_lib/LiCSBAS_io_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ def make_geotiff(data, latn_p, lonw_p, dlat, dlon, outfile, compress_option, nod
dtype = gdal.GDT_Float32
elif data.dtype == np.uint8:
dtype = gdal.GDT_Byte
else:
print('error with the data format - neither float nor int')
return

driver = gdal.GetDriverByName('GTiff')
outRaster = driver.Create(outfile, width, length, 1, dtype, options=compress_option)
Expand Down Expand Up @@ -144,6 +147,8 @@ def read_bperp_file(bperp_file, imdates):
### Determine type of bperp_file; old or not
with open(bperp_file) as f:
line = f.readline().split() #list
if not line[0].startswith("2"):
line = f.readline().split() # find first line that starts with '2'

if len(line) == 4: ## new format
bperp_dict[line[0]] = '0.00' ## single prime. unnecessary?
Expand Down Expand Up @@ -209,15 +214,15 @@ def read_ifg_list(ifg_listfile):
ifgdates = []
f = open(ifg_listfile)
line = f.readline()

while line:
ifgd = line.split()[0]
if ifgd == "#":
if line[0] == "2":
ifgd = line.split()[0]
ifgdates.append(str(ifgd))
line = f.readline()
continue # Comment
else:
ifgdates.append(ifgd)
line = f.readline()
f.close()
continue

return ifgdates

Expand All @@ -237,3 +242,24 @@ def get_param_par(mlipar, field):
value = subp.check_output(['grep', field,mlipar]).decode().split()[1].strip()
return value


#%%
def read_residual_file(resid_file):
"""
# RMS of residual (in number of 2pi)
20141018_20141205 0.07
...
20220720_20220801 0.06
RMS_mode: 0.05
RMS_median: 0.10
RMS_mean: 0.13
RMS_thresh: 0.20
"""
ifg_list = []
residual_list = []
with open(resid_file) as f:
for l in f:
if l.startswith("2"):
ifg_list.append(l.split()[0])
residual_list.append(float(l.split()[1]))
return ifg_list, residual_list
9 changes: 9 additions & 0 deletions LiCSBAS_lib/LiCSBAS_meta.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# version control
ver='1.14.2 (dev)'
date='2023-06-28'
author="Dr. Yu Morishita and COMET dev team (ML,QO,JM,LS,..)"

# setting number of threads to small number (e.g. 1), as the multiprocessing appears slow otherwise
# solution found by Richard Rigby, Uni of Leeds
import os
os.environ["OMP_NUM_THREADS"] = '1'
Loading

0 comments on commit b866a1a

Please sign in to comment.