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

Uploaded CPython 3.14Windows x86-64

surfio-0.0.22-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.22-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.22-cp314-cp314-macosx_15_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

surfio-0.0.22-cp313-cp313-win_amd64.whl (399.9 kB view details)

Uploaded CPython 3.13Windows x86-64

surfio-0.0.22-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.22-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.22-cp313-cp313-macosx_15_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

surfio-0.0.22-cp312-cp312-win_amd64.whl (399.9 kB view details)

Uploaded CPython 3.12Windows x86-64

surfio-0.0.22-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.22-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.22-cp312-cp312-macosx_15_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

surfio-0.0.22-cp311-cp311-win_amd64.whl (399.7 kB view details)

Uploaded CPython 3.11Windows x86-64

surfio-0.0.22-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.22-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.22-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.22-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: surfio-0.0.22-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 411.4 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.22-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 f9415e91c680d18451a2d08a731c8931e638b975ca9462c7c67253f4415e5423
MD5 4f59cb1a970c3ce2920d0cdba6cd1fba
BLAKE2b-256 972086b6cfaa0f28ec9f06f732a1061a98b3ffb6391f133cee51733b4cff14c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 be61adeb2c082bf3cf330d75dc1b6cdad0b79059ffdc50fed09dae4643115e60
MD5 00dc3d2d21033be6ba64abbc9134cba4
BLAKE2b-256 eeb849a5200d4c9162750d6ef23bb455a6c6f7b63a6a303d7ea1daa45724d6fe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 67056f9f0e1495206b3ce354e9c57d198cae6d810d1059ffd8d5cc80ac6b7730
MD5 b4abf5c834a0d48a412b0c48901c4b77
BLAKE2b-256 a2cd9dbb649b2d39d610812b5138c0672943918478c13b874fe398287008bea5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 63f738f4ac02385422c4185643b0cf8e57ef763457fc1ddda5374e434f8aa42e
MD5 8d983a70c92e791c952a48682dc7eb07
BLAKE2b-256 803ff4048c4536c6dde1837b28b5b2dd2730890c5b06174df138de62d7cba032

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: surfio-0.0.22-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 399.9 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.22-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1668b26458c87ee3cdd3138ce5b406945973e8d4bfd3b2854082c1971650171b
MD5 55c8464b28b91707a61db0416ba4095a
BLAKE2b-256 ddc0bb9330eb4a4809949cff5c70b06975037a27de8d7d9ddffa25edf030c22c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6e31c0b7d025460b7cd6b9c7d5f42f485d47846ceb40c0067f7f528f4d20007f
MD5 463fbff77f0f0656917572b5491b032b
BLAKE2b-256 d037e55d6253103ffb59cbd1d9e51b77bd3c3243c142e4b068cc36ece1eadad9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2d05325715e3d37efeb0a0596f591c010cccb5e53a0e90504393e7ddf5c4e685
MD5 8456842ffca624e5c5b0f74867ee2263
BLAKE2b-256 d4501a7d839923dde8e1aa695c537e7cc6389380a5e235306630aa8cf0534f85

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 99d3182519ecee7b7163d5af2ed6e176dd29f57f0b975ec1279f4def20ca45fe
MD5 692388334e6509e99aca552810c4c854
BLAKE2b-256 ab5f30e8e49ebb97643fe9e98b8abf721b6a057fe9076e5e84b031edd9e9892f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: surfio-0.0.22-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 399.9 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.22-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 96e70bdb7022fc5b2f76530ae16a85f96604fa8b10788a67d30e66c867bffdd8
MD5 8f78ccf22d04aa5ae796643a24e35ee8
BLAKE2b-256 bd577ef15d04edc3b1123d64428b8a427d1aebf71fa97f8e7fce22ef1a1f76fe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 33254e077d82689bf58aaf7f3c89b4719fbe8e6d3371dbda4e5af9f1d28f6ddd
MD5 3991387de9f950c2bb165d04e0690327
BLAKE2b-256 2094e747a7fb9ff23f615643f727765a4aa833d6b260c4423ae0432164aa81dd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 171c1d54a1cc6a602e7a3978306bb634420878097d4d4aa03d37a7357ec50d4e
MD5 53f9d467710c73e3dfbd843039a15e24
BLAKE2b-256 ab598cddc820aab5d3ada1deca4f972551087926779b3cb30ee1bb2166e3347c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 9d94194019b72dfcc93df5d5654a95d11a499d830bcb2ac242992bf3358ba256
MD5 7364ea4215e4e805b003dca3894c0a07
BLAKE2b-256 48e4587322b4e53fc688ba243f4664842fcbf1d265c4717338a1eb2fe1f728f2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: surfio-0.0.22-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 399.7 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.22-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 30ff9cd299d44c7f6188f8a2f8239dd6d2c7ffa83a5a1e70a2f12ea56c314c22
MD5 b43b768e89ffdc13dbd5a9f36bdbb238
BLAKE2b-256 918b76f4dfa5b91651bf5fd48f941a4549deb12156407479348425ef4db9e734

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 24035612084419582dd97c9b14722e24bd2521d5bcbf661263397456a604a345
MD5 d3d54dc7c5e2cbd58a404b3f8e8fdea6
BLAKE2b-256 831b44d6153a9d8ecc77df0865c3aa817b74017972785cbff88c2553336d40ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f370229c01e2d1a86d38e480f2aeae190fea1cd48a18a2e9530f53653a6bfe40
MD5 3dc08758d102cd4c81ed05770a715470
BLAKE2b-256 ddb5427d99bcf6c343b43252c4da85e8d17dbf773556070d7e76126c4a990d86

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for surfio-0.0.22-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ebe1d3440136052109a29fe168d985ac4338c20a47f452713e9dcc70f3383064
MD5 581788f44f0f2a866a27aad6e2f74d00
BLAKE2b-256 6064c245ea82264790c2fe5ad04198aa23761ba6486c76154652fbeaf264337c

See more details on using hashes here.

Provenance

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