Skip to content

Scan#

Types from the scan area of the protocol that appear in API signatures and attributes.

Scan #

Oneofs
  • data:

id class-attribute instance-attribute #

id: str

Internal UUID for unique identification

kind class-attribute instance-attribute #

kind: ScanKind

timestamp class-attribute instance-attribute #

timestamp: datetime | None

profile class-attribute instance-attribute #

profile: str

device_snapshot class-attribute instance-attribute #

device_snapshot: Device | None

sample_snapshot class-attribute instance-attribute #

sample_snapshot: Sample | None

sequence_snapshot class-attribute instance-attribute #

sequence_snapshot: Sequence | None

user_data class-attribute instance-attribute #

user_data: dict[str, Any]

group class-attribute instance-attribute #

group: str | None

Group path (e.g., "Group1/SubGroup")

name class-attribute instance-attribute #

name: str | None

relax_1d class-attribute instance-attribute #

relax_1d: Scan1D | None

relax_2d class-attribute instance-attribute #

relax_2d: Scan2D | None

experiment_type class-attribute instance-attribute #

experiment_type: ExperimentType

Experiment type (auto-detected from pulse program during import)

integration_regions class-attribute instance-attribute #

integration_regions: list[IntegrationRegion]

Integration regions defined on this scan

molecule_overlay class-attribute instance-attribute #

molecule_overlay: MoleculeOverlay | None

Persistent placement of the molecule structure overlaid on this scan's plot.

origin class-attribute instance-attribute #

origin: ScanOrigin | None

Set when the scan arrived in a .nuclei file rather than from an instrument or vendor import.

timestamp_offset_unknown class-attribute instance-attribute #

timestamp_offset_unknown: bool

The file recorded a local wall-clock time without its UTC offset. timestamp then holds that wall-clock reading as if it were UTC: display it in UTC and say the offset is unknown.

data_summary class-attribute instance-attribute #

data_summary: ScanDataSummary | None

What the stored spectrum is, kept on the light record so a scan is classified without loading it. Unset for a scan stored before this existed, or one storing only a signal.

preprocessing_override class-attribute instance-attribute #

preprocessing_override: PreprocessingSettings | None

Overrides the project settings sub-message by sub-message: a set one replaces the project's, an unset one inherits it.

plot_annotations class-attribute instance-attribute #

plot_annotations: PlotAnnotations | None

Spectrum artwork; existing annotations stay on the spectrum.

signal_plot_annotations class-attribute instance-attribute #

signal_plot_annotations: PlotAnnotations | None

processing_pipeline class-attribute instance-attribute #

processing_pipeline: Postprocessing | None

The processing pipeline whose output is this scan's processed data, as it was run. Unset when standard preprocessing processes the scan. Reprocessing uses it in place of the preprocessing settings.

peak_label_style class-attribute instance-attribute #

peak_label_style: PeakLabelStyle | None

Peak label format for this scan; each field set replaces the project default.

reference class-attribute instance-attribute #

reference: bool

Marked as a reference: the personal spectral index searches it by default.

check_oneof #

check_oneof(values)

DiffusionData #

PFG diffusion (DOSY) acquisition parameters. delta/Delta/gamma are kept because the b-values written onto the indirect axis cannot be recomputed without them.

experiment_type class-attribute instance-attribute #

experiment_type: str

Experiment type: "DOSY", "STE", "LED", ...

b_values class-attribute instance-attribute #

b_values: list[float]

Stejskal-Tanner diffusion weighting per increment, s/m^2

gradient_strengths class-attribute instance-attribute #

gradient_strengths: list[float]

Raw gradient amplitudes as acquired, G/cm

delta_s class-attribute instance-attribute #

delta_s: float

Gradient pulse duration delta, seconds

big_delta_s class-attribute instance-attribute #

big_delta_s: float

Diffusion time Delta, seconds

gamma_rad_s_t class-attribute instance-attribute #

gamma_rad_s_t: float

Gyromagnetic ratio used for the b-value calculation, rad/s/T

temperature_k class-attribute instance-attribute #

temperature_k: float

Sample temperature, Kelvin; 0 when the acquisition recorded none.

solvent class-attribute instance-attribute #

solvent: str

Solvent name as recorded, for the viscosity lookup.

ExperimentType #

Type of NMR experiment. Best-effort auto-detected from pulse program name during import, or set manually. UNSPECIFIED is a valid default for unknown experiments.

EXPERIMENT_UNSPECIFIED class-attribute instance-attribute #

EXPERIMENT_UNSPECIFIED = 0

