Find acquisition parameters

When a spectrum or FID is loaded, the Bruker acquisition files (acqus, acqu2s, …), the pulse programme and any lists in the experiment folder are read. acqus looks up their values.

Parameters

Give acqus a Bruker parameter name, as a string in any case or as a lowercase symbol. Arrayed parameters (pulse lengths, delays, powers, …) take an index, numbered as in TopSpin. Times are converted to seconds and frequencies to Hz (see Time and frequency units):

julia> spec = exampledata("2D_HN");
julia> acqus(spec, :pulprog)"sfhmqcf3gpph.cw"
julia> acqus(spec, "TE") # temperature, K276.9988
julia> acqus(spec, :ns)2
julia> acqus(spec, :p, 1) # pulse length P1, s9.199999999999998e-6
julia> acqus(spec, :d, 1) # delay D1, s0.1

Without an index, an arrayed parameter is returned whole, as a dictionary keyed by the TopSpin index (so acqus(spec, :d)[0] is D0), which avoids confusing Bruker's zero-based arrays with Julia's one-based ones. The parameters of indirect dimensions, from acqu2s, acqu3s, …, are in the spectrum metadata under :acqu2s, :acqu3s, …, and the values that describe each dimension are also in its own metadata:

julia> spec[:acqu2s][:td]128
julia> spec[F2Dim, :td], spec[F2Dim, :swhz](64, 1337.97163500134)

Powers and channels

Power levels are returned as Power objects, which convert between dB and W (see Power levels, which also covers RF field strengths). The RF channels (:f1…:f8) are described by channels, which gives the frequencies of every nucleus pulsed in the experiment, including those without a detected axis, such as the carbon channel of an experiment read out on ¹H and ¹⁵N:

julia> p = acqus(spec, :plw, 1);
julia> watts(p), db(p)(6.999999999999998, -8.450980400142567)
julia> channels(spec, :f1)[:nucleus]H1::Nucleus = 0
julia> channels(spec, "13C")[:bf] # Hz1.5092041e8

A channel can be looked up by label (:f1), by Nucleus (C13) or by a string ("13C"), and its dictionary has keys :label, :nucleus, :bf (base frequency), :sfo (carrier frequency), :offsethz and :offsetppm.

Lists and other files

vclist, vdlist, valist, vplist and frequency lists (fq1list…) are read with acqus too, in NMRTools units: delays and pulse lengths in seconds, amplitudes in dB, and frequency lists as FQList objects (see Frequency lists). acqus returns nothing for a list that is not present.

julia> relax = exampledata("pseudo2D_T2");
julia> acqus(relax, :vclist)16-element Vector{Int64}: 1 2 4 8 12 16 24 32 48 64 96 128 192 256 320 384

Pulse programmes written with NMRTools' annotation format describe their own parameters; see Pulse programme annotations. loadmetadata reads all of this from an experiment folder without loading the data, and scanexperiments does so for every experiment in a folder (see Find sample information).