Panel 2 — Fourier tools

Panel 2 holds the Fourier transform of the panel-1 image, with the zero-frequency term at the centre. The tools run vertically along the right edge of the panel, organised into groups. Each square is a group. Clicking a group that holds several tools opens a small pop-up column of sub-squares beside it; you then click a sub-square to activate that tool. A group with only one tool activates it directly. Activating a tool opens its parameter window at the bottom of the panel. The sections below are arranged by group, in the same order as the squares in the panel.

Most filters offer a smooth-edge width. A value of zero gives a hard cut-off and produces ringing in the back-transformed image; a value of 5–20 pixels typically gives a clean Hanning fall-off and a much cleaner real-space result.

Histogram-side toggles

In complex and power-spectrum display modes two toggle buttons sit to the right of the Fourier-space histogram, stacked vertically with a small gap:

Both buttons use a raised 3D look when off and a sunken look when on. The histogram hint above reads “Click to adjust display contrast” — click the histogram bar to drag the white triangles for manual range adjustment. When a parameter window opens at the bottom-right of the panel, the toggle buttons remain partly visible behind it; clicks on the visible portion still toggle them.

In complex FT mode the colour-coded phase wheel is drawn below the bottom-left corner of the Fourier-space display, with the four cardinal phase labels (, ±180°, +90°, −90°) around it.

Edit

Eraser

Multiplies the FFT by (1 − Gaussian) under the cursor, smoothly attenuating Fourier components. Useful for removing isolated diffraction spots or noise peaks.

Diameter: width of the Gaussian footprint, in Fourier pixels.

Paint brush

Writes a chosen real value (with zero imaginary part) into the FFT under a Gaussian footprint. Use a value of 0 to gently push amplitudes to zero; use larger values to boost or inject specific Fourier components.

Pixel value: real part of the amplitude to paint.
Diameter: Gaussian footprint width, in Fourier pixels.

Have some fun: Create an empty image (value 0 everywhere) and use the paint brush in Fourier space to place one single pixel of value 1 into the Fourier transform. That will back-transform to a sinusoidal wave in real space, because the Fourier transform of a delta function is a sinusoid.
Try placing that single pixel into either the Cosinus or the Sinus half of the Fourier transform, and see how the resulting wave changes.

Note that the Fourier Analyzer assumes the origin of the real-space image in the center of the image. This is a deviation from the mathematical definition of the Fourier transform, but it is useful here because it makes the relationship between the real-space image and its Fourier transform more intuitive to visualise and interact with.

Phase rampRamp

Synthesise a fresh Fourier transform whose amplitude is uniformly 1 and whose phase increases linearly along a chosen direction. Pure teaching tool: a phase ramp of step s at angle θ back-transforms to a single delta at the corresponding real-space position, illustrating the shift theorem.

Size of FFT: 512, 1024, 2048, or 4096 (default 1024).
Direction: ramp direction in degrees, CCW from the +x axis (default 30°).
Phase step: phase increment per pixel along the direction, in degrees (default 10°).
Cancel: close the parameter window without computing.
Compute: build the FFT, back-transform to panel 1, and store the result in the active history slot.

Cross-section profile

Cross-section profile

Draw a 1D radial / oriented profile of the Fourier amplitude. The line direction is dragged in panel 2; pixels within the chosen integration band perpendicular to the line are averaged.

Integration width: band width perpendicular to the line, as a percentage of the image size. Increase for less noise, decrease for higher angular resolution. The profile redraws live as you type.

Filter

Bandpass filter

Keep (or erase) Fourier pixels inside a circular ring centred on the origin. The two ring radii are dragged interactively in panel 2; the parameter window shows their current diameters.

Smooth edge: width of the soft Hanning transition at both ring edges, in Fourier pixels. 0 = hard cut-off.
Erase outside band: when checked the filter is a band-pass (keep inside the ring); when unchecked it is a band-stop (erase inside the ring).
Inner d / Outer d: live read-out of the current ring diameters in Fourier pixels.
Reset: resets the ring to inner = 10 % and outer = 90 % of the Fourier radius.
Apply filter: commits the filter to the FFT and updates panel 1.

Directional filter

Keep (or erase) Fourier pixels inside an angular wedge centred on the origin. The two wedge edges are dragged interactively. The wedge is mirror-symmetric so that the filter respects the Friedel symmetry of real images.

