matthew-gaddes / licsalert Goto Github PK
View Code? Open in Web Editor NEWVolcano monitoring using Sentinel-1 InSAR data
License: GNU General Public License v3.0
Volcano monitoring using Sentinel-1 InSAR data
License: GNU General Public License v3.0
Hi Mathew,
I think my test example is not working. I used LICSBAS output but I don't know why there is an error in the output
I used your example to get output. Your example dataset works without any problem. I really appreciate it if you can help me regarding this issue. the same issue has happened with ICASAR example_spatial_02.py with a new dataset from LICSBAS!
best,
Mohammad
the code is
import sys
import pickle
from pathlib import Path
import copy
import numpy as np
sys.path.append("./lib")
from LiCSAlert_functions import LiCSAlert_batch_mode
LiCSBAS_out_folder_campi_flegrei = Path('./010D_11455_131313')
sys.path.append(str(ICASAR_path)) # Add ICASAR to the path so we can use one of its functions.
from ICASAR_functions import LiCSBAS_to_ICASAR # which is for importing time series processed by LiCSBAS.
LiCSAlert_settings = {"n_baseline_end" : 55, # n_ifgs that are used in the baseline stage (i.e. by ICASAR)
"out_folder" : "LiCSAlert_03_Campi_Flegrei", # no spaces, snake or camel case
"run_ICASAR" : True, # If False, attempt to load results from previous run. If True, run (which can be slow)
"intermediate_figures" :True, # if set to True, a figure is produced for all time steps in the monitoring data, which can be time consuming.
"downsample_run" : 1., # data can be downsampled to speed things up
"downsample_plot" : 0.5} # and a 2nd time for fast plotting. Note this is applied to the restuls of the first downsampling, so is compound
ICASAR_settings = {"n_comp" : 5, # number of components to recover with ICA (ie the number of PCA sources to keep)
"bootstrapping_param" : (200, 0), # (number of runs with bootstrapping, number of runs without bootstrapping) "hdbscan_param" : (35, 10), # (min_cluster_size, min_samples)
"tsne_param" : (30, 12), # (perplexity, early_exaggeration)
"ica_param" : (1e-2, 150), # (tolerance, max iterations)
"hdbscan_param" : (100,10), # (min_cluster_size, min_samples) Discussed in more detail in Mcinnes et al. (2017). min_cluster_size sets the smallest collection of points that can be considered a cluster. min_samples sets how conservative the clustering is. With larger values, more points will be considered noise.
"create_all_ifgs_flag" : True, # small signals are hard for ICA to extact from time series, so make it easier by creating all possible long temporal baseline ifgs from the incremental data.
"load_fastICA_results" : False, # If all the FastICA runs already exisit, setting this to True speeds up ICASAR as they don't need to be recomputed.
"figures" : "png+window"} # if png, saved in a folder as .png. If window, open as interactive matplotlib figures,
displacement_r2, tbaseline_info = LiCSBAS_to_ICASAR(LiCSBAS_out_folder_campi_flegrei,filtered=True, figures=True,return_r3=True) # open various LiCSBAS products, spatial ones in displacement_r2, temporal ones in tbaseline_info
displacement_r2['ifg_dates'] = tbaseline_info['ifg_dates'] # Unlike ICASAR, LiCSAlert always needs the ifg_dates too.
LiCSAlert_batch_mode(displacement_r2, ICASAR_settings = ICASAR_settings, **LiCSAlert_settings, ICASAR_path = ICASAR_path)
The output
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-maref'
Traceback (most recent call last):
File "./LiCSAlert_batch_mode_examples.py", line 106, in <module>
displacement_r2, tbaseline_info = LiCSBAS_to_ICASAR(LiCSBAS_out_folder_campi_flegrei,filtered=True, figures=True,return_r3=True) # open various LiCSBAS products, spatial ones in displacement_r2, temporal ones in tbaseline_info
File "/raid-manaslu/maref/Software/ICASAR/lib/ICASAR_functions.py", line 581, in LiCSBAS_to_ICASAR
displacement_r2['incremental'], _ = rank3_ma_to_rank2(displacement_r3['incremental']) # also convert incremental, no need to also get mask as should be same as above
File "/raid-manaslu/maref/Software/ICASAR/lib/ICASAR_functions.py", line 432, in rank3_ma_to_rank2
ifgs_r3_consistent = ma.array(ifgs_r3, mask = ma.repeat(mask_coh_water_consistent[np.newaxis,], n_ifgs, axis = 0)) # mask with the new consistent mask
File "/raid-manaslu/maref/Software/anaconda3/envs/myisceenv/lib/python3.8/site-packages/numpy/ma/core.py", line 6559, in array
return MaskedArray(data, mask=mask, dtype=dtype, copy=copy,
File "/raid-manaslu/maref/Software/anaconda3/envs/myisceenv/lib/python3.8/site-packages/numpy/ma/core.py", line 2909, in __new__
raise MaskError(msg % (nd, nm))
numpy.ma.core.MaskError: Mask and data not compatible: data size is 2788668, mask si
```ze is 108.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.