Signal Processing

Fourier transforms, sampling and aliasing, and RF slice profiles.

Larmor frequency

The Carrier Frequency slider below simulates the role of the Larmor frequency in MRI — the frequency at which protons precess in a magnetic field B0, given by f₀ = γ × B0 where γ = 42.577 MHz/T is the proton gyromagnetic ratio. The actual NMR signal consists of tissue contrast information (T1, T2, proton density) amplitude- and phase-modulated onto this carrier frequency — analogous to AM radio where audio is modulated onto a radio carrier. The MRI receiver uses quadrature detection to demodulate back to baseband before sampling, which also allows it to distinguish positive from negative frequencies.

1D and 2D Fourier Transform Visualizer

Signal Width: for Sinc pulses, width controls the time-bandwidth product — a narrower sinc pulse produces a wider frequency spectrum and vice versa, directly analogous to how a shorter RF pulse excites a broader range of frequencies in MRI. For Rectangular pulses, width is the full pulse duration. For Gaussian pulses, width is the standard deviation. Carrier Frequency (Hz): applies cosine modulation to shift the signal center frequency, analogous to off-resonance RF excitation in MRI. Sampling Rate: controls how many times per unit time the signal is sampled — must be at least 2x the highest signal frequency to satisfy the Nyquist criterion and avoid aliasing.

Nyquist frequency (fs/2)
Carrier Frequency (Hz)
Aliasing (carrier criterion)

Auto Nyquist sets fs to exactly twice the selected carrier frequency. The envelope also has bandwidth, so this carrier criterion does not guarantee alias-free sampling of the entire signal.

Wider signals have narrower bandwidth; shorter signals spread energy over a wider frequency range. Cosine modulation shifts the spectrum toward ± the selected frequency.

The selected waveform is applied along both axes: image(x, y) = signal(x) × signal(y). All controls above also apply to the 2D panels; the sample count is per axis. Panels show at most 512 samples per axis; larger counts are subsampled for display only.

In MRI, the 2D Fourier transform of the imaging object produces k-space. The shape of the object in image space determines the distribution of energy in k-space: broad, smooth structures concentrate energy near the center, while sharp edges and fine detail extend energy toward higher spatial frequencies. Here the time/frequency axes provide a mathematical analogue of image position and spatial frequency in MRI.


RF Pulse & Slice Profile Simulator

The RF envelope follows the Signal type selected above.

Required RF bandwidth (Hz)
Required pulse duration (ms)
Time-bandwidth product
Achieved slice thickness (mm, FWHM)

BW = γ × Gss × thickness; γ = 42.577 MHz/T. Duration = TBW / BW. The selected signal type sets the RF envelope. Profiles use the small-tip approximation |FT(RF)|, with frequency mapped to position by the slice-select gradient. These are baseband envelopes.

Achieved thickness is the central-lobe full width at half the on-resonance magnitude. TBW uses the requested bandwidth: the actual bandwidth can differ, especially for a rectangular pulse, whose duration alone determines its sinc-shaped spectrum.

Slice thickness is determined by RF pulse bandwidth and slice select gradient strength. Higher time-bandwidth product improves slice profile quality but requires longer pulse duration, increasing minimum TE.