Read and write Gwyddion Simple Field files
Project description
Read and write Gwyddion Simple Field files
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gsffile-0.5.4.tar.gz.
File metadata
- Download URL: gsffile-0.5.4.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
851a20d64cbeda3310d32d2cf7bce28955523dc45f31d7d4e1c292ac32e41469
|
|
| MD5 |
9af722102d067db0c1acb95529b3a959
|
|
| BLAKE2b-256 |
4b30f76941d0d285f5467f33d5dbd78ce087d80262c46ec5cd79bd9d8cdc4480
|
Provenance
The following attestation bundles were made for gsffile-0.5.4.tar.gz:
Publisher:
ci.yaml on angelo-peronio/gsffile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gsffile-0.5.4.tar.gz -
Subject digest:
851a20d64cbeda3310d32d2cf7bce28955523dc45f31d7d4e1c292ac32e41469 - Sigstore transparency entry: 457845155
- Sigstore integration time:
-
Permalink:
angelo-peronio/gsffile@d5bdff6fec99d8e1c47e05b236fafc7467b966e7 -
Branch / Tag:
refs/tags/v0.5.4 - Owner: https://github.com/angelo-peronio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@d5bdff6fec99d8e1c47e05b236fafc7467b966e7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gsffile-0.5.4-py3-none-any.whl.
File metadata
- Download URL: gsffile-0.5.4-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f55a0566108c8da621c63d49c529c454c89bf218f16bc264e6bb81c2308025ff
|
|
| MD5 |
d4b07dd53549216b07aee452b72df8dd
|
|
| BLAKE2b-256 |
3fe8332fdb0de925533fc737b31b6e11adc442936864c1492e05ee7b3c53ad6e
|
Provenance
The following attestation bundles were made for gsffile-0.5.4-py3-none-any.whl:
Publisher:
ci.yaml on angelo-peronio/gsffile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gsffile-0.5.4-py3-none-any.whl -
Subject digest:
f55a0566108c8da621c63d49c529c454c89bf218f16bc264e6bb81c2308025ff - Sigstore transparency entry: 457845171
- Sigstore integration time:
-
Permalink:
angelo-peronio/gsffile@d5bdff6fec99d8e1c47e05b236fafc7467b966e7 -
Branch / Tag:
refs/tags/v0.5.4 - Owner: https://github.com/angelo-peronio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@d5bdff6fec99d8e1c47e05b236fafc7467b966e7 -
Trigger Event:
push
-
Statement type: