I'm writing a parser that reads fid binary files and ASCII procpar files from FT-NMR experiments, most of them acquired using Varian instruments. This instruments do not keep the time values at which each intensity is acquired. So there is no obvious way you'd plot Intensity vs Time.

How do the standard visual programs get the time values? What I found though, is that the acquisition time (time they measure intensity) is stored in an ASCII file, probably in seconds. procpar files store every detail (spectrometer frequency, pulse width (time), pulse width to rotate the magnetisation by 90° etc.)

I could assume intensity is measured at regular intervals, and divide total-time/data-points, but there may be something else I am missing.

I could also test Fourier transforming the data but it would be time consuming.

The 1D FIDs seems to store real data, also some 2Ds that I've found elsewhere. But I am aware that they may store complex data, in which case the data-points are divided by 2, and a different treatment altogether may be needed.

The FIDs may be 1D, 2D etc, only limited by the instrument capabilities. 2D FIDs seem to hold a large set of fid results, all would be linked to the same time axis, or some similar rearrangement afaiu. There can also be '1D arrayed' data, that I am not yet sure how to interpret. May just be a set of 1D FIDs.

  • 3
    $\begingroup$ In order to apply discrete Fourier transform, the fundamental requirement is to have uniform sampling rate. $\endgroup$
    – AChem
    Feb 9, 2022 at 17:45
  • 1
    $\begingroup$ @BuckThorn updated, we can chat for more details if you are keen to. I am writing a parser in Typescript for those files. There are parsers in other langs, but I like to do it by myself from scratch. Plots show well w/o time axis bc I plot using array indexes, which are also equidistant. $\endgroup$
    – user101368
    Feb 10, 2022 at 9:56
  • $\begingroup$ By intensity, do you mean individual data points in the FIDs? $\endgroup$ Feb 10, 2022 at 11:51
  • $\begingroup$ Yes. It is an electric current induced in a wire by the variable bulk magnetization field, I believe. I have to say that I included the required details but it is going to confuse a reader. The answer is "yes" if I assume the $\Delta t$ are equidistant. Which seems to be correct. I was expecting some further insights maybe. Thanks for the edit @orthocresol. $\endgroup$
    – user101368
    Feb 10, 2022 at 13:16

3 Answers 3


1D data

Generally, yes, data points in the FID are acquired uniformly. So, the sampling interval will simply be the acquisition time divided by the number of points.

As Buck Thorn pointed out in some (now deleted) comments, however, there is a slight subtlety in that FIDs in NMR are inherently complex-valued, whereas computers only store real numbers (i.e. complex numbers must be stored as a pair of real numbers). I'm not sure what Varian machines do, but on Bruker machines, the data array actually alternates between real and imaginary points. So, data point 1 is actually the real part of the first complex data point, data point 2 is the imaginary component, etc. So instead of $N$ real data points you actually get $N/2$ complex data points, with an effective sampling interval that is twice of what was earlier mentioned.

This is not as big a problem as it might seem. Using $N/2$ complex data points sampled at half the rate for a complex FFT, or $N$ real data points for a real FFT, will actually give you the same spectral window by the Nyquist theorem. The resulting spectrum will also be the same, although you may need to use the fftshift() function to correct the frequencies.

There is more in-depth discussion of this issue in this article: Turner & Hill, J. Magn. Reson. 1986, 66, 410.

I'm aware of examples where 1D data is acquired in a non-uniform manner and the missing points are reconstructed. See e.g. Ndukwe et al., ChemPhysChem 2016, 17, 2799. These are pretty niche, though, and I'd say that virtually all 1D data you will encounter is uniformly sampled.

2D data

2D data is a lot more complicated. Generally, these are functions of two time variables: $S = S(t_1, t_2)$, so they are stored as matrices, built up of many FIDs.

Within each FID, $t_1$ is a constant, and $t_2$ varies. Between each FID, the value of $t_1$ changes. So, it's often the case that each row of the matrix is one FID, and so the columns represent different values of $t_2$, and the rows represent different values of $t_1$. However, you should consult the manufacturer's manuals as to the exact format in which this data is stored (row-major or column-major).