EXPERIMENT_1D class-attribute instance-attribute #

EXPERIMENT_1D = 1

1D

EXPERIMENT_DEPT class-attribute instance-attribute #

EXPERIMENT_DEPT = 2

Multiplicity-edited 1D carbon: CH and CH3 up, CH2 down.

EXPERIMENT_DEPT_135 class-attribute instance-attribute #

EXPERIMENT_DEPT_135 = 3

DEPT-135 specifically: CH and CH3 up, CH2 down. Kept distinct because its mixed polarity requires polarity-preserving phase/window processing.

EXPERIMENT_APT class-attribute instance-attribute #

EXPERIMENT_APT = 4

Attached proton test (J-modulated spin echo): C and CH2 one way, CH and CH3 the other, so its lines are phased absorptive and never turned upright.

EXPERIMENT_COSY class-attribute instance-attribute #

EXPERIMENT_COSY = 10

Homonuclear 2D

EXPERIMENT_NOESY class-attribute instance-attribute #

EXPERIMENT_NOESY = 11

EXPERIMENT_TOCSY class-attribute instance-attribute #

EXPERIMENT_TOCSY = 12

EXPERIMENT_JRES class-attribute instance-attribute #

EXPERIMENT_JRES = 13

EXPERIMENT_ROESY class-attribute instance-attribute #

EXPERIMENT_ROESY = 14

EXPERIMENT_HSQC class-attribute instance-attribute #

EXPERIMENT_HSQC = 20

Heteronuclear 2D

EXPERIMENT_HMQC class-attribute instance-attribute #

EXPERIMENT_HMQC = 21

EXPERIMENT_HMBC class-attribute instance-attribute #

EXPERIMENT_HMBC = 22

EXPERIMENT_HETCOR class-attribute instance-attribute #

EXPERIMENT_HETCOR = 23

Carbon-detected heteronuclear correlation: the direct axis is 13C, not 1H.

EXPERIMENT_T1_IR class-attribute instance-attribute #

EXPERIMENT_T1_IR = 30

Relaxation

Inversion recovery T1

EXPERIMENT_T2_CPMG class-attribute instance-attribute #

EXPERIMENT_T2_CPMG = 31

CPMG T2

EXPERIMENT_T2_SE class-attribute instance-attribute #

EXPERIMENT_T2_SE = 32

Spin-echo T2

EXPERIMENT_DOSY class-attribute instance-attribute #

EXPERIMENT_DOSY = 40

Other

Diffusion ordered spectroscopy

EXPERIMENT_KINETICS class-attribute instance-attribute #

EXPERIMENT_KINETICS = 41

Arrayed 1D spectra against time (reaction monitoring); F1 is the acquisition time.

MoleculeOverlay #

Persistent placement of the molecule structure overlaid on a scan's plot. Coordinates are fractions of the PLOT AREA (0..1), so the placement is resolution-independent and renders identically on the live plot and in reports.

visible class-attribute instance-attribute #

visible: bool

manual "show molecule on canvas" toggle

x class-attribute instance-attribute #

x: float

overlay box top-left, fraction of plot-area width

y class-attribute instance-attribute #

y: float

overlay box top-left, fraction of plot-area height

size class-attribute instance-attribute #

size: float

overlay box edge length, fraction of plot-area WIDTH

rotation_deg class-attribute instance-attribute #

rotation_deg: float

smiles class-attribute instance-attribute #

smiles: str

SMILES cached here so the report renderer can draw the molecule without a PubChem round-trip. Source of truth for the molecule remains the sample's compound_formula; this mirrors the resolved value.

show_atom_numbers class-attribute instance-attribute #

show_atom_numbers: bool

Draw each atom's display number (the project's atom numbering setting) beside it.

label_all_atoms class-attribute instance-attribute #

label_all_atoms: bool

Label every atom; otherwise only those that carry a hydrogen or an assignment.

PlotAnnotation #

id class-attribute instance-attribute #

id: str

kind class-attribute instance-attribute #

a class-attribute instance-attribute #

b class-attribute instance-attribute #

points class-attribute instance-attribute #

color class-attribute instance-attribute #

color: str

width class-attribute instance-attribute #

width: float

fill class-attribute instance-attribute #

fill: bool

text class-attribute instance-attribute #

text: str

rotation class-attribute instance-attribute #

rotation: float

image_src class-attribute instance-attribute #

image_src: str

Embedded raster image data URL; no paths or external resources.

font_size class-attribute instance-attribute #

font_size: float

frame class-attribute instance-attribute #

