Skip to main content

gravitools

A collection of tools to analyze gravimeter data.

This Python package is a collaborative effort by the gravity metrology group at the German Federal Agency for Carthography and Geoesy (BKG) and the hydrology section at GFZ Helmholtz Centre for Geosciences.

When used or referenced, please cite as follows:

"Glässel, Julian; Reich, Marvin (2025): gravitools - A collection of tools to analyze gravimeter data. GFZ Data Services. https://doi.org/10.5880/GFZ.RDOQ.2025.001"

Features

  • Read and process raw data of the Exail Absolute Quantum Gravimeter (AQG)
  • Apply standardized or customized AQG data processing and outlier detection
  • Read and write processed datasets with metadata to .nc-files in NETCDF4-format
  • Handle Earth orientation parameters (EOP) from iers.org for polar motion correction
  • Evaluate tilt calibration measurements and Coriolis effect estimations
  • Visualize data with matplotlib
  • CLI for standard processing of AQG raw data to .nc-file
  • Dashboard for real-time processing and visualization during measurements (on AQG laptop)
  • Dashboard includes a proposed standard template for a measurement protocol
  • Tilt calibration analysis via dashboard
  • Coriolis effect measurements analysis via dashboard
  • Collimator scan analysis via dashboard
  • Maintenance views of internal components and logfiles via dashboard
  • Compatible with the new AQG GUI >= 2.0 (and the partly new structure of the raw data files)
  • Creation of PDF-reports for all of the above standard analysis

Planned

  • Handling of Scintrex CG6 data and standard analyses (to be evaluated)
  • Including on-the-fly tide time series generation
  • Approach to combine (and store) North/South AQG measurements

Dependencies

Optional

AQG dashboard

Documentation

Unit tests

Installation

As for all python packages, we recommend installing into a virtual environment (to conserve system integrity as for python installs). This is especially true if you plan on using the GUI directly on the AQG laptop. If you use or plan to use different python verions, we recommend pyenv. Otherwise, the standard python-provided method works as follows:

    # setup
    $ python -m venv nameOfEnvironment

    # activate (Windows)
    $ nameOfEnvironment\Scripts\activate

    # activate (Linux/Mac)
    $ source nameOfEnvironment/bin/activate

Then proceed to install as described below.

For the latest stable release, install from PyPI.org

    $ pip install gravitools

or via conda-forge

    $ conda install gravitools --channel conda-forge

For the latest (development) version, install from Git repository

    $ pip install git+https://gitlab.opencode.de/bkg/gravitools.git

For further install instructions please see the respective section in the documentation.

Important note

after successfuly installation, please run the commandline command download_eop_data. This will download necessary Earth Orientation Data (EOP) to a local directory. Without this data, the package will not work properly. You can also do this download manually, please see the EOP documenation.

Getting started with AQG data processing

An extensive overview is provided in the official documentation.

Example usage:

    from gravitools.aqg import read_aqg_raw_dataset

    # Read raw data to an AQGRawData object (which wraps a pandas.DataFrame)
    raw = read_aqg_raw_dataset("20240620_163341.zip")

    # Apply standard processing
    raw.process()

    # Finalize processing by converting to an AQGDataset (which wraps an
    # xarray.Dataset)
    dataset = raw.to_dataset()

    # Save processed dataset to file in NETCDF-4 format
    dataset.to_nc("20240620_163341.nc")

    # Generate and save a measurement report in PDF format
    dataset.save_report("report_20240620_163341.pdf")

AQG dashboard

The AQG dashboard is a graphical user application to process and visualize AQG datasets. It was primarily included with the intention to run on the AQG control laptop and expand upon the control software by providing additional data processing (such as outlier removal) and preliminary results for a running measurement in oder to enhance the operator's ability to monitor data quality (especially for field measurements). For instance, it helps the operator decide the minimum required measurement duration. The dashboard can also be used to process completed datasets. With the recent version, it is now also possible to process datasets for tilt calibration, coriolis evaluation and collimator scans. Furthermore, a protocol tab was included that provides the possibility to carry out documentation on the measurement directly.

More information on this, including all offered options, are addressed in the documentation.

To use the dashboard, install gravitools with the optional dependencies for the dashboard, preferably in an isolated virtual environment.

    $ pip install 'gravitools[dashboard]'

or via conda-forge

    $ conda install gravitools-dashboard --channel conda-forge

Run the dashboard

    $ gt-aqg-dash

First installation / usage of dashboard

If an error is shown when starting the dashboard This application failed to start because no Qt platform plugin could be initialized., there is a missing development library of the underlying operating system (usually Linux Debian). Install the missing library via the command below:

    $ sudo apt-get install -y libxcb-cursor-dev

Documentation

The official, stable documenation is available at gravitools.readthedocs.io/stable/.

There is also up-to-date documentation of the develoment version which is build on the git respository here.

To build the documentation, clone the repository and install gravitools with the necessary dependencies into a virtual environment.

    $ git clone https://gitlab.opencode.de/bkg/gravitools.git
    $ cd gravitools/
    $ python -m venv venv
    $ source venv/bin/activate
    $ pip install -e .[docs]

Build the documentation (jupyter notebooks have to be converted first):

    $ jupyter nbconvert --to markdown --execute docs/aqg_1_raw.ipynb --output-dir docs/
    $ jupyter nbconvert --to markdown --execute docs/aqg_2_nc.ipynb --output-dir docs/
    $ jupyter nbconvert --to markdown --execute docs/aqg_cmd.ipynb --output-dir docs/
    $ jupyter nbconvert --to markdown --execute docs/aqg_tilt_calib.ipynb --output-dir docs/
    $ jupyter nbconvert --to markdown --execute docs/aqg_coriolis_calib.ipynb --output-dir docs/
    $ zensical build --clean

The documentation can be accessed at public/index.html.

Metadata

Release files for gravitools 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gravitools 0.3.0
File Size Uploaded
gravitools-0.3.0.tar.gz 88.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gravitools 0.3.0
File Interpreter ABI Platform
gravitools-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 173.3 kB

Release files / gravitools-0.3.0.tar.gz

Download URL gravitools-0.3.0.tar.gz
Size 88.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5c3cb4e83b7dc634f7302d3e480fc02f0eec02ef365e82d877476e9055da8f28
BLAKE2b-256 checksum
How to use checksums
67d71b1de275b50d4f71a1c8705e5d50e5f0760f86d212fa79ed37e93630c8ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / gravitools-0.3.0-py3-none-any.whl

Download URL gravitools-0.3.0-py3-none-any.whl
Size 84.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e990f233dd82deda68068319dc81e7b7dc2f0085b2d41723aaa4c27530d9a826
BLAKE2b-256 checksum
How to use checksums
a0e558dd669b185a1d30f2f918c9cd63fcfa41d822ff835a142ef22e86399c74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page