Smooth edge: width of the soft transition at both edges, in Fourier pixels.
Erase outside band: band-pass vs band-stop, as for the bandpass filter.
Angle 1 / Angle 2: live read-out of the wedge boundary directions, in degrees.
Apply filter: commits the filter to the FFT.

Line filter

Keep (or erase) Fourier pixels inside a straight stripe. Useful for isolating a single Fourier direction, or for removing scan-line and grid-pattern artefacts.

Width: half-width of the stripe perpendicular to the line direction, in Fourier pixels.
Direction: orientation in degrees (0° = horizontal, 90° = vertical, CCW positive). Drag the line in panel 2 to change.
Offset: signed perpendicular distance of the line from the Fourier centre. Drag the right half of the line in panel 2 to change.
Erase outside line: band-pass vs band-stop.
Apply filter: commits the filter.

Lattice filter

Build a reciprocal lattice from two basis vectors u and v (in Fourier pixels) and keep (or erase) circular spots at every lattice position. Used to extract or suppress crystalline content — for example, to denoise a 2D crystal or to remove residual lattice contamination from a non-crystalline target.

Smooth edge: Hanning fall-off at each spot, in Fourier pixels.
Diameter of dots: diameter of each lattice spot.
u / v: the two basis vectors, edited as (x, y) components. They can also be dragged interactively in panel 2.
Erase outside lattice: band-pass vs band-stop.
Apply filter: commits the filter.

Transform

Rotate Fourier space

Drag in panel 2 to rotate the Fourier transform around the centre. This is mathematically equivalent to rotating the real-space image, but it operates directly on the FFT.

Remember that Fourier space assumes periodic boundaries in real space. When you rotate the FT, then the periodicity in real space may cause some unexpected results, because the rotated FT corresponds to a rotated image that is periodically tiled in the original orientation. You will see many copies of the rotated neighbors from outside of the current image appearing in the back-transformed image, and they will interfere with the rotated version of the current image.

Symmetrize Fourier space

Enforce N-fold rotational symmetry on the Fourier transform around its centre (the DC term). The current FT is averaged with N copies of itself, each rotated by k·360°/N (k = 0…N−1), and the real-space image is updated through the inverse FFT. Because the operation acts directly on the FT, a phase correction is applied so that the rotation centre coincides with the original image centre rather than the array origin.

This is the Fourier-space counterpart of Symmetrize image in panel 1: mathematically the two are equivalent, but symmetrizing here lets you watch the diffraction pattern become N-fold symmetric directly.

Symmetry to apply: rotational order N (default 4). Use 2 for two-fold, 3 for three-fold, and so on; values are clamped to a maximum of 64, and N = 1 does nothing.
Apply symmetry: commits the operation to the FFT, back-transforms to panel 1, and stores the result in the active history slot.

Redimension

Fourier crop / Fourier pad

This function truncates or expands the FFT by an integer factor N.

When using Fourier cropping, the central 1/N×1/N region of the FFT is kept, and the rest is discarded. During the cropping, the Fourier transform becomes smaller, except if the option "Keep original size" is checked. In that case, the eliminated area is kept but is then only containing zero values.

When using Fourier padding, the FFT is zero-padded to its current size. In this case, the Fourier transform becomes larger due to the added zeros around the original FFT. This means that also the real-space image becomes larger, but no new information is added. The Fourier transform is now oversampled, and the back-transformed image will be larger in pixel size and smoother.

Factor N: 2 – 8.
Keep original size: when checked the FFT array stays at its original dimensions and pixels outside the crop window are zeroed. When unchecked the array is physically shrunk by N.

CTF

The sections below deal with the Contrast Transfer Function of an electron microscope. The theory for this is covered in the Introduction section of the manual.

CTF SIM (simulate a CTF)CTFSIM

CTF SIM synthesises a 2D contrast transfer function for an electron microscope with the chosen optical parameters, including astigmatism, defocus spread, amplitude contrast, beam tilt, and the spatial-coherence envelope from a finite gun-opening angle. The result is written to the Fourier side of the currently selected buffer, and its real-space point spread function (PSF) to panel 1. To fit a CTF to an existing image instead of simulating one, use CTF FIT (below).

There is no single “Compute” button. CTF SIM offers three different models of the same microscope — Pupil Function, Complex CTF and Real-valued CTF. They are different physics, not different display options: each writes a different array into panel 2 and turns it into panel 1 in a different way. With no beam tilt they largely agree; under beam tilt they differ fundamentally, and the differences are the point. For the physics behind them, see Beam tilt and coma in the manual; for the CTF itself, see What is the Contrast Transfer Function (CTF) of an Electron Microscope?

