Module cryiorust::bruker [−][src]
Expand description
Pure Rust implementation of the Bruker detector format reader.
Usage example:
use cryiorust::bruker::Bruker;
use std::path::Path;
use cryiorust::frame::Frame;
fn read_test_file<P: AsRef<Path>>(path: P) {
let frame = Bruker::read_file(path).unwrap();
if frame.dim1() != 1024 || frame.dim2() != 1024 {
panic!(
"Bad frame dimensions: expected 1024x1024, found {}x{}",
frame.dim1(),
frame.dim2(),
);
}
let sum = frame.sum();
if sum != 21268323. {
panic!("Expected sum is 21268323 but found {}", sum);
}
let min = frame.min();
if min != 0. {
panic!("Expected min is 0 but found {}", min);
}
let max = frame.max();
if max != 6886. {
panic!("Expected max is 6886. but found {}", max);
}
}
Only LittleEndian files are supported.
Structs
Main exported structure.