Window functions and lineshapes

Window functions

NMRTools.NMRBase.WindowFunction — Type
WindowFunction

Abstract type to represent apodization functions.

Window functions are represented by subtypes of the abstract type WindowFunction, each of which contain appropriate parameters to specify the particular function applied. In addition, the acquisition time tmax is also stored (calculated at the point the window function is applied, i.e. after linear prediction but before zero filling).

source
NMRTools.NMRBase.SineWindow — Type
SineWindow(offset, endpoint, power, tmax)

Abstract window function representing multiplication by sine/cosine functions. Acquisition time is tmax.

\[\left[\sin\left( \pi\cdot\mathrm{offset} + \frac{\left(\mathrm{end} - \mathrm{offset}\right)\pi t}{\mathrm{tmax}} \right)\right]^\mathrm{power}\]

Specialises to CosWindow, Cos2Window or GeneralSineWindow.

Arguments

  • offset: initial value is $\sin(\mathrm{offset}\cdot\pi)$ (0 to 1)
  • endpoint: initial value is $\sin(\mathrm{endpoint}\cdot\pi)$ (0 to 1)
  • pow: sine exponent
source
NMRTools.NMRBase.Cos2Window — Type
Cos2Window(tmax=Inf)

Apodization by a cosine-squared function, cos²(πt / 2tmax), falling from 1 at t = 0 to 0 at tmax. When tmax is left at Inf, apodize sets it to the acquisition time. Equivalent to TopSpin's QSINE with SSB = 2.

Cos²Window is an alias, kept for compatibility.

See also CosWindow, SineWindow.

source
NMRTools.NMRBase.GaussWindow — Type
GaussWindow(expHz, gaussHz, center, tmax)

Abstract representation of Lorentz-to-Gauss window functions, applying an inverse exponential of expHz Hz, and a gaussian broadening of gaussHz Hz, with maximum at center (between 0 and 1). Acquisition time is tmax.

Specialises to LorentzToGaussWindow when center is zero, otherwise GeneralGaussWindow.

source
NMRTools.NMRBase.apod — Function
apod(spec::NMRData, dimension, zerofill=true)

Return the time-domain apodization function for the specified axis, as a vector of values.

source

Lineshapes

NMRTools.NMRBase.lineshape — Function
lineshape(axis, δ, R2, complexity=RealLineshape())

Return a simulated real- or complex-valued spectrum for a resonance with chemical shift δ and relaxation rate R2, using the parameters and window function associated with the specified axis.

source