Skip to main content

surfio

Surfio is a library for reading and writing surface files. Currently only supports the irap format.

Installation

pip install .

Usage

Irap surfaces can be imported using the from_ascii_file, from_ascii_string, from_binary_file and from_binary_buffer methods of IrapSurface.

import surfio


surface = surfio.IrapSurface.from_ascii_file("./file.irap")
print(surface.header.ncol, surface.header.nrow) # 10, 11
print(surface.values.shape) # (10, 11)

from_ascii_file is equivalent to

with open("./file.irap") as f:
    surface = surfio.IrapSurface.from_ascii_string(f.read())

but is more performant.

Exporting irap surfaces can be done with

    surface = surfio.IrapSurface(
        surfio.IrapHeader(
            ncol=3,
            nrow=2,
            xori=0.0,
            yori=0.0,
            xinc=2.0,
            yinc=2.0,
            xmax=2.0,
            ymax=2.0,
            rot=0.0,
            xrot=0.0,
            yrot=0.0,
        ),
        values=np.zeros((3, 2)),
    )
    surface.to_ascii_file("./file.txt")

which is equivalent to:

with open("./file.irap", mode="w") as f:
    f.write(surface.to_ascii_file())

Development

We use uv to manage the development environment and its dependencies. See installing uv. We recommend installing uv using your system's package manager, or into a small dedicated virtual environment.

Once uv is installed, you can get a development environment by running:

git clone https://github.com/equinor/surfio
cd surfio
uv sync --all-groups

This builds the C++ extension and installs surfio, together with its test and development dependencies, into a .venv.

We use just as a command runner for common development tasks. The most useful recipes are:

uv run just build-python   # (Re)build and install the surfio python package
uv run just test           # Run both the C++ and python test suites
uv run just test-python    # Run only the python test suite
uv run just lint           # Run all linters/formatters via pre-commit

Style is enforced via pre-commit. To have it run automatically on each commit:

uv run just install-pre-commit-hooks

C++ development

The C++ project can also be configured, built and tested independently of building/installing the Python package, using just:

uv run just configure-cpp
uv run just build-cpp
uv run just test-cpp

which is equivalent to running the underlying cmake/ctest commands directly, e.g.

cmake --preset release-posix
cmake --build --preset release-posix
ctest --preset test-posix

Metadata

Release files for surfio 0.0.25

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

Built distributions (wheels)

Table of built distributions (wheels) for surfio 0.0.25
File
surfio-0.0.25-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
surfio-0.0.25-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
surfio-0.0.25-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
surfio-0.0.25-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details
surfio-0.0.25-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
surfio-0.0.25-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
surfio-0.0.25-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
surfio-0.0.25-cp313-cp313-macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64 Details
surfio-0.0.25-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
surfio-0.0.25-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
surfio-0.0.25-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
surfio-0.0.25-cp312-cp312-macosx_26_0_arm64.whl CPython 3.12 CPython 3.12 macOS 26.0+ ARM64 Details

Total release size: 12.6 MB

Release files / surfio-0.0.25-cp314-cp314-win_amd64.whl

Download URL surfio-0.0.25-cp314-cp314-win_amd64.whl
Size 412.0 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
b8c1412f2445b606a7300ae4f981ecb9e6d7d471d7ce48031a8228a1aea5578e
BLAKE2b-256 checksum
How to use checksums
0e9a13939dcf17ef754a10108905ac4c0889edec7a669c47f749c837c7dce0f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release files / surfio-0.0.25-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL surfio-0.0.25-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 341.4 kB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e62ae9d7334e086c0b1202a5145d15c701ff949660357267fdb4597235be5be1
BLAKE2b-256 checksum
How to use checksums
3c9443d6e7b5313c763f395645d95c6a4f762698964d08b40fcc8e353331aa94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release files / surfio-0.0.25-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL surfio-0.0.25-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 307.8 kB
Tags CPython 3.14 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
7137c8d85470ed10788aeef37b79291313ed553a3392845997aac50b68e3260a
BLAKE2b-256 checksum
How to use checksums
d97f99e7b18a921bf4b37532aa458bde05e55341e40730c7f9125e10b4a1f955
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release files / surfio-0.0.25-cp314-cp314-macosx_26_0_arm64.whl

