Tsanalyzer, A Gnss Time Series Analysis Software: Gps Solutions July 2017

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/317746683

TSAnalyzer, a GNSS time series analysis software

Article in GPS Solutions · July 2017


DOI: 10.1007/s10291-017-0637-2

CITATIONS READS

21 406

3 authors:

Dingcheng Wu Haoming Yan


Chinese Academy of Sciences Institute of Geosesy and Geophysics
5 PUBLICATIONS 105 CITATIONS 41 PUBLICATIONS 450 CITATIONS

SEE PROFILE SEE PROFILE

Yingchun Shen
Sun Yat-Sen University
5 PUBLICATIONS 99 CITATIONS

SEE PROFILE

All content following this page was uploaded by Yingchun Shen on 08 November 2022.

The user has requested enhancement of the downloaded file.


GPS Solut (2017) 21:1389–1394
DOI 10.1007/s10291-017-0637-2

GPS TOOL BOX

TSAnalyzer, a GNSS time series analysis software


Dingcheng Wu1,2 • Haoming Yan1 • Yingchun Shen1,2

Published online: 24 May 2017


 Springer-Verlag Berlin Heidelberg 2017

Abstract In geodesy and geophysics, continuous GNSS Keywords TSAnalyzer  GNSS time series  Harmonic
observations have been used globally. As the number of and trend analysis  Offsets  Lomb–Scargle spectrum 
GNSS observing stations increases, GNSS time series Python
analysis software should be developed with more flexible
format support, better man–machine interaction, and robust
analysis characteristics. To meet this requirement, a new Introduction
software package called TSAnalyzer was written in Python
and was developed for preprocessing and analyzing con- Over the past decades, continuous GNSS data have been
tinuous GNSS position time series individually, as well as widely used to monitor tectonic movement and crustal
with batch processing. This software can read GNSS deformation globally. There are many high precision
position time series with different formats, pick epochs of GNSS data processing software packages, such as GIPSY–
offsets or seismic events interactively, remove outliers, and OASIS, GAMIT/GLOBK, Bernese, and Panda. However,
estimate linear, polynomial, and harmonic signals. It also only a few software packages were designed specifically
provides Lomb–Scargle spectrum analysis. Since it is for GNSS coordinates time series processing and analysis
based on Python, it is cross-platform. to meet the post-analysis requirements of many GNSS data
solutions. Among them, GGMatlab (Tsview), iGPS, Sig-
seg, and GITSAV are open source, and Analyze_tseri is an
executable program in Linux system (Goudarzi et al. 2013;
Herring 2003; Tian 2011; Vitti 2012). Despite the devel-
The GPS Tool Box is a column dedicated to highlighting algorithms opment of such software to improve GNSS time series
and source code utilized by GPS engineers and scientists. If you have processing, we feel that there is still a significant gap
an interesting program or software package, you would like to share between the software and the users’ requirements. For
with our readers, please pass it along; e-mail it to us at
[email protected]. To comment on any of the source code
example, all the above software can only deal with fixed
discussed here, or to download source code, visit our Web site at format GNSS time series and have a very limited extension
http://www.ngs.noaa.gov/gps-toolbox. This column is edited by Ste- for different input data formats. GGMatlab and GITSAV
phen Hilla, National Geodetic Survey, NOAA, Silver Spring, Mary- were written in MATLAB language, which is a commercial
land, and Mike Craymer, Geodetic Survey Division, Natural
Resources Canada, Ottawa, Ontario, Canada. software as well as iGPS, written in IDL. More impor-
tantly, none of the above packages provide a friendly,
& Haoming Yan human-interactive visualization function for offset selec-
[email protected] tion and processing. Thus, a new package is user-friendly,
1 cross-platform, format-flexible, independent of commercial
State Key Laboratory of Geodesy and Earth’s Dynamics,
Institute of Geodesy and Geophysics, Chinese Academy of software and has more powerful processing and analysis
Sciences, Wuhan 430077, China characteristics is needed for GNSS time series processing
2
University of Chinese Academy of Sciences, Beijing 100049, and analysis for geodetic and geodynamic studies and
China research. We thus developed the GNSS Time Series

123
1390 GPS Solut (2017) 21:1389–1394

Analysis and Visualization (TSAnalyzer) software written offsets, and others. TSAnalyzer can also read a variety of
in the free language of Python. time series with different data formats through the data
conversion and header comment tools in the software. In
the following sections, some key features of TSAnalyzer
Program language and installation are introduced.

