#crystallography #esperanto #edf #cbf #mar

cryiorust

Crystallographic IO API to read different detector formats

12 unstable releases (5 breaking)

0.6.0 Jan 7, 2022
0.5.1 Dec 13, 2021
0.5.0 Oct 25, 2021
0.4.2 Jul 23, 2021
0.2.1 Nov 22, 2019

#2 in #esperanto

Download history 9/week @ 2023-10-15 14/week @ 2023-10-22 31/week @ 2023-10-29 21/week @ 2023-11-05 12/week @ 2023-11-12 11/week @ 2023-11-19 61/week @ 2023-11-26 11/week @ 2023-12-03 12/week @ 2023-12-10 20/week @ 2023-12-17 33/week @ 2023-12-24 5/week @ 2023-12-31 7/week @ 2024-01-07 21/week @ 2024-01-14 19/week @ 2024-01-21 54/week @ 2024-01-28

102 downloads per month
Used in 2 crates

GPL-3.0+

430KB
9K SLoC

C 4K SLoC // 0.2% comments Rust 3K SLoC Python 1K SLoC // 0.1% comments Cython 460 SLoC // 0.3% comments Shell 11 SLoC Forge Config 6 SLoC Batch 2 SLoC

cryiorust

Rust implementation of IO routines to read and write images produced by various 2D X-ray detectors.

Supported formats

  • Bruker
  • Dectris Eiger HDF5 with bitshuffle plugin
  • Dectris MiniCBF
  • Agilent (Oxford) Crysalis Esperanto compressed bitfield
  • ESRF data format EDF
  • Mar345
  • Tif (including int32 tifs produced by Dectis Pilatus)

Usage example:

use std::{io, fmt};
use cryiorust::frame::{self, Frame};
use std::path::Path;

fn test_cbf<P: AsRef<Path> + fmt::Debug>(path: P) -> io::Result<Box<dyn Frame>> {
    let testfile = path;
    let cbf: Box<dyn Frame> = frame::open(testfile)?;
    println!("Frame size: {}x{}", cbf.dim1(), cbf.dim2());
    println!("Frame sum: {}", cbf.sum());
    Ok(cbf)
}

License: GPL-3.0+


lib.rs:

Rust implementation of IO routines to read and write images produced by various 2D X-ray detectors.

Supported formats

  • Bruker
  • Dectris Eiger HDF5 with bitshuffle plugin
  • Dectris MiniCBF
  • Agilent (Oxford) Crysalis Esperanto compressed bitfield
  • ESRF data format EDF
  • Mar345
  • Tif (including int32 tifs produced by Dectis Pilatus)

Usage example:

use std::{io, fmt};
use cryiorust::frame::{self, Frame};
use std::path::Path;

fn test_cbf<P: AsRef<Path> + fmt::Debug>(path: P) -> io::Result<Box<dyn Frame>> {
    let testfile = path;
    let cbf: Box<dyn Frame> = frame::open(testfile)?;
    println!("Frame size: {}x{}", cbf.dim1(), cbf.dim2());
    println!("Frame sum: {}", cbf.sum());
    Ok(cbf)
}

Dependencies

~25MB
~363K SLoC