frame: PlotAnnotationFrame | None

inset class-attribute instance-attribute #

inset: PlotInset | None

Set when kind is PLOT_ANNOTATION_INSET.

mol_block class-attribute instance-attribute #

mol_block: str

Set when kind is PLOT_ANNOTATION_STRUCTURE: the structure as an MDL mol block.

PlotAnnotationFrame #

Reference axis window and CSS dimensions at authoring time. Geometry is kept in this frame, anchored to data and uniformly scaled with the horizontal axis.

x_start class-attribute instance-attribute #

x_start: float

x_end class-attribute instance-attribute #

x_end: float

y_start class-attribute instance-attribute #

y_start: float

y_end class-attribute instance-attribute #

y_end: float

width class-attribute instance-attribute #

width: float

height class-attribute instance-attribute #

height: float

x_unit class-attribute instance-attribute #

x_unit: str

y_unit class-attribute instance-attribute #

y_unit: str

reference_frequency_hz_x class-attribute instance-attribute #

reference_frequency_hz_x: float

reference_frequency_hz_y class-attribute instance-attribute #

reference_frequency_hz_y: float

PlotAnnotationKind #

PLOT_ANNOTATION_UNSPECIFIED class-attribute instance-attribute #

PLOT_ANNOTATION_UNSPECIFIED = 0

PLOT_ANNOTATION_TEXT class-attribute instance-attribute #

PLOT_ANNOTATION_TEXT = 1

PLOT_ANNOTATION_ARROW class-attribute instance-attribute #

PLOT_ANNOTATION_ARROW = 2

PLOT_ANNOTATION_LINE class-attribute instance-attribute #

PLOT_ANNOTATION_LINE = 3

PLOT_ANNOTATION_RECTANGLE class-attribute instance-attribute #

PLOT_ANNOTATION_RECTANGLE = 4

PLOT_ANNOTATION_ELLIPSE class-attribute instance-attribute #

PLOT_ANNOTATION_ELLIPSE = 5

PLOT_ANNOTATION_PEN class-attribute instance-attribute #

PLOT_ANNOTATION_PEN = 6

PLOT_ANNOTATION_TRIANGLE class-attribute instance-attribute #

PLOT_ANNOTATION_TRIANGLE = 7

PLOT_ANNOTATION_DIAMOND class-attribute instance-attribute #

PLOT_ANNOTATION_DIAMOND = 8

PLOT_ANNOTATION_BRACKET class-attribute instance-attribute #

PLOT_ANNOTATION_BRACKET = 9

PLOT_ANNOTATION_IMAGE class-attribute instance-attribute #

PLOT_ANNOTATION_IMAGE = 10

PLOT_ANNOTATION_HIGHLIGHT class-attribute instance-attribute #

PLOT_ANNOTATION_HIGHLIGHT = 11

Translucent band; spans the full plot height when only x is data-anchored (1D).

PLOT_ANNOTATION_INSET class-attribute instance-attribute #

PLOT_ANNOTATION_INSET = 12

The same traces over a narrower x window, drawn in a placement box; inset holds both.

PLOT_ANNOTATION_POLYGON class-attribute instance-attribute #

PLOT_ANNOTATION_POLYGON = 13

Closed shape through points; fill shades it.

PLOT_ANNOTATION_STRUCTURE class-attribute instance-attribute #

PLOT_ANNOTATION_STRUCTURE = 14

A drawn structure in the box a..b, from mol_block.

PlotAnnotationPoint #

x class-attribute instance-attribute #

x: float

y class-attribute instance-attribute #

y: float

PlotAnnotations #

User-authored artwork in plot-area fractions. Order is back-to-front.

items class-attribute instance-attribute #

PlotInset #

A zoom inset: the source window in the annotation frame's x unit, and where the inset sits.

x_start class-attribute instance-attribute #

x_start: float

Source x window, in the frame's x unit; either order.

x_end class-attribute instance-attribute #

x_end: float

y_start class-attribute instance-attribute #

y_start: float | None

Manual y window; both unset autoscales to the traces inside the x window.

y_end class-attribute instance-attribute #

y_end: float | None

place_x class-attribute instance-attribute #

place_x: float

Placement box in plot-area fractions, from the top left.

place_y class-attribute instance-attribute #

place_y: float

place_width class-attribute instance-attribute #

place_width: float

place_height class-attribute instance-attribute #

place_height: float

f1_start class-attribute instance-attribute #

f1_start: float | None

Source F1 window of a 2D plane inset, in the frame's y unit; either order. Both set or both unset; unset is a 1D inset.

