# FourierProcesses

The processes in this logic provide a variety of calculations that include Fourier transformations in some way.

## Usage

The usage of this logic is fairly simple: the input data are subjected to the selected algorithm and are output afterwards. Therefore, only one input and output are necessary/provided and no further information on I/O is given below.

## Processors

### Bispectrum

Calculates a Bispectrum for the two input image stacks, which is defined as the third order cumulant-generating function:

B(f1,f2) = F*(f1+f2).F(f1).F(f2)

where f1 and f2 are the input images , F is an images' Fourier Transform and F* its conjugate.

For every pair of images, a bispectrum is generated. While both inputs can have different sizes, the amount of generated bispectra is equal to the maximum number of unambigous image pairs that can be formed, which is the size of the smaller of the two stacks.

Also, both images need to have the same dimensions (and dimensionality).

### Center corrected power spectrum

Use this module to generate power spectra of single particles used as input data during CTF correction. Note: For K2 Particles, turn off the highpass filter for power spectra.

Parameters | Description |
---|---|

Output size | Width and height size of the power spectra. The new size is achieved by cropping (this changes the pixel size of the power spectra!) [in pixel] |

Highpass value | Gaussian highpass filter value used directly on the input data. [0…1] |

Apply softmask | If checked, applies a circular soft mask to the input images. |

Apply highpass filter | If checked, applies a highpass filter to the computed power spectra. |

Low freq cutoff | If Apply highpass filter to power spectra is checked, this value defines the Gaussian highpass value used to filter the computed power spectra. [0…1] |

Constant value to add | This value is added to each pixel of the power spectrum. [a floating point number] |

Logarithmic power spectrum | If checked, calculates the pixel values of the power spectrum on a logarithmic scale. |

Filtering type | Select, whether a cosine- or Gaussian-shaped transition curve should be used for filtering. |

### Combine/Extract XX of YY image

These three processes are closely related:

- Extract imaginary part of complex image
- Extract real part of complex image
- Combine parts of complex image

Theses processes can be used to extract one of the two parts of a Fourier transformed image or combine the formally extracted parts back together into a whole complex Fourier space image. This is necessary, since it is not possible, to visualize a Fourier transformed image consisting of both, imaginary and real part. To produce a complex Fourier transformed image, use FT XX to YY.

Input | Description |
---|---|

Input1 | This needs to be a Fourier transformed image or stack of images. |

Input2 | If two parts of a complex image shall be combined, Input1 needs to be the real image while Input2 needs to be the imaginary part. |

### FFT resize

Scales the real image by padding/enlarging the image in Fourier space.

Parameters | Description |
---|---|

Pad size | Scaling factor. |

### FT XX to YY

This processor performs Fourier transformations either from real-to-complex (forward), complex-to-real (backward) or complex-to-complex images. Caution: Due to algorithmic reasons, every pixel value of the images is scaled by the factor sidelength x sidelength.

Parameters | Description |
---|---|

Dimensionality | Dimensionality (2 or 3) of the input |

FT direction [0 = fw, 1 = bw] | For complex-to-complex transformation, the direction needs to be given |

### Fourier coarse

This processor coarses images, this is performed in Fourier space. This allows floating point numbers to be used as coarse factors.

Parameters | Description |
---|---|

Coarse factor | The coarse factor used to calculate the new image size (oldSize / coarseFactor = newSize). |

### Fourier ring correlation

The Fourier ring correlation represents the 2-dimensional version of a Fourier shall correlation (FSC). Here, the two input images are Fourier transformed and correlated, which is output as a line plot.

### Micrograph power spectrum

This processor computes the power spectrum of EM micrograph data by splitting it in multiple smaller images to enhance contrast and visibility of Thon rings. It only works properly on even sized images.

Parameters | Description |
---|---|

No of images cut out | Sets the number of images cut out in each direction. |

Size of cut images | Size of cut out images. Needs to be smaller than the input images. This is also the size of the output images. |

### Power spectrum

This processor computes the power spectrum or phase spectrum of real or complex image data. Input images need to meet the following requirements: Height == Width, Height % 2 == 0.

Parameters | Description |
---|---|

Automatic level adjustment | Enables auto level adjustment, ignoring the 20% most outlying pixels and scaling accordingly. |

Logarithmic | Enables scaling all power spectrum pixel values logarithmically. |

Display mode | Selects the desired display mode: phase = displays phase information; power = displays power spectrum. |

Skip Fourier transformation | This value enables skipping the Fourier transformation. Use this option when input data is already in Fourier space. |