Skip to main content

Read and write Gwyddion Simple Field files

pypi conda-forge pypi downloads license python ci pre-commit.ci status codecov ruff DOI

gsffile is a Python module to:

  • read image and metadata from Gwyddion Simple Field (.gsf) files, and
  • store NumPy arrays in Gwyddion Simple Field files.

It features type annotations, minimal logging, and an overgrown test suite.

Setup

Install with pip

python -m pip install gsffile

or with conda

conda install gsffile

Quickstart

>>> from gsffile import read_gsf, write_gsf
>>> import numpy as np

# The Gwyddion Simple Field format supports only 32-bit floating point data.
>>> data = np.eye(100, dtype=np.float32)

# Optional metadata.
>>> metadata = {
...    "XReal": 5e-05,
...    "YReal": 5e-05,
...    "XYUnits": "m",
...    "ZUnits": "V",
...    "CustomKey": 33,
...    }

>>> write_gsf("example.gsf", data, metadata)

>>> data, metadata = read_gsf("example.gsf")

Documentation

gsffile is documented via docstrings:

python -c "import gsffile; help(gsffile)"

How to cite

Cite gsffile in your published work using the version-specific metadata in CITATION.cff, or this general BibTeX entry:

@misc{Dri_gsffile_2024,
title = {gsffile},
author = {Dri, Carlo and Peronio, Angelo},
url = {https://github.com/angelo-peronio/gsffile},
doi = {10.5281/zenodo.16998022},
year = {2024},
month = {7}
}

Specific DOIs for each released version are listed on Zenodo, but are not included in CITATION.cff due to a limitation of Zenodo itself.

Metadata

Release files for gsffile 0.5.4

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

Source distribution (sdist)

Source distribution for gsffile 0.5.4
File Size Uploaded
gsffile-0.5.4.tar.gz 11.1 kB Details

Built distribution (wheel)

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

Total release size: 18.4 kB

Release files / gsffile-0.5.4.tar.gz

Download URL gsffile-0.5.4.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
851a20d64cbeda3310d32d2cf7bce28955523dc45f31d7d4e1c292ac32e41469
BLAKE2b-256 checksum
How to use checksums
4b30f76941d0d285f5467f33d5dbd78ce087d80262c46ec5cd79bd9d8cdc4480
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2025.

Transparency log

Release files / gsffile-0.5.4-py3-none-any.whl

Download URL gsffile-0.5.4-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f55a0566108c8da621c63d49c529c454c89bf218f16bc264e6bb81c2308025ff
BLAKE2b-256 checksum
How to use checksums
3fe8332fdb0de925533fc737b31b6e11adc442936864c1492e05ee7b3c53ad6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.4 This release

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.4

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