f1_end class-attribute instance-attribute #

f1_end: float | None

RelaxometryData #

Relaxometry experiment data for T1/T2/CPMG measurements Note: We only store metadata here. The actual 2D signal is stored in Scan2D.accumulated_signal and is re-processed on load to allow adjusting multi-group detection parameters (min_distance_ppm).

experiment_type class-attribute instance-attribute #

experiment_type: str

Experiment type: "T1_IR", "T2_CPMG", etc.

time_axis_ms class-attribute instance-attribute #

time_axis_ms: list[float]

Time axis in milliseconds (tau values or echo times)

RelaxometryFit #

A relaxation measurement: the decay of each group and the fit of all of them.

inputs class-attribute instance-attribute #

inputs: str

Digest of everything it was measured from: the arrayed spectrum shown, the delays, the experiment type and the fit settings. A load whose inputs give another digest measures again.

groups class-attribute instance-attribute #

The groups that were fitted, in group order.

result class-attribute instance-attribute #

result: TuneResult | None

Every fitted component; each one's params name its group, window and R². No components: the fit failed for these inputs.

experiment_type class-attribute instance-attribute #

experiment_type: str

The model fitted: "T1_IR", "T1", "T2_CPMG", ...

RelaxometryGroup #

One spectral group of a relaxometry series: its window and its integral on every delay.

low_ppm class-attribute instance-attribute #

low_ppm: float

high_ppm class-attribute instance-attribute #

high_ppm: float

decay class-attribute instance-attribute #

decay: list[float]

One value per delay, in the order of RelaxometryData.time_axis_ms.

Scan1D #

accumulated_signal class-attribute instance-attribute #

accumulated_signal: Signal1D | None

Accumulated results (always present)

accumulated_spectrum class-attribute instance-attribute #

accumulated_spectrum: Spectrum1D | None

metadata class-attribute instance-attribute #

metadata: AcquisitionMetadata | None

Acquisition metadata

individual_scans class-attribute instance-attribute #

individual_scans: list[Signal1D]

Individual scans (optional, may be stored separately for large datasets)

flagged_scan_indices class-attribute instance-attribute #

flagged_scan_indices: list[int]

Quality control: indices of scans flagged as bad

qc_notes class-attribute instance-attribute #

qc_notes: str

signal_visualization_handler class-attribute instance-attribute #

signal_visualization_handler: str

Visualization handler IDs for frontend rendering

spectrum_visualization_handler class-attribute instance-attribute #

spectrum_visualization_handler: str

manual_peaks class-attribute instance-attribute #

manual_peaks: list[PeakInfo]

DERIVED projection of the EDIT_KIND_ADD entries in the peak edit log. Kept populated so existing consumers keep working; the log is the source of truth and this is a view of part of it.

peak_edits class-attribute instance-attribute #

peak_edits: PeakEditLog | None

The peak EDIT LOG: every human decision ever made about this scan's peak list, append-only, and the source of truth manual_peaks above is derived from.

Carried ON the scan rather than in a sidecar because scans get copied between machines and mailed to colleagues, and a sidecar does not travel with the file — the edits would be silently lost on transfer, which is worse than the immutability concern. Nothing here touches the ACQUIRED DATA: the signal and spectrum arrays and the acquisition metadata are untouched, and this sits beside them exactly as manual_peaks and integration_regions already do.

relaxometry_fit class-attribute instance-attribute #

relaxometry_fit: RelaxometryFit | None