TSAnalyzer was developed by using Python programming Time series visualization and interaction
language with a Qt Graphical User Interface (GUI). In the
scientific research domain, Python has become fashionable The GNSS data provided by different data centers use the
due to not only the development of scientific modules but universal RINEX format (Gurtner and Estey 2007). But
also due to the benefits of Python’s code readability and GNSS time series generally have many different data for-
development efficiency. In addition, Python is a cross- mats, which can vary from one GNSS analysis center to
platform programming language for popular operating another. Currently, the TSAnalyzer software can recognize
systems, such as Linux, Windows, and Mac. Furthermore, and support the coordinate time series products provided
by using third-party tools, Python code can be packaged by the following data centers directly:
into a stand-alone executable program for several popular
• Plate Boundary Observatory (PBO) format (.pos).
operating systems.
• NASA Jet Propulsion Laboratory (JPL) tseries format
TSAnalyzer is an open-source software and can be
(.tseries).
downloaded from https://github.com/wudingcheng/TSAna
• NEU format described in the CATS software (Williams
lyzer/. The TSAnalyzer package includes code files, icons,
2008).
examples, and documents. To install the software, the
TSAnalyzer User Manual should be carefully read and For other formats of coordinate time series, we provide a
followed. By typing ‘‘python main.py’’ in the command Header Comment Tool (HCT) to convert any input data file
line prompt or double-clicking the main.pyw (Windows to a suitable data format which can be supported by
OS), the main GUI window of TSAnalyzer will come up TSAnalyzer. More details about HCT can be found in the
(Fig. 1). software user manual and tutorials.
After a time series data file is loaded into the GUI of
TSAnalyzer, the components of the coordinate residuals
Features of TSAnalyzer can be plotted automatically in the middle dock of TSA-
nalyzer software for visualization (Fig. 1). We can do
The functions provided by TSAnalyzer include time series further useful interactive work with these coordinate fig-
visualization and interaction, least squares analysis, spec- ures, separately or together at the same time. For example,
tral analysis and human-interactive inspecting for data one of the most important key features in TSAnalyzer is its

Fig. 1 Example of TSAnalyzer


GUI. In this example, the three
position components of the
CAND GPS station daily time
series and the corresponding fit
results are displayed. The offset
information is listed in the left
bottom panel and can be
visualized as the red vertical
lines in the center of the GUI.
The blue line indicates the
mouse motion selection, and the
user can thus select any offset
point from the time series

123
GPS Solut (2017) 21:1389–1394 1391

ability to enable the user to detect and repair the data decay step functions to do accurate data analysis directly
offsets interactively. Due to an earthquake, an instrument and preliminarily and show the results in the plot window.
interruption, or any other unknown reason, generally the These new data fit models are superior to the other similar
GNSS time series will contain some data offset(s), which previous packages because these previous packages can
will unquestionably affect any further accurate post-anal- only fit linear, annual, and semi-annual signals. Further-
ysis of the data. Thus, these data offsets must be first more, TSAnalyzer provides three more useful tools for the
detected and removed. Though there are some mathemat- data preprocessing and accurate post-analysis.
ical theories and methods presented for automatically
detecting these offsets in GNSS position time series Outlier detection and removal
(Gazeaux et al. 2013; Vitti 2012), the most accurate
method for data offset detection is still manual inspection. Because of poor observing situations, and other unknown
TSAnalyzer can first allow the semi-automatic data reasons, some data outliers are usually found in the GNSS
offset detection for the input data using the sigseg method time series coordinates. To do an accurate post-analysis of
(Vitti 2012). The sigseg program is integrated into TSAn- the data, these outliers must first be correctly removed. In
alyzer by using ctypes, a package providing C compatible TSAnalyzer, there are two criterions for outlier removal:
data types and functions in DLLs or shared libraries. The (1) uncertainty criterion—which is adopted to mask out the
sigseg program uses the Blake–Zisserman and Mumford– epoch point values larger than some threshold value given
Shah model to solve the problem of data segmentation by the user, (2) mean–standard deviation and sliding win-
following a variational approach which respects the dis- dow IQR method criterion—which can be used separately
continuities of the data by preserving them from being or combined to remove the outliers. We here show an
smoothed. After the semi-automatic data offset detection, outliers detection example for the station CAND daily GPS
TSAnalyzer further enables the user to identify three types time series (north, east, and up components) in Fig. 2.
of data offsets manually, i.e., an equipment change data
offset, a data offset induced by co-seismic deformations, or Polynomial fit and harmonic analysis
a data offset caused by post-seismic relaxation with a
logarithmic or exponential decay. TSAnalyzer uses a After the outliers detection and removal, the offsets in the
JavaScript Object Notation (JSON) text format to record all time series can be removed when the user clicks the con-
these data offset events detected by the semi-automatic or tinuous radio button in the right middle dock in Fig. 1, and
manual detection method, and all the data offset events can
thus be recorded and reloaded into TSAnalyzer software
for further analysis or inspection. For example, after a
JSON offset file is reloaded, TSAnalyzer will first plot the
data offsets break times in different color lines, e.g., blue
lines stand for equipment event, and red lines mean
earthquake eruption. The user can re-inspect the data offset
figures and can also add further data offsets if the data
offset information is not complete by the first step
inspection. TSAnalyzer also allows picking data offsets
directly from the figures and/or modifying them on the
time/event named data offsets list by double-clicking on
the specific event (Fig. 1, left bottom dock).