The $t_2$ dimension is entirely analogous to 1D spectra (essentially, 2D NMR is about collecting many 1D spectra with different values of $t_1$). Hence, it's still almost always the case that data is uniformly sampled in the $t_2$ dimension.

However, the $t_1$ dimension is way more complicated, for three reasons:

  1. There is a similar issue to the real/complex difference mentioned previously for 1D data. In the case of 2D data, it's very often the case that the first and second FIDs actually have the same value of $t_1$, but are actually different experiments designed to yield the real and imaginary part of a complex number (the States method). Alternatively, the first and second FIDs have the same value of $t_1$, and are meant to allow you to regain the real and imaginary parts of a complex number through linear combination (echo-antiecho method). Alternatively, the first and second FIDs actually have different values of $t_1$ (TPPI method, or magnitude-mode spectra).

    In general, it is not sufficient to directly perform Fourier transformation on a 2D data matrix read from a file without any extra processing.

    The entire reason for this is so that positive and negative frequencies can be discriminated in the $t_1$ dimension after Fourier transformation, and is technically known as quadrature detection. This is an extremely important topic in 2D NMR and there is no way I can explain this fully; I instead refer you to a textbook such as Keeler's Understanding NMR Spectroscopy.

  2. The 'complex' signals in $t_2$ are in fact orthogonal to the 'complex' signals in $t_1$, in the sense that the imaginary units used in both dimensions are to be considered separately. That means that, instead of a 2D matrix of complex numbers $a + bi$, you actually have a 2D matrix of hypercomplex numbers (or quaternions) $a + bi + cj + dij$, where $i$ and $j$ represent the imaginary units in the two dimensions. The number $a$ is real in both dimensions, $b$ and $c$ are imaginary in one of the two dimensions each, and $d$ is imaginary in both dimensions. On Bruker machines, each of these four components are stored in separate files. I don't know what Varian data looks like, but I expect it to be broadly similar.

  3. In recent years non-uniform sampling (NUS) in the $t_1$ dimension is becoming more and more common, and there is a non-negligible chance that any random 2D dataset you obtain from someone in fact uses non-uniform sampling. In fact, when people talk about non-uniform sampling in NMR they are almost always referring to the $t_1$ dimension of 2D NMR (or higher-dimensional NMR). A simple Google search for NUS in NMR will likely bring up several reviews.


It is not necessary to acquire NMR data at a uniform sampling rate (regular time intervals), but it is the standard practice in a large majority of cases. Most experiments acquire data with a uniform sampling rate in order to take advantage of numerical methods such as the Fast Fourier Transform (FFT), which is designed for application to regularly sampled data and whose development was a key to widespread adoption of NMR. There are likely other advantages with regular sampling, including simpler electronics, scheduling of acquisition, data processing, and ease of troubleshooting (although tools to process irregularly sampled data can come to the rescue as a troubleshooting tool when regularly acquired data is partly corrupted). Some modern NMR acquisition methods and complementary processing techniques attempt to circumvent shortcomings of regular sampling by applying irregular sampling.

One shortcoming of regular sampling, particularly of a complete FID, is that it requires a lot of time (and memory, but that is secondary), particularly in the case in multidimensional NMR, where experimental acquisition times can become rather lengthy (days, possibly more) and therefore also costly.

One way to shorten acquisition times is to truncate FIDs in either the direct or the indirect dimensions. In the direct observe dimension it is also common to truncate acquisition before completely sampling an FID to avoid problems with application of high-power pulses when suppressing particular NMR interactions during acquisition. Truncation effects can be ameliorated using prediction and apodization algorithms that are included as standard tools in current NMR instrument software.

Irregular sampling is another more complex way to shorten the required number of points acquired in the indirect dimension, with potentially large rewards in saved time. There are a number of techniques available as standard tools on modern NMR instrumentation to schedule irregular sampling and process the data. Older data (maybe more than 15 years old) was most likely not acquired with irregular sampling techniques.

