Codes to perform Dynamic Time Warping Based Hierarchical Agglomerative Clustering of GPS data
Project description
Dynamic Time Warping based Hierarchical Agglomerative Clustering
Codes to perform Dynamic Time Warping Based Hierarchical Agglomerative Clustering of GPS data
Details
This package include codes for processing the GPS displacement data including least-square modelling for trend, co-seismic jumps, seasonal and tidal signals. Finally, it can be used to cluster the GPS displacements based on the similarity of the waveforms. The similarity among the waveforms will be obtained using the DTW distance.
Usage
Least-squares modeling
from dtwhaclustering.leastSquareModeling import lsqmodeling
final_dU, final_dN, final_dE = lsqmodeling(dUU, dNN, dEE,stnlocfile="helper_files/stn_loc.txt", plot_results=True, remove_trend=False, remove_seasonality=True, remove_jumps=False)
Plot station map
from dtwhaclustering import plot_stations
plot_stations.plot_station_map(station_data = 'helper_files/selected_stations_info.txt', outfig=f'{outloc}/station_map.pdf')
Plot linear trend
slopeFile=f'stn_slope_res_U.txt'
df = pd.read_csv(slopeFile, names=['stn','lon','lat','slope'], delimiter='\s+')
plot_linear_trend_on_map(df, outfig=f"Maps/slope-plot_U.pdf")
Note: slopeFile
is obtained from lsqmodeling
.
License
© 2021 Utpal Kumar
Licensed under the Apache License, Version 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dtwhaclustering-1.0.7.tar.gz
(15.7 kB
view hashes)
Built Distribution
Close
Hashes for dtwhaclustering-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1995ace2507b43e97716b7ce457059e700b70c74798f4bb2524562b173082621 |
|
MD5 | 88de4431fc775b2bf9adc16651a9561f |
|
BLAKE2b-256 | 28b29c4094540e69bd1f911aec2e9bc1f57b05c915d9f3341617099a71bc366b |