Acceleration voltage: in kV.
Energy spread: in eV (chromatic temporal coherence).
Spherical aberration Cs: in mm.
Open angle gun: half-convergence angle in mrad.
Defocus: in nm (positive = underfocus).
Defocus spread: in nm (temporal coherence).
Astigmatism: defocus deviation along the astigmatism axis, in nm.
Astigmatism direction: in degrees, CCW from +x.
Amplitude contrast: in percent (used as the amplitude-contrast term B).
Beamtilt: beam-tilt magnitude in mrad.
Direction: beam-tilt direction in degrees, CCW from +x.
Cancel: closes the tool without computing.
Pupil Function: computes the wave-optical pupil P(q) — see the three models below.
Complex CTF: computes the linear image-intensity transfer function T(q) — the physically correct model.
Real-valued CTF: computes the purely real C(q) — a didactic model.

The CTF is built on a fixed 1024×1024 grid using the slot's pixel size to map Fourier pixels to spatial frequencies. While the tool is active a red direction line is drawn across panel 2; drag it to choose the azimuth along which the 1D profiles (below) are taken.

The amplitude contrast defaults to 7%, a typical value for thin biological cryo-EM samples. This means that the CTF is not purely a sinusoid, but it has a small constant offset that makes it non-zero at low spatial frequencies. The amplitude contrast you enter is used directly as the amplitude-contrast term B (in fractional units, so 7% → B = 0.07), and the phase-contrast term is derived from it as A = √(1 − B²), so that A² + B² = 1. The CTF is then A·sin(−χ) + B·cos(−χ), where χ is the wave-aberration (phase) function.

The three models — which button does what

Beam tilt evaluates the wave aberration at the tilted geometry, χtilt(q) = χ(q+t) − χ(t) − q·∇χ(t) with t = τ/λ, dropping the constant and the linear (image-shift) terms. Unlike the round-lens case, this is not symmetric: χtilt(−q) ≠ χtilt(q). It splits into an even part χeven (defocus, Cs, astigmatism, and the defocus/astigmatism the tilt itself induces), which alone makes the oscillating Thon rings, and an odd part χodd (coma), which is a pure phase and never touches the modulus. E(q) below is the combined temporal- and spatial-coherence envelope.

  • Pupil FunctionP(q) = E(q)·e−iχtilt(q), the wave-optics view: the aberrated lens acting on the electron wave. The phase is the full wave aberration; the modulus is only the envelope, so there are no Thon rings — rings belong to the intensity CTF, not to the pupil. Under tilt P is not Hermitian, so panel 1 shows |h|² — the classic one-sided coma comet, i.e. the shape of the focused spot. (Amplitude contrast enters only as a constant phase and so leaves |h|² unchanged.)
  • Complex CTFT(q) = E·(A·sin(−χeven) + B·cos(−χeven))·e−iχodd, the linear image-intensity transfer function of a weak-phase object and the physically correct model of a real micrograph. T is Hermitian — T(−q) = T*(q) — not by approximation but by necessity, since image intensity is real. So panel 2 shows symmetric Thon rings even under tilt (the tilt rides in the phase), while panel 1 is real and still one-sided: Hermitian buys the realness, not-even buys the coma.
  • Real-valued CTFC(q) = E·(A·sin(−χtilt) + B·cos(−χtilt)), evaluated at the full tilted aberration and kept purely real — no even/odd split, no phase factor. It is real but not even, hence not Hermitian, so the Thon rings themselves go lopsided. The price is panel 1: for a real C the back-transform obeys h(−r) = h*(r), so its real part is exactly point-symmetric and shows no coma at all. A useful didactic model, but not a microscope.

