Skip to main content

Crate nmr

Crate nmr 

Source
Expand description

Checked, vendor-neutral raw and processed NMR data models.

read detects and materializes a raw acquisition or processed spectrum. raw::open is the lazy, raw-only reader for trace and region access. Readers do not apply FFT, filtering, phasing, scan normalization, interpolation, or NUS reconstruction.

Public complex samples use R + iI. Readers apply a vendor-to-public sign transform only when supported by format evidence. Known nucleus labels use mass-number-first ASCII notation such as 1H and 13C; original vendor text remains available through vendor/source metadata.

Detection identifies and selects a candidate format. It does not promise that the selected scientific layout is supported by read or raw::open.

§Experimental algorithms

The supported scientific foundation is checked data models, evidence-aware reading and explicit deterministic processing. ACME, AsLS, the fixed 512/128 IST kernel and DensePipeline automatic policy have a separate experimental scope: successful execution is not a general inference-quality guarantee. Their accepted data domains, diagnostics and future replacement profiles are documented independently of the stable data and explicit-operation contracts. This project has not been released. APIs, algorithms and schemas are updated in place during development, retaining their initial version identifiers. Development snapshots have no backward-compatibility or migration guarantee.

Closed mathematical sets (raw/processed kind and positive/negative Fourier exponent) remain exhaustive. Extensible format/error/result classifications are non-exhaustive. Constructible request variants retain their listed fields; new contracts use new variants or checked parameter objects. Read-only result variants may acquire facts and require .. in external matches.

Algorithm quality and bitwise numerical reproducibility are separate from interface compatibility. Histories record the current algorithm identifiers and execution environment. Replay success does not compare output samples; numerical comparison is caller-owned.

let loaded = nmr::read("data/experiment")?;
println!("{:?}", loaded.source_format());

Re-exports§

pub use acquisition::AxisIndex;
pub use dataset::Dataset;
pub use dataset::ProcessedDatasetWithContext;
pub use dataset::RawDatasetWithContext;
pub use execution::CancellationToken;
pub use execution::ExecutionContext;

Modules§

acquisition
Canonical, vendor-neutral acquisition semantics.
axis
Vendor-neutral mathematical axis vocabulary.
data
Owned region blocks and bounded access to an immutable Dataset.
dataset
Materialized datasets with private storage and retained reading context.
derivation
Evidence-bearing library derivations that establish a new processing input.
execution
Synchronous cooperative execution control, independent of a host task runtime.
execution_report
Portable, versioned execution reports and independent numerical comparison.
export
Deterministic, bounded PlotData NPZ V1 export.
external
Checked boundaries for algorithms executed by the host application.
formats
Vendor-specific parsers and advanced in-memory decoding APIs.
plot
Checked scalar data prepared for plotting or export.
processed
Dense scientific data products with independently modeled axis domains.
processing
Bounded, history-bearing minimal processing for dense rank-1 through rank-3 data.
provenance
Source provenance and canonical identity shared by raw and processed datasets.
raw
Vendor-neutral raw-dataset model and bounded path access.
resource
Payload-capacity resource controls, not process RSS or allocator guarantees.
snapshot
Versioned embedded snapshots with exact binary samples and explicit history acceptance. Paths are recorded locators and are never accessed by restoration. The host owns compression, file transactions, and storage of earlier replay inputs.

Structs§

DatasetIdentity
Portable identity fields established without sequence-name guessing.
ParameterError
Structured vendor parameter failure.
ReadCandidate
A resolver candidate retained in ambiguity and mismatch errors.
ReadError
Error produced while detecting, reading, or accessing a dataset.
ReadLimits
Resource limits applied while opening and reading a dataset.
ReadOptions
Builder for unified detection and materialized reads.
SamplingDeclaration
A complete sampling assertion, retaining original indices and their source. This cannot override vendor evidence or change physical trace/lane order.

Enums§

DatasetKind
Whether a loaded dataset contains acquisition or processed samples.
Format
A precise supported input format.
FormatFamily
Vendor family shared by raw and processed representations.
InputSource
The concrete input associated with a reader failure.
MetadataField
Portable metadata field implicated by a warning.
ParameterErrorKind
Stable classification of a vendor parameter failure.
ReadErrorKind
Stable machine-readable category for a ReadError.
ReadErrorReason
Structured reason for a detection, decoding, or dataset-access failure.
ReadPreference
Policy for choosing between raw and processed candidates.
ReadResource
Resource governed by a reader byte limit.
ReadWarning
Non-fatal issue retained by a successful read.
SamplingIndexBase
Index convention of a caller-supplied sampling table.
WarningImpact
Scientific effect of omitted optional information.

Functions§

detect
Detects and selects a path using default selection policy.
read
Materializes a path using default selection policy.
read_with_context
Reads with default selection policy and shared execution control.

Type Aliases§

Complex64
Alias for a Complex<f64>