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.26

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.26
File Actions
surfio-0.0.26-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for surfio-0.0.26-cp314-cp314-win_amd64.whl
surfio-0.0.26-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for surfio-0.0.26-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
surfio-0.0.26-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for surfio-0.0.26-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
surfio-0.0.26-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details for surfio-0.0.26-cp314-cp314-macosx_26_0_arm64.whl
surfio-0.0.26-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for surfio-0.0.26-cp313-cp313-win_amd64.whl
surfio-0.0.26-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 for surfio-0.0.26-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
surfio-0.0.26-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for surfio-0.0.26-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
surfio-0.0.26-cp313-cp313-macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64 Details for surfio-0.0.26-cp313-cp313-macosx_26_0_arm64.whl
surfio-0.0.26-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for surfio-0.0.26-cp312-cp312-win_amd64.whl
surfio-0.0.26-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 for surfio-0.0.26-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
surfio-0.0.26-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for surfio-0.0.26-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
surfio-0.0.26-cp312-cp312-macosx_26_0_arm64.whl CPython 3.12 CPython 3.12 macOS 26.0+ ARM64 Details for surfio-0.0.26-cp312-cp312-macosx_26_0_arm64.whl

Total release size: 12.9 MB

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

Download URL surfio-0.0.26-cp314-cp314-win_amd64.whl
Size 433.8 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
7c75b949a94d29391fa775a0056d2ee2127fc50f1614f2b045d85ca891bb1690
BLAKE2b-256 checksum
How to use checksums
d63f3f34b9a69b82220bf9c513e8ceb69004864e73308b0e824e2c2a69bc1932
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 Nov 9, 2026.

Transparency log

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

Download URL surfio-0.0.26-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 369.2 kB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4780cfa534195b7930ae7afed32ad5d78a6b51a042b09b0506b1202d31e0f46e
BLAKE2b-256 checksum
How to use checksums
61ab4f456d601ed0e59474a3a653c32f25ef91ff8a5c8c2046c56b228be2f5cf
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 Nov 9, 2026.

Transparency log

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

Download URL surfio-0.0.26-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 334.8 kB
Tags CPython 3.14 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
8480542ac921bf3f1b1a4146253664ae997bda9b96bf510e34717d1c6abc8031
BLAKE2b-256 checksum
How to use checksums
4122b4fdf413dc2e250deb6230cb328e51eb1acf9a4f34b3fc035eb759bfed01
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 Nov 9, 2026.

Transparency log

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

Download URL surfio-0.0.26-cp314-cp314-macosx_26_0_arm64.whl
Size 3.2 MB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
2e43f3c91d35286ceaf5d2fbda557195998e73b25b02ef7a50dcbeb7e18da5b9
BLAKE2b-256 checksum
How to use checksums
bd573c054c031a323dd8aee7a868636e6b0067003dd8cbd5395777f42f5d9362
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 Nov 9, 2026.

Transparency log

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

Download URL surfio-0.0.26-cp313-cp313-win_amd64.whl
Size 421.1 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4dae6e8c09e0bbeeb975ec4037b926ce1c4cc4c3f3c7a7e7701fa516d51acad0
BLAKE2b-256 checksum
How to use checksums
4ade5b94601c542adfadf51ad91402de63333576d23e5678cc8ce36875da0442
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 Nov 9, 2026.

Transparency log

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

Download URL surfio-0.0.26-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 369.1 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9d7d677df38cf0d880e673c8440ae3f2138e9e4c377437835af42207a2ff91fe
BLAKE2b-256 checksum
How to use checksums
e71130f0bdc59c4944730128048c068d8360799631f2fbc2d352e5ff9fe596a4
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 Nov 9, 2026.

Transparency log

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

Download URL surfio-0.0.26-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 334.2 kB
Tags CPython 3.13 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
78bde9570ffa970712296dd0e572cac928b62e34eb846723c3df88b80615a1fa
BLAKE2b-256 checksum
How to use checksums
fb2d11a35adb1c74168cbdae216c31c4f5b557db8e7463c36914f3fafedbb4f2
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 Nov 9, 2026.

Transparency log

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

Download URL surfio-0.0.26-cp313-cp313-macosx_26_0_arm64.whl
Size 3.2 MB
Tags CPython 3.13 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
88464238128a632cf298f416743e912466970037c94cbb797aa404127631afdd
BLAKE2b-256 checksum
How to use checksums
4cc74ead13591f6cd1b599f340b87f40f9a014ce319affc2ea25ba02e3d486db
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 Nov 9, 2026.

Transparency log

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

Download URL surfio-0.0.26-cp312-cp312-win_amd64.whl
Size 421.0 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
2a9a34cc8df9fab7b455b3205984c3033004e3eac457aa8d81981e3be238b160
BLAKE2b-256 checksum
How to use checksums
c8e1612eb3734529e663b4409feab7344727f8ae026b0b0d533bb69fa5e3334f
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 Nov 9, 2026.

Transparency log

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

Download URL surfio-0.0.26-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 369.0 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d3825030b80762057ff1862a871e5251c9550f11797e6e11e6542d8fc03ecab2
BLAKE2b-256 checksum
How to use checksums
75731979e5f420716ccef7fac71cbb7387ea14f87e2e76c6d1ca2c41bf8b4367
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 Nov 9, 2026.

Transparency log

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

Download URL surfio-0.0.26-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 334.2 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
78bc84d81d20d64cbf4f892cc802a09d6e5f5d2e8a5a0463e64f78e8257b3b2e
BLAKE2b-256 checksum
How to use checksums
ccb13da15d1088c6a0e0df2d211c61c09bb8f563c41935ca3ac3731cbb6ddff9
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 Nov 9, 2026.

Transparency log

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

Download URL surfio-0.0.26-cp312-cp312-macosx_26_0_arm64.whl
Size 3.2 MB
Tags CPython 3.12 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
823210f8fbb12232908d96a45412100958459ab283e8b0a7f0179a3dfcff7739
BLAKE2b-256 checksum
How to use checksums
c0a62e42668605c9478de9daacbd30cdd9da26444bab7fc6634f677465d499a1
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 Nov 9, 2026.

Transparency log

Security for surfio 0.0.26

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

All 12 files in this release have been uploaded with provenance metadata.

Select from 12 files

Attestation for surfio-0.0.26-cp314-cp314-win_amd64.whl

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 Nov 9, 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