The relaxation measurement of a CPMG echo train (a low-field relaxometer's 1D record), reused on every load until what it was measured from changes. The 1D counterpart of Scan2D.relaxometry_fit.

pipeline_input_signal class-attribute instance-attribute #

pipeline_input_signal: Signal1D | None

What a processing pipeline read when it produced accumulated_signal and accumulated_spectrum, stored as it was, so reprocessing runs on the data the pipeline saw. Unset unless Scan.processing_pipeline is set.

pipeline_input_spectrum class-attribute instance-attribute #

pipeline_input_spectrum: Spectrum1D | None

noise_range class-attribute instance-attribute #

noise_range: NoiseRange | None

The stretch the user declared noise-only; the signal-to-noise of every line is read against it. Unset means the noise is estimated from the whole trace.

line_fits class-attribute instance-attribute #

line_fits: list[LineFit]

Fits of regions the user accepted, for reproducing them and for qNMR.

Scan2D #

accumulated_signal class-attribute instance-attribute #

accumulated_signal: Signal2D | None

Accumulated results (always present)

accumulated_spectrum class-attribute instance-attribute #

accumulated_spectrum: Spectrum2D | None

metadata class-attribute instance-attribute #

metadata: AcquisitionMetadata | None

Acquisition metadata

qc_notes class-attribute instance-attribute #

qc_notes: str

Quality control

signal_visualization_handler class-attribute instance-attribute #

signal_visualization_handler: str

Visualization handler IDs for frontend rendering

spectrum_visualization_handler class-attribute instance-attribute #

spectrum_visualization_handler: str

relaxometry_data class-attribute instance-attribute #

relaxometry_data: RelaxometryData | None

Relaxometry data for T1/T2/CPMG experiments (optional)

manual_peaks class-attribute instance-attribute #

manual_peaks: list[PeakInfo2D]

DERIVED projection of the EDIT_KIND_ADD entries in the peak edit log. Kept populated so existing consumers keep working; the log is the source of truth and this is a view of part of it.

peak_edits class-attribute instance-attribute #

peak_edits: PeakEditLog | None

The peak EDIT LOG: every human decision ever made about this scan's peak list, append-only, and the source of truth manual_peaks above is derived from.

Carried ON the scan rather than in a sidecar because scans get copied between machines and mailed to colleagues, and a sidecar does not travel with the file — the edits would be silently lost on transfer, which is worse than the immutability concern. Nothing here touches the ACQUIRED DATA: the signal and spectrum arrays and the acquisition metadata are untouched, and this sits beside them exactly as manual_peaks and integration_regions already do.

diffusion_data class-attribute instance-attribute #

diffusion_data: DiffusionData | None

PFG diffusion (DOSY) parameters (optional)

cross_peak_assignments class-attribute instance-attribute #

cross_peak_assignments: CrossPeakAssignments | None

Cross-peak to atom-pair assignments. On the scan for the same reason the edit log is: a crosspeak identity only means anything in this peak list.

relaxometry_fit class-attribute instance-attribute #

relaxometry_fit: RelaxometryFit | None

The relaxation measurement of a relaxometry series, reused on every load until what it was measured from changes. On the scan, not the sample: it describes this data, and travels with the file.

pipeline_input_signal class-attribute instance-attribute #

pipeline_input_signal: Signal2D | None

What a processing pipeline read when it produced accumulated_signal and accumulated_spectrum, stored as it was, so reprocessing runs on the data the pipeline saw. Unset unless Scan.processing_pipeline is set.

pipeline_input_spectrum class-attribute instance-attribute #

pipeline_input_spectrum: Spectrum2D | None

disabled_shift_scan_ids class-attribute instance-attribute #

disabled_shift_scan_ids: list[str]

Sibling scans whose measured shifts the user turned off for cross-peak assignment.

shift_use class-attribute instance-attribute #

shift_use: ShiftUse

Whether cross-peak assignment takes measured shifts from the scans open on pages.

ScanDataSummary #

dimensions class-attribute instance-attribute #

dimensions: int

1 or 2.

nucleus class-attribute instance-attribute #

nucleus: Nucleus

The direct (F2) axis nucleus.

nucleus_f1 class-attribute instance-attribute #

nucleus_f1: Nucleus

The indirect (F1) axis nucleus of a plane.

f1_is_parameter class-attribute instance-attribute #

f1_is_parameter: bool

F1 is an experiment parameter or a coupling axis (J-resolved), not a chemical shift.

ScanKind #

NMR_RELAX_1D class-attribute instance-attribute #

NMR_RELAX_1D = 0

NMR_RELAX_2D class-attribute instance-attribute #

NMR_RELAX_2D = 1

ScanOrigin #

origin_scan_id class-attribute instance-attribute #

origin_scan_id: str

Scan.id inside the package; differs from Scan.id when the import remapped it.

package_id class-attribute instance-attribute #

package_id: str

content_sha256 class-attribute instance-attribute #

content_sha256: str

ScanEntry.member.sha256 as imported; identifies a re-import of the same content.

imported_at class-attribute instance-attribute #

imported_at: datetime | None

imported_by class-attribute instance-attribute #

imported_by: str

origin_profile class-attribute instance-attribute #

origin_profile: str

The exporter's profile name, display only.

signer_fingerprint class-attribute instance-attribute #

signer_fingerprint: str

ScanPlotAnalysis #

peaks class-attribute instance-attribute #

peaks: list[PeakInfo]

multiplets class-attribute instance-attribute #

multiplets: list[MultipletGroup]

integrals class-attribute instance-attribute #

integrals: list[IntegrationRegionResult]