Skip to main content

Crate openreadout_spectro

Crate openreadout_spectro 

Source
Expand description

Clean-room readers for optical and vibrational spectroscopy files.

  • Bruker OPUS (bruker-opus, .0, .1, … numbered files): FT-IR/NIR/Raman spectra (absorbance, transmittance, reflectance, single-channel sample and reference spectra, interferograms, phases, 3D series) with the instrument, optics, acquisition and Fourier transform parameters. Notes: docs/formats/bruker-opus.md.
  • Thermo Fisher OMNIC (thermo-omnic, .spa single spectra and .spg groups): spectra with their acquisition header, title, timestamp and history. Notes: docs/formats/thermo-omnic.md.
  • Renishaw WiRE (renishaw-wdf, .wdf): Raman spectra, line scans, depth and time series and maps with their stage coordinates, laser wavelength, the property sets (grating, exposure, objective, laser power) and the white-light image. Notes: docs/formats/renishaw-wdf.md.
  • PerkinElmer (perkinelmer-sp, .sp): IR and UV-Vis spectra with instrument text. Notes: docs/formats/perkinelmer-sp.md.
  • JASCO Spectra Manager (jasco-jws, .jws, .jrs): FT-IR, Raman, UV-Vis, circular dichroism (CD, HT voltage, absorbance channels) and fluorescence spectra, from both the compound-file and the flat container, with the instrument, sample and FT-IR acquisition parameters. Notes: docs/formats/jasco-jws.md.
  • Galactic / Thermo GRAMS SPC (galactic-spc, .spc): single spectra and multifiles (spectrum series and maps exported by GRAMS, OMNIC, WiRE, Spectragryph and others), float or fixed-point values, with the log block’s instrument settings. Notes: docs/formats/galactic-spc.md.
  • Shimadzu UVProbe (shimadzu-uvprobe, .spc compound files from UV-Vis and UV-Vis-NIR spectrophotometers): one trace per data set. Notes: docs/formats/shimadzu-uvprobe.md.
  • Agilent (Varian) Cary UV-Vis (agilent-cary, .dsw Scan, .bsw batch Scan, .bsk Scanning Kinetics): absorbance spectra and baselines with their wavelengths, the instrument, application, parameter list, method log and collection times. Notes: docs/formats/agilent-cary.md.
  • PerkinElmer Spotlight images (perkinelmer-fsm, .fsm): FT-IR images as a spectrum trace (one sweep per pixel) with stage positions and a map, with the instrument record. Notes: docs/formats/perkinelmer-fsm.md.
  • Agilent FT-IR imaging (agilent-fpa, .dat/.seq with a .bsp header, mosaics .dms/.dmd/.drd with a .dmt header): focal-plane-array hyperspectral images from Cary 600 series microscopes (Resolutions Pro), as a spectrum trace (one sweep per pixel) and a map with one channel per wavenumber, or interferograms on their optical-path-difference axis, with the acquisition settings. Notes: docs/formats/agilent-fpa.md.
  • WITec Project / WITec Data (witec-project, .wip, .wid): confocal Raman microscopy projects — single spectra, line scans, depth profiles and Raman maps with their grating calibration (Raman shift, wavelength or energy axis), the images derived from them (band sums, masks, peak positions), video images and each measurement’s information text (excitation, grating, integration time, objective). Notes: docs/formats/witec-project.md.

Every spectrum set is a core trace: one sweep per spectrum, the y values as channel 0, and the x axis in extra.axis ({quantity, unit, first, last, step, size}: wavenumber in 1/cm, raman_shift in 1/cm, wavelength in nm or µm, points). An axis that is not evenly spaced (a grating spectrometer’s calibration) is {irregular: true, channel: 0} and the trace then has two channels: the x values and the y values. Spectra on a map grid are also one image with one channel per spectral point, so preview --channel N draws the map at band N.

§Example

use openreadout_core::FormatReader;
use openreadout_spectro::OpusReader;

let format = OpusReader.descriptor();
assert_eq!(format.id, openreadout_spectro::OPUS_FORMAT_ID);
println!("{} ({})", format.name, format.family);

Reading a file:

use std::path::Path;

use openreadout_core::FormatReader;
use openreadout_spectro::OpusReader;

let mut dataset = OpusReader.open(Path::new("sample.0"))?;
let info = dataset.info()?; // headers only
let t = &info.traces[0];
println!("{}: {} points, axis {}", t.name.as_deref().unwrap_or(""), t.sample_count, t.extra["axis"]);
let spectrum = dataset.read_trace(0, 0, 0, u64::MAX)?;
println!("first value {:?}", spectrum.channels[0].first());

§API stability

The supported API is what this page documents: the readers, their format ids and SpectroDataset (returned boxed by open).

Structs§

AgilentFpaReader
The Agilent FT-IR imaging reader (.dat, .seq, .dms, .dmd, .drd data files; .bsp, .dmt headers).
CaryReader
The Agilent (Varian) Cary UV-Vis reader (.dsw, .bsw, .bsk).
FsmReader
The PerkinElmer Spotlight image reader (.fsm).
JwsReader
The JASCO Spectra Manager reader (.jws, .jrs).
OmnicReader
The Thermo Fisher OMNIC reader (.spa, .spg).
OpusReader
The Bruker OPUS reader.
PeSpReader
The PerkinElmer .sp reader.
SpcReader
The Galactic / Thermo GRAMS .spc reader.
SpectroDataset
An opened spectroscopy file.
UvProbeReader
The Shimadzu UVProbe .spc reader (compound files; Galactic SPC shares the extension).
WdfReader
The Renishaw WiRE reader (.wdf).
WitecReader
The WITec Project / WITec Data reader (.wip, .wid).

Constants§

AGILENT_FPA_FORMAT_ID
Format id of Agilent FT-IR imaging (focal-plane-array) files.
CARY_FORMAT_ID
Format id of Agilent (Varian) Cary UV-Vis .dsw/.bsw/.bsk files.
FSM_FORMAT_ID
Format id of PerkinElmer Spotlight .fsm images.
JWS_FORMAT_ID
Format id of JASCO Spectra Manager .jws/.jrs files.
OMNIC_FORMAT_ID
Format id of Thermo Fisher OMNIC .spa/.spg files.
OPUS_FORMAT_ID
Format id of Bruker OPUS files.
PESP_FORMAT_ID
Format id of PerkinElmer .sp files.
SPC_FORMAT_ID
Format id of Galactic / Thermo GRAMS .spc files.
UVPROBE_FORMAT_ID
Format id of Shimadzu UVProbe .spc files.
WDF_FORMAT_ID
Format id of Renishaw WiRE .wdf files.
WITEC_FORMAT_ID
Format id of WITec Project .wip and WITec Data .wid files.