Expand description

Parser of the PONI files (pyFAI-calib output).

PONI is an acronym for Point Of Normal Incidence. It is the pixel coordinates of the orthogonal projection of the sample position on the detector (for plane detectors, or the plane z=0 for other). The PONI coincide with the beam center in the case of orthogonal setup but most of the time differs.

Usage example:

use integrustio::poni::Poni;
use std::path::Path;
use std::fmt;

fn read_poni1<P: AsRef<Path> + fmt::Debug>(poni: P) {
    let poni1 = Poni {
        pixel1: 0.00017199999999999998,
        pixel2: 0.00017199999999999998,
        distance: 0.142266095244,
        poni1: 0.284775045579,
        poni2: 0.126207280557,
        rot1: -0.000575699365876,
        rot2: -0.0123630633278,
        rot3: 7.40180673316e-06,
        wavelength: 7.22191445315e-11,
        version: 1,
    };
    let poni2 = match Poni::read_file(&poni) {
        Ok(poni) => poni,
        Err(e) => panic!("Could not read file {:?}: {}", poni, e),
    };
    assert_eq!(poni1, poni2);
}

Structs

PONI structure.

Traits

Tries to guess a pixel size from the detector name