On Varian (now Agilent) instruments the number of points is stored in the procpar file. To determine the acquisition time, sweep width (half the sampling rate), or number of points for your data set I suggest looking at parameters np,sw, and at, which are described in the VnmrJ users manual:

np Number of data points
Description: Sets number of data points to be acquired. Generally, np is a dependent parameter and is calculated automatically when sw or at is changed. If a particular number of data points is desired, np can be entered, in which case at becomes the dependent parameter and is calculated based on sw and np. Values: np is constrained to be a multiple of 2 (Acquisition Controller or Pulse Sequence Controller board) or a multiple of 64 (Output board). (See the acquire statement in the manual User Programming for a description of these boards.

at Acquisition time
Description: Length of time during which each FID is acquired. Since the sampling rate is determined by the spectral width sw, the total number of data points to be acquired (2swat) is automatically determined and displayed as the parameter np. at can be entered indirectly by using the parameter np. Values: Number, in seconds. A value that gives a number of data points that is not a multiple of 2 is readjusted automatically to be a multiple of 2

sw Spectral width in directly detected dimension
Description: Sets the total width of the spectrum to be acquired, from one end to the other. All spectra are acquired using quadrature detection. The spectral width determines the sampling rate for data, which occurs at a rate of 2*sw points per second (actually sw pairs of complex points per second). Note that the sampling rate itself is not entered, either directly or as its inverse (known on some systems as the dwell time). If a value of sw is entered whose inverse is not an even multiple of the time base listed above, sw is automatically adjusted to a slightly different value to give an acceptable sampling rate. To enter a value in ppm, append the character p (e.g., sw=200p). If a DSP facility is present in the system (i.e., dsp='i' or dsp='r') and oversampling in the experiment has not been turned off by setting oversamp='n', then the oversampling factor will be recalculated.


Somewhere in the metadata of your measurement, there is a value called "dwell time". That is the length of the interval which is represented by a single point in your FID, or, if you look at an oldschool AD converter, the time interval between triggering the readout of one value and the next.

In the old days (of FTNMR, not the very old days of CW NMR), the real and imaginary FID intensities were sampled alternatingly, using a single ADC.

Later (probably since the eighties?), one would always have two ADCs running at the same acquisition rate, each connected to one output of the quadrature receiver.

Today, the transients are sampled at extremely high rates (oversampling at 100s of MHz) and digitally filtered/downsampled to a reasonable bandwidth/data rate before they are accumulated and stored like a normal FID from the eighties. ;)

That's regular 1D data, and the first dimenson in nD. For all dimension >1, as was explained in the other answers, everything depends on the exact experiment that was carried out. The exact, absolute time in which each single point was measured could be reconstructed, but it is rarely of any importance, unless you're doing reaction monitoring, i.e. measuring just one spectrum after the other.

  • 1
    $\begingroup$ I guess it's kinda off topic, but do you know where I could read more about the oversampling / digital filter techniques? I've always known they've existed (and the more practical consequences, e.g. the lack of spectral aliasing in direct dimensions), but never found any resource which got into the details. (+1'd it yesterday, naturally.) $\endgroup$ Feb 11, 2022 at 14:45
  • 1
    $\begingroup$ @orthocresol There is nothing NMR-specific about it afaik, standard DSP techniques. Oversampling is simply replacing e.g. 4 consecutive datapoints by a single point having their average value. The simplest filter uses a running average, or you can use filter functions that are not just a boxcar, but e.g. a gaussian. Mathematically that is done via convolution/deconvolution. I've long wanted to have a comprehensive book explaining that in more details. If you find one, let me know. $\endgroup$
    – Karl
    Feb 12, 2022 at 22:56
  • 1
    $\begingroup$ What you describe as oversampling is actually called downsampling. Oversampling simply means that we are way above the Nyqyuist limit. $\endgroup$
    – AChem
    Feb 13, 2022 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.