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 conda-forge::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 metadata in CITATION.cff. Specific DOIs and BibTeX entries for each released version can be found on Zenodo.

Metadata

Release files for gsffile 0.5.5

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.5
File Size Uploaded Provenance Actions
gsffile-0.5.5.tar.gz 12.2 kB With provenance Details for gsffile-0.5.5.tar.gz

Built distribution (wheel)

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

Total release size: 19.3 kB

Release files / gsffile-0.5.5.tar.gz

Download URL gsffile-0.5.5.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2ef6dbd911679fead6b2be8addb0f9c72e8fc2888da26e56e4c815a509fbda78
BLAKE2b-256 checksum
How to use checksums
bc8e9ddf98f7d44a918ecee8bc98ca10a4e156020a0492f0397b8a8448411001
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

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

Download URL gsffile-0.5.5-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03e7495b9887e1c0b6a1d10898a6b74eda0529ba91b239c090c3e3ed8bdc5a06
BLAKE2b-256 checksum
How to use checksums
50aa0b39daadb455eca8630ad5e32509587283753a232963e921c5c3bad45d40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Security for gsffile 0.5.5

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gsffile-0.5.5.tar.gz

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 Oct 22, 2026.

Transparency log

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