The trade-off is not a limitation of the program but a Fourier fact: a real image needs a Hermitian transform, a point-symmetric image needs an even one, and coma is a real image that is one-sided. So no single real-valued function can give both asymmetric rings and an asymmetric PSF — the Pupil buys the comet with a complex transform, the Complex CTF with a Hermitian-but-uneven one, and the Real-valued CTF buys lopsided rings at the cost of the comet. The practical punchline: the power spectrum of any real micrograph is centrosymmetric (Friedel's law), so beam tilt can never be found by hunting for lopsided Thon rings in real data. This is worked through, with figures from the program, in Beam tilt and coma.


1D profile plots (panels 3 & 4). While the CTF SIM tool is active, the two bottom panels show 1D cuts of the complex transfer function C taken along the red direction line in panel 2. You can change the direction of the line by dragging it with the mouse and watch the profiles update live. The two plots show the amplitude and phase of the CTF, respectively.:

The horizontal axis of both plots is spatial frequency in 1/Å. The curves are drawn only up to the highest frequency that actually exists in panel 2 along the chosen direction: a ray leaves the square Fourier grid at q = Nyquist when the red line is horizontal or vertical (so the plot stops at ~0.5 cycles/pixel and the rest is left empty), and out to the corner frequency (~0.707) when the line points along a diagonal.

Note that the CTF is computed in Fourier-space with values between -1 and 1. When you back-transform it to real space, the result is the Point Spread Function (PSF) that corresponds to that CTF. The PSF is the impulse response of the imaging system. It shows you, how a single atom would be imaged by the microscope with the given parameters. The PSF has very small values.

If you forward Fourier transform the PSF from real space back to Fourier space, you will get back the original CTF. However, now the values in Fourier space are numerically higher than before, because the Fourier transform is not normalised. As a result, the display of the Powerspectrum as log(1 + amp*amp) will show the CTF differently than before. The different appearance of the back-transformed and again forward-transformed CTF is due to the non-linear scaling for the Powerspectrum display.

CTF FIT (fit a CTF for an image)CTFFIT

For an explanation of CTF theory, see What is the Contrast Transfer Function (CTF) of an Electron Microscope? in the manual, and Beam tilt and coma for what a tilted beam does to it.

CTF FIT estimates the defocus and astigmatism of a real micrograph by fitting a theoretical contrast transfer function to the Thon rings in its power spectrum, in the style of GCtfFind / CTFFIND. You supply only the microscope voltage and Cs; the defocus, astigmatism and its angle are recovered automatically.

Acceleration voltage: in kV.
Spherical aberration Cs: in mm.
Input buffer: the buffer (A…P) whose Fourier transform is fitted. Defaults to the currently selected buffer.
Upper resolution limit: the finest resolution (smallest Å, highest frequency) included in the fit.
Lower resolution limit: the coarsest resolution (largest Å, lowest frequency) included in the fit.
Cancel / Execute: Execute runs the fit; the window stays open and shows the result.

The correct pixel size of the input image is essential — it sets the spatial-frequency scale, so a wrong pixel size gives a wrong defocus. Check the value shown under panel 1 (double-click it to edit) before fitting. Choose the resolution band to bracket the visible Thon rings: exclude the very low frequencies (dominated by the background) and the high frequencies where the rings fade into noise. A typical band is about 30 Å (lower limit) to 3–5 Å (upper limit).

How it works. The power spectrum of the input buffer is sampled, a smooth radial background is subtracted (preserving the Thon rings), and the residual is whitened so weak high-frequency rings count as much as strong low-frequency ones. A theoretical |CTF|² is then matched to it by a normalised cross-correlation over the chosen resolution band — first a coarse 1D scan for the mean defocus, then a 2D search over defocus, astigmatism magnitude and angle, followed by iterative refinement.

Output. The fitted CTF is written to the Fourier side of the currently selected buffer as a composite diagnostic: the right half shows the synthesised (fitted) CTF, the top-left quarter the original Fourier transform of the input image, and the bottom-left quarter its elliptically (astigmatism-aware) radially averaged transform. The left half is scaled so it reads at a similar brightness to the fitted model on the right, and because the power spectrum is centrosymmetric the experimental and model rings join continuously across the vertical midline — so a good fit shows rings that line up across the whole image.

Reported values. After Execute the parameter window stays open and reports the fitted defocus (nm) and astigmatism (nm). The astigmatism is reported as the full peak-to-peak difference df1 − df2 (the CTFFIND / GCtfFind convention), together with its angle. The same values are also copied into the CTF SIM fields so you can re-simulate or tweak them — note that CTF SIM's astigmatism field is the amplitude (half of the peak-to-peak difference), matching its own definition.

Math

Math calculation

Combine the Fourier transforms of two history slots with an arithmetic operation, optionally complex-conjugating one of the inputs. The result is written to a third slot. Useful for cross-correlation, deconvolution, complex amplitude division, and similar Fourier arithmetic.

Output slot: destination slot a–p.
Inputs: two source slots.
Operation: +, −, ×, ÷ (with optional conjugate).
Conjugate: apply complex conjugation to one input before the operation.