Download URL surfio-0.0.25-cp314-cp314-macosx_26_0_arm64.whl
Size 3.1 MB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
f6c2cc124a9daa4afe6deaf6b25cb5a5af1f4725aac949c1ac89fda62b4ae891
BLAKE2b-256 checksum
How to use checksums
2491e38cc9aa0b098b94cc8b5f1e5ffc7377dd1c45c0a5366824206eef4e2a80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release files / surfio-0.0.25-cp313-cp313-win_amd64.whl

Download URL surfio-0.0.25-cp313-cp313-win_amd64.whl
Size 400.5 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
8ff6f2e959f034735ba9388cbe89362ee0a61b8450435d50dc03a383c131fe66
BLAKE2b-256 checksum
How to use checksums
5eb7246cbab72490adf4b4b1ea991a4a8361ff56dae69697f835f66be5a8b4db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release files / surfio-0.0.25-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL surfio-0.0.25-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 341.2 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e07b0b48a8f63e70adce4add345c19476590238bf798cdf9822f20fe223c75f6
BLAKE2b-256 checksum
How to use checksums
f6bdcba200e5731e0e064fc7013c5470ec0d54d34f37252121d5fe25236e73b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release files / surfio-0.0.25-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL surfio-0.0.25-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 307.4 kB
Tags CPython 3.13 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
5c3f22f379caaf18303eea84db5574095525624a493e3434944034ad2891fff9
BLAKE2b-256 checksum
How to use checksums
db609b6bb10f412b41da4ca7d7621c2cdbebaf504c925b648b1ac2922c7e3de6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release files / surfio-0.0.25-cp313-cp313-macosx_26_0_arm64.whl

Download URL surfio-0.0.25-cp313-cp313-macosx_26_0_arm64.whl
Size 3.1 MB
Tags CPython 3.13 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
233503fcc0f5225a7c1b2528c6a982628d01faf81d74b9a29b300a26bcd32ce8
BLAKE2b-256 checksum
How to use checksums
527160881b81a0c570252309663a070b2205cc27d0a23a79a26c502cb95d3786
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release files / surfio-0.0.25-cp312-cp312-win_amd64.whl

Download URL surfio-0.0.25-cp312-cp312-win_amd64.whl
Size 400.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
dd09356e5b4b3a3cff93439d8cc33d4c1b646d4e3da954d40734d041fb540454
BLAKE2b-256 checksum
How to use checksums
0f264a424e85f2789f31d6d5d14e7caf6cb7abd6d79d9da411f34b159b513960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release files / surfio-0.0.25-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL surfio-0.0.25-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 341.4 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
09a3a43c20741dc8d876dfe84ebde454a60e37c763073f68d1788104531194dd
BLAKE2b-256 checksum
How to use checksums
ef44082a8af0c920bd807048e02575fc0d2a861b5baff0967aec27051ce3f65c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release files / surfio-0.0.25-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL surfio-0.0.25-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 306.5 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
5e2942b003f9ed3b54a53a33f2595e28c5e0ea818e073aec304da190fc1bdeb0
BLAKE2b-256 checksum
How to use checksums
373a31e0999a39a6675f8e04d2af091a10562d0a9b4240a3419fae6870cac151
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release files / surfio-0.0.25-cp312-cp312-macosx_26_0_arm64.whl

Download URL surfio-0.0.25-cp312-cp312-macosx_26_0_arm64.whl
Size 3.1 MB
Tags CPython 3.12 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
bfc06996df76208724e86149ebd7a0baca50765780f9fb57ac344e25203a5d8d
BLAKE2b-256 checksum
How to use checksums
ec1590860e92e0a3b7a90f9d1ecd1c4a0cfe496855860f80fb68e50584fecf74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.25 This release

12 release files

0.0.14

9 release files

0.0.12

9 release files

0.0.11

9 release files

0.0.9

12 release files

0.0.8

12 release files

0.0.5

3 release files

0.0.4

3 release files

0.0.3

4 release files

0.0.0

4 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