Skip to content

Geddes

Geddes reads XRD files into x (2θ in degrees) and y (intensity). It is available for Python, Rust, and Node.js.

Installation and usage

Save the toy pattern in your working directory, or use the path to your own file.

Python 3.10 or later:

pip install geddes
import geddes

pattern = geddes.read("profile.xy")
x, y = pattern.x, pattern.y
cargo add geddes
fn main() -> Result<(), geddes::Error> {
    let pattern = geddes::read("profile.xy")?;
    println!("{:?}\n{:?}", pattern.x, pattern.y);
    Ok(())
}

Node.js 16 or later:

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

const { x, y } = geddes.read('profile.xy')

The sample returns x = [10, 11, 12] and y = [4, 9, 16]. Each call reads one pattern. See usage for pattern selection and formats for supported files.