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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

surfio-0.0.24-cp314-cp314-win_amd64.whl (411.9 kB view details)

Uploaded CPython 3.14Windows x86-64

surfio-0.0.24-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (341.4 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

surfio-0.0.24-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (307.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

surfio-0.0.24-cp314-cp314-macosx_26_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.14macOS 26.0+ ARM64

surfio-0.0.24-cp313-cp313-win_amd64.whl (400.5 kB view details)

Uploaded CPython 3.13Windows x86-64

surfio-0.0.24-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (341.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

surfio-0.0.24-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (307.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

surfio-0.0.24-cp313-cp313-macosx_26_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.13macOS 26.0+ ARM64

surfio-0.0.24-cp312-cp312-win_amd64.whl (400.4 kB view details)

Uploaded CPython 3.12Windows x86-64

surfio-0.0.24-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (341.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

surfio-0.0.24-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (306.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

surfio-0.0.24-cp312-cp312-macosx_26_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

File details

Details for the file surfio-0.0.24-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: surfio-0.0.24-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 411.9 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for surfio-0.0.24-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 133c5d52e4076bf582080381ef5da34f9dcda67bace2c6b77b3d19cc2c21f47c
MD5 502407b6a3396cb3bb3314d9ed975045
BLAKE2b-256 3a8ae31b816e23e8697409a4d4761c75d17e80d5bbb42c939ad229686a9819ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp314-cp314-win_amd64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surfio-0.0.24-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for surfio-0.0.24-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 78d63f3db3f1285fd1d61b02d5f4e7123f13b60de8d15c5fc96fb68c587db49e
MD5 0c9c61a202070a1db80531b4384fd287
BLAKE2b-256 b4c9bfcc4cac63da577809e47a3786c7a1d6af737f73dabe126f39da6be50044

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surfio-0.0.24-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for surfio-0.0.24-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a04d258a4bfb804aed24305e60e32b22e5ef30590fde86ffea4fb6e4faeed0f8
MD5 ee5d568d5ac0bfacbaa60d9a532ef095
BLAKE2b-256 11c89f734314b03bdb573812cf6541006dfa1a403be516b5b135ce09b5e359a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surfio-0.0.24-cp314-cp314-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for surfio-0.0.24-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 135cd303002a4b927564d91c4249ae7dd18ba744368c34fd9cf43b9966f450ba
MD5 7d8ce21e4a7467a68da11abbfe31d698
BLAKE2b-256 d1a33027a22a4c8ff94e517447a801432eab5af81eedfe4b135c5bbc4db03e38

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp314-cp314-macosx_26_0_arm64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surfio-0.0.24-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: surfio-0.0.24-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 400.5 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for surfio-0.0.24-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8babca5496762b9b432461af04a4ac1df4842ec2af96dd26f2ed03798a503f1d
MD5 d379a7379c17cb1dde0ab48b9e979260
BLAKE2b-256 85d3ebef58ea386682d6827b2fef7ed3f373d38c88d621025bdc3695699cfa0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surfio-0.0.24-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for surfio-0.0.24-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eb734ccd762967c3e5579bff7759a6d9cc511ca61aea2a75bf368cca89e877a7
MD5 576ca3f31372161631632af45541e1e8
BLAKE2b-256 f29109498a04900876e85dbd19c0fed0317a44f4e07818c9c021304a0942b107

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surfio-0.0.24-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for surfio-0.0.24-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2a8272af7f89aca736188b5f40b9e2b0d05318fdf11b905062fb83c0a5438c1b
MD5 0a0f5882a5f5b62997e2bc08ebf8d4be
BLAKE2b-256 47e6902cd3af455e56f9bff53c0dfbcd503f94d08fe2ab8a14e002f02285ea22

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surfio-0.0.24-cp313-cp313-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for surfio-0.0.24-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 f796d65bcc9417d94359707f04450006db0a147b567d443590575430ef177d10
MD5 766bd6aace49529d611928e9e6d9b76a
BLAKE2b-256 f6ab9699a1d11e2086f13bed719a4521d8f67406b34f1aa1e01252f519416174

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp313-cp313-macosx_26_0_arm64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surfio-0.0.24-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: surfio-0.0.24-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 400.4 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for surfio-0.0.24-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 df4a1396bba3a297ff89dfb664fb44bd43fbbb03b14c99d0be0f3f284a2dc3d7
MD5 0a9284e60ebcb25754b2a389b5ab9c7e
BLAKE2b-256 a3f982227c6dc160648529a628324c78a3728e6261e3ff26553bd6d708578f3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surfio-0.0.24-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for surfio-0.0.24-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6e2493a241d2f1144bc3e4a3b7df9ebc1a31c5b65c9cade4ee715ba6a3272f75
MD5 ad106b1697645922d90b0dad56f936a9
BLAKE2b-256 589cd9c6ee04f9cf2ca1c08fa4a266adb6f813df4754cfaaf0a7261d30a69f9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surfio-0.0.24-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for surfio-0.0.24-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7d5063c9ff49ddc3049cae12b6f3586dd8bc0ee5caed8444873b5e8dbd7f5f56
MD5 89a16f2119d0a233d9cd1c244f8f49ad
BLAKE2b-256 aeeb50804da9ac825728141b447d63fd67140afc4ffb243054920efbbdec1d5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surfio-0.0.24-cp312-cp312-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for surfio-0.0.24-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 287e1c6a54d76eaf09a4d5d8a001591b489978ae5d9ca167278bdf1737c2649b
MD5 be175243bd77db8e8f1b167f359ca8d6
BLAKE2b-256 a35b53f47c4b2827aa54afcc331e90c58744b1469ae54ad740acf1b06d3e551e

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.24-cp312-cp312-macosx_26_0_arm64.whl:

Publisher: publish.yml on equinor/surfio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.24 This release

12 files

0.0.22

16 files

0.0.21

16 files

0.0.20

16 files

0.0.19

16 files

0.0.18

16 files

0.0.17

16 files

0.0.16

16 files

0.0.15

12 files

0.0.14

9 files

0.0.12

9 files

0.0.11

9 files

0.0.10

12 files

0.0.9

12 files

0.0.8

12 files

0.0.5

3 files

0.0.4

3 files

0.0.3

4 files

0.0.0

4 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page