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.3.0a0.tar.gz (214.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.3.0a0-cp314-cp314-win_amd64.whl (314.2 kB view details)

Uploaded CPython 3.14Windows x86-64

geddes-0.3.0a0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (464.1 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

geddes-0.3.0a0-cp314-cp314-macosx_11_0_arm64.whl (413.2 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

geddes-0.3.0a0-cp313-cp313-win_amd64.whl (314.1 kB view details)

Uploaded CPython 3.13Windows x86-64

geddes-0.3.0a0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (463.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

geddes-0.3.0a0-cp313-cp313-macosx_11_0_arm64.whl (413.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

geddes-0.3.0a0-cp312-cp312-win_amd64.whl (314.1 kB view details)

Uploaded CPython 3.12Windows x86-64

geddes-0.3.0a0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (464.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

geddes-0.3.0a0-cp312-cp312-macosx_11_0_arm64.whl (412.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

geddes-0.3.0a0-cp311-cp311-win_amd64.whl (316.1 kB view details)

Uploaded CPython 3.11Windows x86-64

geddes-0.3.0a0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (467.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

geddes-0.3.0a0-cp311-cp311-macosx_11_0_arm64.whl (415.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

geddes-0.3.0a0-cp310-cp310-win_amd64.whl (316.0 kB view details)

Uploaded CPython 3.10Windows x86-64

geddes-0.3.0a0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (467.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

geddes-0.3.0a0-cp310-cp310-macosx_11_0_arm64.whl (415.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file geddes-0.3.0a0.tar.gz.

File metadata

  • Download URL: geddes-0.3.0a0.tar.gz
  • Upload date:
  • Size: 214.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for geddes-0.3.0a0.tar.gz
Algorithm Hash digest
SHA256 0d467e446229dc63c531a6bb1ae1f622a4f5dd6e15992ddae3bdaf1a7ef49353
MD5 eaf2320026f1af01b9da2f62f3ae2be4
BLAKE2b-256 d992bfc465f790cc24fa5f2166c4f4ce2a66dd7f5fc3381a1b862718b0f68e50

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0.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.3.0a0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: geddes-0.3.0a0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 314.2 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 geddes-0.3.0a0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 13eb7e5ac31debc65374090cbf8051197f1b6e448f809ef9cf7d64e62456a206
MD5 e799492f15de4d51460b49eb72a20ec2
BLAKE2b-256 698e4901d47eaab06ad002896a9cd9874436b069041cc21922d3338f98ca1fbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geddes-0.3.0a0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bec1b705222cb0127e2941f65925ee8d885125c55dfaed32fc3d9e853224aafc
MD5 5734004738ba439d6c92a4b799ebf7ce
BLAKE2b-256 ecd584596d2200d8b384cfdbdb9c44e1ab4326b21dfd4de8d947f8e831b80e6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geddes-0.3.0a0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 63602cb47102bde026296fdf201b1024d9615b879940b2d45ffe3d2b1306b4a0
MD5 4750e1d799b0b8ce00ef178f289c29f9
BLAKE2b-256 3ca63d2297cd1483c30541cb1acec11b5ab7d967a3332718b8ad35ed2bd2e07a

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: geddes-0.3.0a0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 314.1 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 geddes-0.3.0a0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fd235bbedd6541040566f4a792995e0d0285c7709ba6ccad4d595635d662091c
MD5 26c18bab38715745ab4b0ace749924eb
BLAKE2b-256 765a6d4e0e367f6c5bfe577798141acec95171a7e31a0031d7cd710fdac48a77

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geddes-0.3.0a0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7938ea3243788616e07ea9336dabee3a35f0bc1dfd380b713a0e8b79948cb2b8
MD5 3758dd9d2925009ea158d9a804a107f5
BLAKE2b-256 637116dcf9658c319bde5231232984669a1665e10e12e33dd9d1db6853ae2bfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geddes-0.3.0a0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 15b017b16b339b6d53aa9ee065e346f4cd7d9bb85675231865113ceb23cd334e
MD5 0ceb89077acc2a2aac44458519508428
BLAKE2b-256 bfbc747f102088a19975fd1ea6665e946c191dae872ccdd81c7b3ffa3a967364

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: geddes-0.3.0a0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 314.1 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 geddes-0.3.0a0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f780dadbe45f58bb329008ecd9f867f1ef912b6730a93f5e382b4055b710d0c5
MD5 61a9357575fba25886e754f33b7d8e54
BLAKE2b-256 fa97be6cde893834c0ae7347b157368d6b39de4bd8647c145cbc3093ac3b5e4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geddes-0.3.0a0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f022d64482c85a35dc982d85bb13fba424e6bc37576a268ccd4e001e5b8cc46b
MD5 b045e2a64e0acd39285d3b7c47e3a2f5
BLAKE2b-256 864ae944dc8f57ec69a6c3092f1205f5a12b4308ce6a4a4ef5b9f0ddb4a67556

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geddes-0.3.0a0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 58f8b1976ca5278448e68e4f84ae24408bd5301fdda67109f2634d013000a601
MD5 bcebe7a442517b07bf32aa92bab2a70f
BLAKE2b-256 7b25d012a0f5c62eee6f12e62736ab4bbc157443f1bd40af805c262cb5db40c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: geddes-0.3.0a0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 316.1 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 geddes-0.3.0a0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1d7e182431d27dba2f37738ec8f80d2b62d63d082983f006fcafd431a528c545
MD5 275ac7dfd084044b31379d994ce27cf9
BLAKE2b-256 6a6edf2587d390d488a86b8f123acb89646a7edce81944ade678a0789676922d

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geddes-0.3.0a0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd2b56aec30739d4a4d48ac6c531ec902790ffb65a370d46c4977a6daab25f1a
MD5 20bd3d59e56766c53e4d2bb982ea2852
BLAKE2b-256 e5ddba82ab85f2d310e3a3087ebe15ce568c93d6b3855db2156a85908fc66759

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geddes-0.3.0a0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4b1cd9d24182fb589f40c8a728c9b6cd05fd6d5c55374b75ee646b3a202ba960
MD5 f96e9caf8d62677fb9c85fbef34e7a78
BLAKE2b-256 6abfa404b4839449fa7ed1cbc957d2c46f750762bb0908cbdd0ceb7f72716c17

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: geddes-0.3.0a0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 316.0 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for geddes-0.3.0a0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5ddd383b5f5c4ec250a9d02e30023d98cf89153984e438f06e8994ccc0d45879
MD5 25230e7ea15ac278ae5a028fdd80247c
BLAKE2b-256 4338b71edb110db19df1a82f6257a938cce39f6db3b4dc17ca3a78e9e173a135

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geddes-0.3.0a0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e1c27ab74be0b68526a0229c8bdd8c5be9c226190fca1afe3c42e992177bd67
MD5 d53334c666ac1c6c5279f2eb4a1c6b07
BLAKE2b-256 3876be4a564d9ea8ffea2303a30e40257225301ae0f80241ae68441543a0f0ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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.3.0a0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geddes-0.3.0a0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba3923fd6b32deb47280644e68dc7eb9bccd62b0b15415dd82a0f736f9aa25e0
MD5 84216a6bf719448ebb4a066c7a789cdd
BLAKE2b-256 6e7f8b2737e16f32a4e16adebc459ac0bcf5c97665f1f0511dfbc7b245245955

See more details on using hashes here.

Provenance

The following attestation bundles were made for geddes-0.3.0a0-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