Skip to main content

A Python library for parsing XRD pattern files

Project description

Geddes

Crates.io PyPI npm

A Rust XRD pattern parser with Python and Node.js bindings. Supports:

  • .raw (GSAS text or Bruker binary)
  • .rasx (Rigaku Zip archive)
  • .xrdml (Panalytical XML)
  • .xy / .xye (Space-separated ASCII)
  • .csv (Comma-separated values)

Rust Usage

Load from a file path:

use geddes::read;

fn main() {
    let pattern = read("tests/data/xy/sample.xy").unwrap();
    println!("{} {}", pattern.x.len(), pattern.y.len());
}

Load from in-memory bytes (filename is used to infer the format):

use std::fs;

use geddes::read_bytes;

fn main() {
    let data = fs::read("tests/data/xy/sample.xy").unwrap();
    let pattern = read_bytes(&data, "sample.xy").unwrap();
    println!("{} {}", pattern.x.len(), pattern.y.len());
}

Python Usage

Load from a file path:

import geddes

pattern = geddes.read("tests/data/xy/sample.xy")
print(len(pattern.x), len(pattern.y))

Load from in-memory bytes (filename is used to infer the format):

import geddes

with open("tests/data/xy/sample.xy", "rb") as f:
    data = f.read()

pattern = geddes.read_bytes(data, "sample.xy")
print(len(pattern.x), len(pattern.y))

Node.js Usage

Load from a file path:

const geddes = require('@jcwang587/geddes')

const pattern = geddes.read('tests/data/xy/sample.xy')
console.log(pattern.x.length, pattern.y.length)

Load from in-memory bytes (filename is used to infer the format):

const fs = require('node:fs')
const geddes = require('@jcwang587/geddes')

const bytes = fs.readFileSync('tests/data/xy/sample.xy')
const pattern = geddes.readBytes(bytes, 'sample.xy')
console.log(pattern.x.length, pattern.y.length)

License

MIT

Project details


Download files

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

Source Distribution

geddes-0.2.0a1.tar.gz (213.5 kB view details)

Uploaded Source

Built Distributions

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

geddes-0.2.0a1-cp314-cp314-win_amd64.whl (310.4 kB view details)

Uploaded CPython 3.14Windows x86-64

