Skip to main content

Reader/Writer library for irap files.

Project description

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

pip install -e ".[dev]"

Style is enforced via pre-commit:

pre-commit install

C++ development

To configure the project

cmake --preset release-posix

To build it

cmake --build --preset release-posix

To test it

ctest --preset release-posix

Project details


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.17-cp314-cp314-win_amd64.whl (205.7 kB view details)

Uploaded CPython 3.14Windows x86-64

surfio-0.0.17-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (340.5 kB view details)

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

surfio-0.0.17-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (306.9 kB view details)

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

surfio-0.0.17-cp314-cp314-macosx_15_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

surfio-0.0.17-cp313-cp313-win_amd64.whl (201.2 kB view details)

Uploaded CPython 3.13Windows x86-64

surfio-0.0.17-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (340.4 kB view details)

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

surfio-0.0.17-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (306.5 kB view details)

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

surfio-0.0.17-cp313-cp313-macosx_15_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

surfio-0.0.17-cp312-cp312-win_amd64.whl (201.1 kB view details)

Uploaded CPython 3.12Windows x86-64

surfio-0.0.17-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (340.3 kB view details)

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

surfio-0.0.17-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (305.7 kB view details)

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

surfio-0.0.17-cp312-cp312-macosx_15_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

surfio-0.0.17-cp311-cp311-win_amd64.whl (200.8 kB view details)

Uploaded CPython 3.11Windows x86-64

surfio-0.0.17-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (340.6 kB view details)

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

surfio-0.0.17-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (305.7 kB view details)

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

surfio-0.0.17-cp311-cp311-macosx_15_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for surfio-0.0.17-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 29b2431369d44b20601be951e20892d16d3422be7db3e22c168d0618e99d5079
MD5 81d2cd3b2ddf6e01e5dd45ee7a46cc4d
BLAKE2b-256 8494d6493b2bc98c8fa1fa9922565d256db53d2d4ef0111dfa4e81d469409dea

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-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.17-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a8406f963a7a973e4e05add48119993ccff0908a49b096e19b2206f4aa0519df
MD5 1f57d3c1c257a7046bf58dc588d4f3da
BLAKE2b-256 4d903792f8e008f1fe441eed8ca530fdeb89d9d3f953ff108ad290a76d2315a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-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.17-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 244e398ac605aa87ee085b5a88a7421890d1ef2503284e289c2022958592cb4a
MD5 85e7dfb010e45a9f95b3d5ab25cec13f
BLAKE2b-256 7560a599f3f555366186d27cbe0fd8dc484db1875d8774c004d2a705d44be83c

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-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.17-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 805344bf2a41af1db8f0aa5e8ecc76963a683c6b3946f65a5aca77806a79bc14
MD5 18e169c2c1dc1cb7432ffd951af677f7
BLAKE2b-256 19c93c941efa99fe58fcddfc70f7eb3f2eb773a514ac99c699d95884296b7ce1

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-cp314-cp314-macosx_15_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.17-cp313-cp313-win_amd64.whl.

File metadata

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

File hashes

Hashes for surfio-0.0.17-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 714b3f1c03d10b93d6d4a6c13ad37434380f22f5ad5676dc0aee519e94a68941
MD5 d748d659ebdd978a2cd1f074bebb9697
BLAKE2b-256 4b578469a25bd3a28b477699bf8e65db2a52520d4915920e8a9670325f1f3559

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-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.17-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 645ccbf3f02e15b8919484bd9ad578cfadadaeaf7d9308746ad1a7c1a5f07570
MD5 5805ef56e79cb5a569e1adb1a20184ec
BLAKE2b-256 b4874386297bf1994413db77088a22672a97d3e79dfd48907a3d200c3bcc059b

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-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.17-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 088d7a253c32828de95806a82c2de71619e5f87a47a35aca170e1d70942d295e
MD5 5ae081285e443cbfdfbb3d5e17605d0b
BLAKE2b-256 27c4b07ae7ced3ab2fdf96456a10756c65868cfa4650d87abbdec3d468cc276f

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-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.17-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e0c5bb4c71c44524d525634d78ff10544e7a56a498a08114be3d301e0a8894b7
MD5 84a9336c573950e9045711e5bead133e
BLAKE2b-256 8381a220ea0002c4910fecd2a8b13df66bc408c26b3c4ec8f0314d5fd95aea8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-cp313-cp313-macosx_15_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.17-cp312-cp312-win_amd64.whl.

File metadata

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

File hashes

Hashes for surfio-0.0.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7619b22520031021b19fae185377ee978fb3b1b7c4b7bf724345f5ca064abb99
MD5 e5105541f81a01e66235914f26a21c49
BLAKE2b-256 836273a7ac28b7d9569a4ee42ead74a8c0eeb1a41fd1722a421381fa714beeed

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-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.17-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 67325362a0f4a00f38dcd98444d7b494460f94317cc9230dcae0630af537f4bb
MD5 f5e1109e6c873bb984cb4046925660ac
BLAKE2b-256 2dd3edb10b84797f1e5d8242e5dea13c9bdcd7a4096e26694120c1f590783128

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-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.17-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c6314a0a237580a337a56d2530a3af5f5a1ba1ffda902e9179b115c509d88863
MD5 4fc4c9918a28be234b189db96a0bd6e9
BLAKE2b-256 f23883ed542069cffa751420cb4f1f52eff5dd3042e9ebb1e1bf45908a715aef

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-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.17-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d29c3e1edb02e95cdc28f0a15a55da9e7ca15a804e0d7ba21c2e1ddaead8277e
MD5 4a7b2be765d463f80773727711ea39a2
BLAKE2b-256 b1370049d41fbc5f33f3d162e574dcf95991556a73861c0bcd1e92f50a794aa1

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-cp312-cp312-macosx_15_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.17-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: surfio-0.0.17-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 200.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for surfio-0.0.17-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 67160f9769f9efd4c56f8ecca483c8bf34f7beeec2e10be96174592167bf925d
MD5 7e78d66559ccea08dc8cc4246c9c4128
BLAKE2b-256 b0d8b1daf1679a6b0896cf01687370e236b55b769e63e5ee9efe2f89ef775617

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-cp311-cp311-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.17-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aa4637ecd3ca0f9d8df29a4151380753d9ce74127e4f8ef33b06969e0691c932
MD5 702236047181cd13b2634be6cc0e0265
BLAKE2b-256 f91a6c1cd9720ed76b35f2be24cd5604b24752e6b781a7399fc5d33333d1b61c

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-cp311-cp311-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.17-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2a53a284bb213d833f968e257e1399f63a798fb3154b0b6b96564ee420bce300
MD5 8a9fe655922ceb0c513288506d66c8cc
BLAKE2b-256 b5d7c9bdd19b72f1be6d32f7630554e954216f077c7a65d680515d027249736e

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-cp311-cp311-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.17-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for surfio-0.0.17-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a63896b3bbb923b279d703aa306f5903a3794991f2d8b79057c5ab4128433163
MD5 06a808bef24fa464aba41c7b5e896ffa
BLAKE2b-256 0d96f26c6c37469c4bc3bb6ea99fa3c1e27dc560bd1707d532f13bdddd4dac50

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.17-cp311-cp311-macosx_15_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.

Supported by

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