Getting started¶
Prerequisites¶
You need Python version 3.6 or later. You can find it at https://www.python.org or https://www.anaconda.com.
Installation¶
Note
As of version 4.2.0, you must install the desired qt binding yourself (needed for the GUI to work). Supported packages are: PyQt5, Pyside2, PyQt4 and Pyside. See installation instructions below.
QATS is installed from PyPI by using pip:
pip install qats
In order to use the GUI, you must also install a Python package with qt bindings (here, PyQt5 is used as an example):
pip install pyqt5
Supported qt bindings are: PyQt5, Pyside2, PyQt4 and Pyside.
Now you should be able to import the package in the Python console
>>> import qats
>>> help(qats)
Help on package qats:
NAME
qats - Library for efficient processing and visualization of time series.
PACKAGE CONTENTS
app (package)
cli
fatigue
gumbel
gumbelmin
rainflow
readers (package)
signal
stats
ts
tsdb
weibull
...
...
>>>
and the command line interface (CLI).
qats -h
usage: qats [-h] [--version] {app,config} ...
QATS is a library and desktop application for time series analysis
optional arguments:
-h, --help show this help message and exit
--version Package version
Commands:
{app,config}
app Launch the desktop application
config Configure the package
You can also add shortcuts for the QATS GUI to your start menu and desktop.
qats config --link-app
Your first script¶
Import the time series database, load data to it from file and plot it all.
1"""
2Example of using the time series database class
3"""
4import os
5from qats import TsDB
6
7db = TsDB()
8
9# locate time series file
10file_name = os.path.join("..", "..", "..", "data", "mooring.ts")
11
12# load time series from file
13db.load([file_name])
14
15# plot everything on the file
16db.plot()
17
Take a look at Code examples and the API Reference to learn how to use QATS and build it into your code.