Time series analysis model

The TSAnalyzer provides some mathematical data fit Fig. 2 Procedure of outliers removal and harmonics analysis. The
models, such as linear and polynomial fitting with auto- black, red, and green points are all raw GPS coordinates data, and
error bars are their uncertainty. The red dash lines stand for offset
BIC criterion for the best polynomial-order auto-determi-
events. The red points were recognized as outliers by uncertainty
nation, and harmonic data fits with any frequency signal criterion; the green points were identified as outliers by IQR method.
combination. TSAnalyzer also provides fit models that can The solid red lines over the black points are the fit results of trend plus
be used to combine with the exponential or logarithmic annual and semi-annual for black points

123
1392 GPS Solut (2017) 21:1389–1394

Fig. 4 Lomb–Scargle spectrum of the detrended CAND GPS time


series

parameter values and their uncertainties. The user, i.e.,


allowed to save the residuals, continuous or fitted data, the
log, and the figures to output files conveniently.

Spectral analysis

Spectral analysis is a powerful method for time series


analysis, which can estimate the spectral power at each
frequency and help to find some interesting signals in a
time series. TSAnalyzer provides the Lomb–Scargle
spectral analysis for GNSS coordinate time series. The
obvious merit of this particular spectral analysis method is
Fig. 3 Station CAND time series’ offsets repair (top) and detrended that it can evaluate the time series spectrum even with
results (bottom) unevenly sampled data or existing gaps in a time series
the black points in Fig. 2 denote the ‘‘true’’ signal of (Scargle 1982; Zechmeister and Kürster 2009). The tradi-
CAND GPS station. To show it clearly, we present the data tional FFT spectrum method cannot handle the uneven data
after the outliers and a linear trend have been removed in interval case, which is often encountered in the GNSS
Fig. 3. After the offsets repair, the CAND north and east coordinate time series. We implement the Lomb–Scargle
time series display an increase and a decrease in tectonic spectral analysis by using the Astropy’s code (Robitaille
motion, respectively, while the vertical component shows a et al. 2013). Here we take the CAND time series as an
slight uplift especially after the year 2002 (Fig. 3, top example to show the spectrum analysis results in Fig. 4.
panel). If we further detrend the result, we can see seasonal We can see clear annual and semi-annual spectrum peak
signals clearly in Fig. 3 (bottom panel). for all north, east and up components of the detrended
The seasonal signals or any other harmonic components CAND GPS time series. At the same time, there are a lot of
and long-term signals such as polynomial terms, shown in high frequency signal peaks that can be further analyzed to
Fig. 3 (bottom panel), can also be estimated in TSAna- compare with the background noise.
lyzer. The harmonic and polynomial parameters can be
accurately estimated by the weighted least squares method Batch analysis
separately or combined when the proper input settings are
determined in the right upper dock of Fig. 1. After that, the TSAnalyzer can not only visualize and analyze the time series
residuals and/or the fit lines can be shown in the plot one by one but also is equipped with a flexible batch analysis
window (Fig. 2), and a log dialog will show the fit widget for the user. Using this batching widget, the user can

123
GPS Solut (2017) 21:1389–1394 1393

