Skip to main content

Welcome to GSpy: Geophysical Data Standard in Python

This package provides functions and workflows for standardizing geophysical datasets based on the NetCDF file format. The current implementation supports both time and frequency domain electromagnetic data, raw and processed, 1-D inverted models along flight lines, and 2-D/3-D gridded layers.

Suggested Citations

If you use this software to generate gspy conformant data we suggest citing the software itself.

Foks, N.L., James, S. R., and Minsley, B. J. 2022. GSPy: Geophysical Data Standard in Python. U.S. Geological Survey software release. doi:10.5066/P9XNQVGQ

The manuscript accompanying this software release defining the standard itself you can also cite the following.

James, S. R., Foks, N.L., and Minsely, B. J. 2022. GSPy: A new toolbox and data standard for Geophysical Datasets. Frontiers in Earth Science. 10. doi:10.3389/feart.2022.907614

Documentation

Documentation is here!

Goals

  1. Standardize geophysical data into the Geophysical Survey (GS) data standard, based on the netCDF file format and CF metadata conventions.

  2. Restructure various types of geophysical data (e.g., raw and processed data, inverted models, or derivative products) into a consistent format for sharing and archiving.

  3. Document critical metadata pertinent to geophysical analysis and transferability.

  4. Develop tools for generating and exploring standardized datasets, and facilitate handling of complex and diverse data and metadata information to accurately process, invert, and interpret geophysical data.

  5. Develop visualization and exploratory tools to interrogate data.

Why netCDF?

  • Metadata documentation - detailed metadata is directly attached to the digital data values as variable-specific attributes (e.g., names, units, null values, value ranges) and as dataset attributes.

  • Hierarchical structure - multiple datasets can be organized into a single file within a tiered group structure. The GS standard takes advantage of this to define standardized group types and ordering to create an adaptable framework for organizing complex datasets with critical supporting information such as survey and acquisition details, system configurations, and modeling parameters.

  • Portable and accessible format - netCDF is platform-independent and supports subsetting which keeps large datasets accessible and easy to use.

  • Well-established metadata conventions - the CF convention provides a strong foundation for standardizing metadata and is widely recognized for netCDF files. For example, by following the CF guidelines for coordinate reference system (CRS) variables all GS files are accurately represented in GIS software (QGIS, ArcGIS, etc).

  • Space-saving and scalable - netCDF is a binary format with extra packing and compression options to significantly reduce file sizes, and is immediately scalable for large datasets with efficient read/write and parallel capabilities.

GSPy Workflow

The GSPy package provides tools for reading datasets from a variety of original formats common for geophysical data (e.g., CSV, ASEG-GDF, GeoTIFF), combining with metadata information, and generating standardized GS netCDF files.

See our examples for detailed demonstrations of the GSPy workflow. In general, the steps for making a GS netCDF file are:

  1. Initiate a Survey

    • pass a metadata file (YAML or JSON) with global information about the survey

  2. Add a Container branch

  3. Add data to the Container branch

    • pass a data file

    • pass a metadata file

  4. (optional) Add Supplementary Stem

    • this can also be done simultaneous with Step 3 through the data’s metadata file

  5. Repeat steps 2-4 for each dataset as needed

  6. Export to File

Installation

pip install gspy

Development

This repository uses pre-commit to enforce release hygiene before code is committed. After cloning, install the hook once:

pip install pre-commit
pre-commit install

The check then runs automatically on every git commit. To scan the whole tree on demand:

pre-commit run --all-files

The same logic can be run directly without pre-commit:

python scripts/hygiene.py <files...>

Metadata

Release files for gspy 2.2.9

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

Source distribution (sdist)

Source distribution for gspy 2.2.9
File Size Uploaded Provenance Actions
gspy-2.2.9.tar.gz 56.4 MB Without provenance Details for gspy-2.2.9.tar.gz

Built distribution (wheel)

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

Total release size: 81.1 MB

Release files / gspy-2.2.9.tar.gz

Download URL gspy-2.2.9.tar.gz
Size 56.4 MB
Tags Source
SHA-256 checksum
How to use checksums
c2d53cea9df8e555e9613add5721fd18880ecf9a6cb9a5a1e7d62a6ab0d8df9e
BLAKE2b-256 checksum
How to use checksums
36f37e311ef0e46ca99d6abb8a6e81b0de77975b9ec64aa78f17bf4211f99f52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / gspy-2.2.9-py3-none-any.whl

Download URL gspy-2.2.9-py3-none-any.whl
Size 24.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
05871226a35f5b0b242abd78beb2b1f5067a790dfb2e54a62bcbeb945df0dc33
BLAKE2b-256 checksum
How to use checksums
a503bdb98b80e73e213e66d820c786e54bcd161dfdccc085084e9e880611841b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Security for gspy 2.2.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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