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

Uploaded CPython 3.14Windows x86-64

surfio-0.0.20-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (340.9 kB view details)

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

surfio-0.0.20-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (307.3 kB view details)

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

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

Uploaded CPython 3.14macOS 15.0+ ARM64

surfio-0.0.20-cp313-cp313-win_amd64.whl (201.4 kB view details)

Uploaded CPython 3.13Windows x86-64

surfio-0.0.20-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (340.8 kB view details)

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

surfio-0.0.20-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (306.9 kB view details)

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

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

Uploaded CPython 3.13macOS 15.0+ ARM64

surfio-0.0.20-cp312-cp312-win_amd64.whl (201.3 kB view details)

Uploaded CPython 3.12Windows x86-64

surfio-0.0.20-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (340.9 kB view details)

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

surfio-0.0.20-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (306.0 kB view details)

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

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

Uploaded CPython 3.12macOS 15.0+ ARM64

surfio-0.0.20-cp311-cp311-win_amd64.whl (201.0 kB view details)

Uploaded CPython 3.11Windows x86-64

surfio-0.0.20-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (341.1 kB view details)

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

surfio-0.0.20-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (306.0 kB view details)

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

surfio-0.0.20-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.20-cp314-cp314-win_amd64.whl.

File metadata

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

File hashes

Hashes for surfio-0.0.20-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7ccc56bbfad91b9e870356d40f59e0607a11aa7c5aa669ad931fcf7d1bf7dea0
MD5 80095692a2585fd6bbbc3319ae8f9499
BLAKE2b-256 79c74ecd38f6f54662c145deb0aa409ab909e614ce68f305752601d753f75587

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f504339b50419c895101b3c72a43af21488e18ab25d665845c2d790c901a5a9a
MD5 9351a7d8a8f96e9bc641a178df77df10
BLAKE2b-256 284dd6b1b9b6ba0fc19eeae5b5c940958cc2baf247be1b86f727fdc9185d3e7f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 235f18ac4f7dee6579bf12da7fcd0c489f0afce16c67451e261a892f782f78f1
MD5 6a0e802f1f6f0f84427aec3984fc6aee
BLAKE2b-256 98629488e47ccecd6653aed2e22e42623cc8c03437ef990d8fd9d19ca3d790d8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 728eb0c78c75f7b61b7a8e1a525ca94a946b81c45561573d4636c8bfc4d88c92
MD5 32951179efd311adf88a056bbe806599
BLAKE2b-256 8c14a85ae9419a89062cf882757d459a56eb806ec31a5338053bf6e9a894d80e

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.20-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.20-cp313-cp313-win_amd64.whl.

File metadata

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

File hashes

Hashes for surfio-0.0.20-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a7565940c16f75e915698ddf69735291f1832466b3b88221424fa5958e2d0a66
MD5 707c03b3c0eb6b08a399e20b5664df2f
BLAKE2b-256 8e2328607b95dc14b77484ccd5853bd69ecff682650781f89b43751841b2f126

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4d4ad54b0ef11934983b36f4c34e4b6a5a8427b3d8ce6444c411f6b81f1e54ef
MD5 ce8ce281f8d1da661d5a442ee90ab704
BLAKE2b-256 2d2d848226d4b369363a48f5fc55faab0ab97644559bff8a65325f3d230887bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6651dcfaca422b2b1f55bebd10b85325ae0b0f51d6be131c89f7a0d61e45aa29
MD5 406fe01230faea02657dc8cc9e68ba48
BLAKE2b-256 758d5b0114182b2db8ad2171b242caafee037766d0514f23a574107337a87b18

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 047d16c0c5fe35a92ffd15473d7ea26f58b5c782fb62fdbd5a89d09c7e80bd69
MD5 03f8855d2d4e8eac4188d10538b758f0
BLAKE2b-256 ca97769b56d122d7d8df2bf8cd44bdd9b276503abb5e2f32f878c56421fd1e79

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.20-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.20-cp312-cp312-win_amd64.whl.

File metadata

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

File hashes

Hashes for surfio-0.0.20-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5b63a42047bf21f07181e9bd2d2ae826716eec1d608a0f449f7db9a9203bda83
MD5 24a3943c6c84c88fe2c703d12379c1f6
BLAKE2b-256 6bb7dae4a6d6e5445aebede9a02aa2edb6fd9c96b11a417df71c45b8ac75a27c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2d2fd0e5e0210a8843e9956e57e8add277235b94e0e3dbb2b291a11131450d83
MD5 315d98dfa8b8e427af7f1e8dae2f2a14
BLAKE2b-256 454d0d6674601291980f5311cd422c3f4899a2e2d273954c115766dd9da8e74c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 57faedc5b0c855cd40d4ad5ccb0e1627723f9ef22ccdd59882d0e62f790271b7
MD5 8ee239b77c9da69fb8d0dea5ce6357c7
BLAKE2b-256 c8147b52f50cdf612349cee1ee5b36db0a4331609163596ae9ddca6b693b7197

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 aa85f9700239a971659dd128a8a29c8871277367104e05b26b66222bb072693c
MD5 8fa343ea29a06c53e2c5cfaec6ec7539
BLAKE2b-256 40591a8b30f7f6c3d3446d5599b676f806eeeb3e327078192ad3b08a1938ecb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.20-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.20-cp311-cp311-win_amd64.whl.

File metadata

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

File hashes

Hashes for surfio-0.0.20-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1a0577d2d11cbbd791dc3f31fa5d2a0543b447328fcbd3d08e6f214b8c4fc932
MD5 5b4afae1959eba1420bd560274923955
BLAKE2b-256 4adeb039597b4803b611b5ffd0ba0ae8e36df9584f4ffa21e2932df59d4b3de9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4a24b7f899d25b60f983753aae44330b4b985dbae331081da4077e2d8871536e
MD5 8f71df5b168bae5f7280877a9f6700a2
BLAKE2b-256 5835c532202b46e6a2e4093569050e7f295dc2820d7e4ef9fd9b1c998b19a44f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b2fc35d2fa2856d295c4ed29b5862bd4fb770da6cea926acb1316e74a3c9ee03
MD5 ec4842b852107e6ed498e3a39bfa3ee4
BLAKE2b-256 5a64ac0fceca0c51b3b41998aa60de336b67da17790be95f37e3480b5a521b3e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.20-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 961d8d5f265a3d17fdfa51cc49937cdc0244dff7f451449dbcc899f5755fa231
MD5 124b0733dd0a10ce6ee35a29a031e7fe
BLAKE2b-256 f13c7bc8f2cea9a51f0771d974a64cacfeb62b3a104a048495a8d12e27c922fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for surfio-0.0.20-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