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

Uploaded CPython 3.14Windows x86-64

surfio-0.0.18-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (340.7 kB view details)

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

surfio-0.0.18-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (307.2 kB view details)

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

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

Uploaded CPython 3.14macOS 15.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

surfio-0.0.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (340.6 kB view details)

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

surfio-0.0.18-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (306.8 kB view details)

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

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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

surfio-0.0.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (340.8 kB view details)

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

surfio-0.0.18-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (305.8 kB view details)

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

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

Uploaded CPython 3.12macOS 15.0+ ARM64

surfio-0.0.18-cp311-cp311-win_amd64.whl (200.9 kB view details)

Uploaded CPython 3.11Windows x86-64

surfio-0.0.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (341.0 kB view details)

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

surfio-0.0.18-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.18-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.18-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: surfio-0.0.18-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.12

File hashes

Hashes for surfio-0.0.18-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 b171769b2564f9b2c7c0da664b419535d1e91610f636abba662425140f4efbdf
MD5 08edb60b47b14b8280cb18460cd65837
BLAKE2b-256 a10924213dadd56c0ef8f09959d7da8849dd3780c4c20a8cac3412f258d25431

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 362025d194effb0ec34b977b10b2a736b5645bcd2b5a4566a60398b61270c001
MD5 a0b7396ab07ab02cc731a126a5bc54ce
BLAKE2b-256 0b410199eda5fa5f4f5a90deb69c17a845aa7f6ccc6116f9e1508b909bbdb51d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4bffbde7eb2edfc64fd79b36f4eda4e37a2e6cf9b580c29a56646aae4e264918
MD5 6139c681a1f8ffdfb169173880d31f26
BLAKE2b-256 01c85011efa34a589cc80fa55faef1d987810fbbdff5c806b9ade14c50e70789

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d1b37b0b2563c40e4405444f0719d08d9dd6bb7b892bdab103cdae9a97f31a1a
MD5 6a72b26be98483149fdcca2e396ae3e7
BLAKE2b-256 938258ed19eb44e1ada212cfd9c2c3bf6f040377307ff810fe154b54a214b2db

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: surfio-0.0.18-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.12

File hashes

Hashes for surfio-0.0.18-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7cabcd6c3d383c4ab54b609fc21744d835cc12557b631e4fceced66788c271eb
MD5 1fd78bf189761cba8436744aeebca998
BLAKE2b-256 6e4dfe82868397d4975f6af233959250cbda90a525b729bc936e9cf34a4ae21f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d28ee6fc3fe0e08d7201af0627e722a0ae38b95cdc0fff97def817449eb29ac3
MD5 53a66fbe5d7a4af5a8d856f49a9e3d89
BLAKE2b-256 b80a377844dbc3641deab59684575263e0d5faaa7bcd923c62d22334bc5dd2fa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b1f93e1db7231b03f55fa3ce6d5b5d8db9f0b2345b338ffa9ffa7bb56fc72fba
MD5 9b38e49794e767882f670c62a1cf91dd
BLAKE2b-256 26a6627624039cb9ea23a4f9183c58e18338e8d305bf83d910662df36e4bafde

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 94378e0cfa1484f0b1936e92a7c4b07f52b8990a9014f7283d26cc2e444ccc2e
MD5 b16652e019d38e0419c241926ce305a1
BLAKE2b-256 2612bd3ff3c63897473ad6c96cca46f5699351dfaf1c0980dd12bd9e6783686b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: surfio-0.0.18-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.12

File hashes

Hashes for surfio-0.0.18-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 97e5903665da81c4a74a38acab0c118a8d6b198013bc8ee40800c8a85b20603d
MD5 a30c84f98417b96d144f69b116ce913d
BLAKE2b-256 b3fe168e3f21427c7cea6f52cee59d3884adc375f273cf6fcc386e3a7d77faf9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3b1d5b6bbad24bb5221003da27442d41f9efd12cc9510e6e01218cec20e88c4e
MD5 289532a329cad132c0c17fe8e0c4dbbc
BLAKE2b-256 65391c94579f22b6b9c6074625a7d401aed772cd22adbebc301e7f61180a3bf8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 92218bd07f0a1b23545932219c6df0680dbc4eb86a9eed67273ca58cf700de81
MD5 447c1833b2765c605c62450321b0d226
BLAKE2b-256 9d641f9ad7db4ee6670347cf8a598d977d5dd01c3bbe05d17cb152a074d37f52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5499d9e573a488e48c8dbd32a4e3dd3cd44a3a696caa64a3ee78f0063fd975a0
MD5 2d7085ffa7c139aa0a2823ebe866d316
BLAKE2b-256 2531f743fd9449295c930856347f0dedc10f7935d2412e16551dfd8040d0fe8b

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for surfio-0.0.18-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3a63b347fa2d0bbc8ac19ea589012ad199e139d9c17c8e33eba9cbdde784b4a7
MD5 843cff8d18ad402f0a6dd4469569cfdc
BLAKE2b-256 575116b5160ab988e57bc116379ffec8ca6ba63042c05995dbd8a09b1da77386

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1c675c6812cd7f5da5ea5e7f8f88849a3d6b7e27edf80fb9855923569ac04106
MD5 385418e0ab208c839970aed6401efc1a
BLAKE2b-256 36ec1c34ceb3072600973b86fe90967d648259e18e6abacc5bebf93fbece354e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fdbbef53b1d53b1f2a67589922777fc5d2d5898a90d4f0124249be8d4ffc2a26
MD5 e4dfef3ed360f01e63cc030c4f7346b1
BLAKE2b-256 5fd136502eec16c7f28cf530ae2eb0cb367c085775fd9fbc87548fa766314d9f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.18-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 391d8fc25dac30a0e54713c40ccf64d5cc05a424b58111d2301522e4bf80c9a7
MD5 d5eab87c670fe995c342991b451f9612
BLAKE2b-256 e33a4e3ebd1b357adedf610611e3f240ca0faadcb898f0f8eb4e71ab535a39e0

See more details on using hashes here.

Provenance

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