analyze and plot multi-station time series at the same time, Gazeaux J et al (2013) Detecting offsets in GPS time series: first
which will maximally benefit the multi-station processing. results from the detection of offsets in GPS experiment.
J Geophys Res Solid Earth 118:2397–2407
Goudarzi MA, Cocard M, Santerre R, Woldai T (2013) GPS
interactive time series analysis software. GPS Solut
Future development 17(4):595–603
Gurtner W, Estey L (2007) RINEX-the receiver independent
exchange format-version 3.00. Astronomical Institute, Univer-
Apart from the improvements from the current modules, sity of Bern and UNAVCO, Bolulder, Colorado
some new time series analysis methods, such as Singular Herring T (2003) MATLAB tools for viewing GPS velocities and
Spectrum Analysis (SSA) and the Empirical Mode Decom- time series. GPS Solut 7:194–199
position (EMD), will be integrated into TSAnalyzer in the Peterson P (2009) F2PY: a tool for connecting Fortran and Python
programs. Int J Comput Sci Eng 4:296–305
future. Likewise, noise analysis of the GNSS coordinate time Robitaille TP et al (2013) Astropy: a community Python package for
series, common mode error analysis, spatial filtering (Dong astronomy. Astron Astrophys 558:A33
et al. 2006; Wdowinski et al. 1997; Williams 2003), and Scargle JD (1982) Studies in astronomical time series analysis. II—
Monte Carlo simulation will be developed too. The analysis statistical aspects of spectral analysis of unevenly spaced data.
Astrophys J 263:835
methods provided by TSAnalyzer are limited currently. To Tian Y (2011) iGPS: Idl tool package for GPS position time series
overcome this disadvantage, we are planning to compile the analysis. GPS Solut 15:299–303
WHIGG F90 Library (WFL, Yan et al. 2006, http://www. Tregoning P, van Dam T (2005) Atmospheric pressure loading
whigg.cn/yanhm/wfl.html) to Python WFL (PyWFL) ver- corrections applied to GPS data at the observation level.
Geophys Res Lett 32:L22310
sion by using the f2py (Peterson 2009) tool in order to enrich Vitti A (2012) Sigseg: a tool for the detection of position and velocity
its analysis methods, including filters, interpolation, back- discontinuities in geodetic time-series. GPS Solut 16:405–410
ground noise analysis, and spectrum analysis. Wdowinski S, Bock Y, Zhang J, Fang P, Genrich J (1997) Southern
None of the previous software packages mentioned California permanent GPS geodetic array: spatial filtering of
daily positions for estimating coseismic and postseismic dis-
above provide mass loading or a thermal effects correction placements induced by the 1992 Landers earthquake. J Geophys
for GPS time series. To enrich the data analysis roles of Res Solid Earth 102:18057–18070
TSAnalyzer, the atmospheric pressure loading corrections Williams SDP (2003) The effect of coloured noise on the uncertain-
(Tregoning and van Dam 2005) and thermal effects on the ties of rates estimated from geodetic time series. J Geod
76:483–494
GPS stations (Yan et al. 2009; Fang et al. 2014) are also Williams SDP (2008) CATS: GPS coordinate time series analysis
planned to be integrated into TSAnalyzer. software. GPS Solut 12:147–153
We hope that the TSAnalyzer software can benefit the Yan H, Zhong M, Zhu Y (2006) Scientific computation library
users who want to do post-analysis of GNSS coordinate WHIGG F90 LIB and it’s application in geosciences. J Geod
Geodyn 26:109–114 (in Chinese)
time series and we have thus developed it under an open- Yan H, Chen W, Zhu Y, Zhang W, Zhong M (2009) Contributions of
source framework. thermal expansion of monuments and nearby bedrock to
observed GPS height changes. Geophys Res Lett 36:L13301
Acknowledgements We are grateful to the authors mentioned above, Zechmeister M, Kürster M (2009) The generalised Lomb–Scargle
Herring, Tian, Williams, Goudarzi and Vitti, for their open source and periodogram. Astron Astrophys 496:577–584
dedication. We also want to thank the developers of Numpy, Mat-
plotlib, Astropy and so on, for their selfless contributions to the
Python community. We would like to thank the anonymous reviewer Dingcheng Wu is a Ph.D. can-
for the insightful review comments and helpful instructions. This didate in Institute of Geodesy
research is supported by research projects of the National Natural and Geophysics (IGG), Chinese
Science Foundation of China (Grants No. 41621091, 41374087, Academy of Sciences (CAS).
41504066 and 41674084). He graduated from the South-
west Petroleum University. He
is currently studying the GNSS
time series analysis.
References

Dong D, Fang P, Bock Y, Webb F, Prawirodirdjo L, Kedar S,


Jamason P (2006) Spatiotemporal filtering using principal
component analysis and Karhunen–Loeve expansion approaches
for regional GPS network analysis. J Geophys Res Solid Earth
111:B03405
Fang M, Dong D, Hager BH (2014) Displacements due to surface
temperature variation on a uniform elastic sphere with its centre
of mass stationary. Geophys J Int 196:194–203

123
1394 GPS Solut (2017) 21:1389–1394

Haoming Yan is a senior Yingchun Shen is a Ph.D. can-


research fellow in IGG, CAS. didate in Institute of Geodesy
His research activities have and Geophysics, Chinese Acad-
been mainly related to time- emy of Sciences. He received
variable gravity, climate his master’s degree in Geodesy
change, GNSS, satellite altime- at IGG, CAS. The focus of his
try, earth’s rotation and data current research lies in satellite
processing. gravity, GPS and mass loading.

123

View publication stats

You might also like