geddes-0.2.0a1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (465.6 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

geddes-0.2.0a1-cp314-cp314-macosx_11_0_arm64.whl (401.3 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

geddes-0.2.0a1-cp313-cp313-win_amd64.whl (310.1 kB view details)

Uploaded CPython 3.13Windows x86-64

geddes-0.2.0a1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (465.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

geddes-0.2.0a1-cp313-cp313-macosx_11_0_arm64.whl (401.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

geddes-0.2.0a1-cp312-cp312-win_amd64.whl (310.2 kB view details)

Uploaded CPython 3.12Windows x86-64

geddes-0.2.0a1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (466.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

geddes-0.2.0a1-cp312-cp312-macosx_11_0_arm64.whl (401.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

geddes-0.2.0a1-cp311-cp311-win_amd64.whl (311.8 kB view details)

Uploaded CPython 3.11Windows x86-64

geddes-0.2.0a1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (467.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

geddes-0.2.0a1-cp311-cp311-macosx_11_0_arm64.whl (401.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

geddes-0.2.0a1-cp310-cp310-win_amd64.whl (311.8 kB view details)

Uploaded CPython 3.10Windows x86-64

geddes-0.2.0a1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (468.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

geddes-0.2.0a1-cp310-cp310-macosx_11_0_arm64.whl (402.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file geddes-0.2.0a1.tar.gz.

File metadata

  • Download URL: geddes-0.2.0a1.tar.gz
  • Upload date:
  • Size: 213.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geddes-0.2.0a1.tar.gz
Algorithm Hash digest
SHA256 092e5f82660b81c6c17549560e468ebeda9c580a589aaaf5a072ffd3cbcf5c18
MD5 fc781995c7de8a7bf8c963f83d2f85ea
BLAKE2b-256 2f251ac629590db2d7053bf842a4d37343e35d9d504a6de6a3c71e5d30cdac94

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1.tar.gz:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: geddes-0.2.0a1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 310.4 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 geddes-0.2.0a1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 0e3492e9027345a2ebd4a8a66f53f6e7abd625e57147427e1f9f3353b96941a9
MD5 c719d1af6421ec927d586803676a0c1f
BLAKE2b-256 8af323d0c4295c0d040c1a3ba0ff9691dde4f7477c5a6e900407dc8bb425aefe

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp314-cp314-win_amd64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geddes-0.2.0a1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4ff2394d8aab8bcfab854abe12e6d62aed7cd2294c489a5486ecb15a55c09b6a
MD5 d39c6dd14181b6b35b626102d76731a0
BLAKE2b-256 7eaad78ca82a9f98f47d1bad004f7633a2136dcb7c52631ce618269753352dee

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geddes-0.2.0a1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b75622056c24b0432c330d9a8c6aa0733aa6615aff9ddaf4f3b73254db09ce6
MD5 f5412d1f5554408b7b45f8a536c5645e
BLAKE2b-256 cfe6e43abfd10505531a44a7fb67b5b0457f16691874955db7071bd547f6c57d

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: geddes-0.2.0a1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 310.1 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 geddes-0.2.0a1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c62fea3814ff83a052eddbb471a857d29c7571f6dc27e961fd6254be49e6b031
MD5 86b8983309f9a616698f13cf498a2747
BLAKE2b-256 4429fdf965904cb751cb17472b1a8fa01a55141d52c3146819a30be342f05343

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp313-cp313-win_amd64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geddes-0.2.0a1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 93857af7fc000ea1feae09de610e2320a0b694eac87254a33eeb6341a50734f8
MD5 d31f92dbb2c4b17b60ccfd16b21c2ef0
BLAKE2b-256 3ec7bbb22e8ccbd55b6175fc7cda1b24bbeedab7c785f01db6ef969eede12cb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geddes-0.2.0a1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3617fbda744f72edffe600513082b684f4ce3a3dce1cbebe82b8bbc50589e244
MD5 004823e406c4fdf369330919467b2dc6
BLAKE2b-256 2949a87c8ac33d5b5ca15aa182e77c80eb201d7de8970044cda2fb7a1e8beab7

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: geddes-0.2.0a1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 310.2 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 geddes-0.2.0a1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0720c942233e8bf507723ff04343e81ed14a051fffca31702258454c313fdc6f
MD5 63725de5587ef7a47a2e472cd8e04616
BLAKE2b-256 e9dc6e4c571e941c023db5f570cf9ad72d06ead62e1e9087970aa92f442792d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp312-cp312-win_amd64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geddes-0.2.0a1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6bcbede37b7fdc9e73e8c0d31e39f8e7eecfcd6b74436980057a86157d4bf325
MD5 af6461cf8a56d76f0ca29c77216132a2
BLAKE2b-256 b8fdffb0a4e06b1dabc0480a685fedd7a8c0735abdf80befb957216a48c02bfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geddes-0.2.0a1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ff65a2236cb91046f2a627b9a1c99103460b92fa4712e11f3703bb004debd9e8
MD5 50b8ff45c00c854fd7fd37df530abd33
BLAKE2b-256 781bcdad18f343b3234229925676a6bb8f9ba81ce64a5c5b9fab1e5c9268e763

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: geddes-0.2.0a1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 311.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 geddes-0.2.0a1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5c50f1458fb522e77626b19d8f4743296cf34226e0b942e427104140c8135520
MD5 bcc7999957dbf1f5bb74e7a329d093e4
BLAKE2b-256 d67be5ba5a2397c85800490e0a248e7cc3a2d0cbb9f61f0d1c7c2ef479be3576

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp311-cp311-win_amd64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geddes-0.2.0a1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5a0b647623721db8a118cc7e3f103037eae2bfda9aef064e593884b6ee2a8d63
MD5 9478810009874c4a0766c144edc8d74d
BLAKE2b-256 d7203ae4065f531345d136f83ffd2868d3cd453495d794fbbdbb14cba271b58d

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geddes-0.2.0a1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e5bbe83bfd12526ee0a5385c60554438c4ab8569f1757446c4f4f400145b8e71
MD5 994f9352c606b330c1eaaca63b990668
BLAKE2b-256 26700b13789ee92d3ad66077605781dc01d2aac43f2a01c4e15f50b33b48ae18

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: geddes-0.2.0a1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 311.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geddes-0.2.0a1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9f719ccfeeefaddccc28fbd26201ce3b82b99d99f449b208b614ade8ec0555fd
MD5 989825ba242ce913e28769026cca10b2
BLAKE2b-256 8f2e38fbfaa44bdfcef5698a79398ba4a64c49acf6dbfabc3018b7e1c67b6e84

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp310-cp310-win_amd64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geddes-0.2.0a1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0a30dea7d6e9b583d37105002f058cc0c5aeab8f9718c4aced892aa13d5af65
MD5 835df757d0ce220ce81f4753fc1ffa59
BLAKE2b-256 b3b9de01b4c938e4a796ddd3e57d5a2ff66968f36326929cda244b0664639024

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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

File details

Details for the file geddes-0.2.0a1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geddes-0.2.0a1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4288e9f23ff78d4d73334c9cae849bead7a0e949b97685e794d198bdae2315e6
MD5 ee3c6e606f860d642df827ebfeff7fe2
BLAKE2b-256 f0828b135cd838952924e1c3a7dac8a02b61c9ae96c87651abc565140ecf2cb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.2.0a1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on jcwang587/geddes

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