aiCtfDetector

CTF-Detector estimates from the images’ powerspectrum the CTF parameters defocus and astigmatism.

As input, CTF-Detector accepts a tilt-series or a single frame image, the metadata file is used to read intial values and to store the detected parameters. The search area is either the entire image frame or a cropped patch of user define size. The position of the patch is given by its 3D position in the volume that is then projected on each tilt in a tilt series. This allows to identify for example a piece of carbon in the tomogram and to track its position to obtain the CTF values for a well defined position in the tomogram.

aiCtfDetector can be used without a configuration file and all parameters can be provided by command line arguments. For convenience, parameters can also be given using a configuration file with the -u command line argument. Note: If a parameter is passed by file and by command line, the command line overrides the file.

Options are:

CudaDeviceID

The deviceID of the GPU to use.
Argument for command line: -d or –CudaDeviceID
Type: int
Option is mandatory: false
Default value if not set: 0

Input

The file to process.
Argument for command line: -i or –Input
Type: string
Option is mandatory: true

LP

Low pass filter value.
Argument for command line: -lp or –LP
Type: float
Option is mandatory: true

LPS

Low pass filter sigma value.
Argument for command line: -lps or –LPS
Type: float
Option is mandatory: true

HP

High pass filter value.
Argument for command line: -hp or –HP
Type: float
Option is mandatory: false
Default value if not set: 0

HPS

High pass filter sigma value.
Argument for command line: -hps or –HPS
Type: float
Option is mandatory: false
Default value if not set: 0

AverageMinTilts

Only valid for tilt series: if true, the power spectra of the three lowest tilts are averaged for initial CTF detection. If false, only the lowest tilt angle is used. This can help to detect astigmatism more precisly if dose is too low on one single tilt.
Argument for command line: -avg or –AverageMinTilts
Type: bool
Option is mandatory: false
Default value if not set: false

Patch

If true, the CTF is detected on a cropped patch, if false on the entire frame.
Argument for command line: -patch or –Patch
Type: bool
Option is mandatory: false
Default value if not set: false

PatchSize

The unbinned patch size on which CTF is detected.
Argument for command line: -size or –PatchSize
Type: int
Option is mandatory: true
Only applicable if Patch = true.

PatchPosition

The (unbinned) position in 3D where the CTF is measured in global coordinates, e.g. a piece of carbon. The point is projected on the image for every frame, z is ignored if input is not a tilt series.
Argument for command line: -patchPos or –PatchPosition
Type: float or float3, one or three float values
Option is mandatory: false
Default value if not set: (0, 0, 0)
Only applicable if Patch = true.

BackgroundRemoval

Defines the method for how to subtract the background noise from the power spectrum.
Argument for command line: -bg or –BackgroundRemoval
Type: one of [LPCONCAVE, LPCONVEX, NONE, QUADRATURE]
Option is mandatory: true
Possible notations:

  • LPCONCAVE: LPConcave, LpConcave, lpconcave, LPCONCAVE
  • LPCONVEX: LPConvex, LpConvex, lpconvex, LPCONVEX
  • NONE: NONE, None, none
  • QUADRATURE: QUADRATURE, QUAD, Quadrature, Quad, quadrature, quad

Mask

Radius of the mask on the powerspectrum to crop out center of the CTF and limit the maximum frequency range where the CTF is detected. In relative values [0..0.5] or in absolute unbinned pixels [0..imDim/2] (image or patch if enabled).
Argument for command line: -mask or –Mask
Type: float2, two float values
Option is mandatory: true

Binning

Binning factor to apply to the original image. This discards high frequencies that usually do not contain enough signal for CTF determination but speeds up the search.
Argument for command line: -bin or –Binning
Type: int
Option is mandatory: false
Default value if not set: 1

DefocusMin

Begin of search range in [nm] for each iteration. The value is added to the initial defocus value.
Argument for command line: -defMin or –DefocusMin
Type: List<float>, a list of floating point values
Option is mandatory: true

DefocusMax

End of search range in [nm] for each iteration. The value is added to the initial defocus value.
Argument for command line: -defMax or –DefocusMax
Type: List<float>, a list of floating point values
Option is mandatory: true

DefocusStep

Search step in [nm] for defocus in each iteration.
Argument for command line: -defStep or –DefocusStep
Type: List<float>, a list of floating point values
Option is mandatory: true

Astigmatism

If true, the astigmatism parameters are included in the search.
Argument for command line: -astig or –Astigmatism
Type: bool
Option is mandatory: false
Default value if not set: false

AstigmatismMin

Begin of search range for astigmatism in [nm] for each iteration. The value is added to the initial value.
Argument for command line: -astigMin or –AstigmatismMin
Type: List<float>, a list of floating point values
Option is mandatory: true
Only applicable if Astigmatism = true.

AstigmatismMax

End of search range for astigmatism in [nm] for each iteration. The value is added to the initial value.
Argument for command line: -astigMax or –AstigmatismMax
Type: List<float>, a list of floating point values
Option is mandatory: true
Only applicable if Astigmatism = true.

AstigmatismStep

Search step for astigmatism in each iteration.
Argument for command line: -astigStep or –AstigmatismStep
Type: List<float>, a list of floating point values
Option is mandatory: true
Only applicable if Astigmatism = true.

AstigmatismAngleMin

Begin of search range for astigmatism angle in [degree] for each iteration. The value is added to the initial value.
Argument for command line: -astigAngMin or –AstigmatismAngleMin
Type: List<float>, a list of floating point values
Option is mandatory: true
Only applicable if Astigmatism = true.

AstigmatismAngleMax

End of search range for astigmatism in [degree] for each iteration. The value is added to the initial value.
Argument for command line: -astigAngMax or –AstigmatismAngleMax
Type: List<float>, a list of floating point values
Option is mandatory: true
Only applicable if Astigmatism = true.

AstigmatismAngleStep

Search step for astigmatism angle in each iteration.
Argument for command line: -astigAngStep or –AstigmatismAngleStep
Type: List<float>, a list of floating point values
Option is mandatory: true
Only applicable if Astigmatism = true.

CropBorder

The numbers of pixels to crop from the image frame.
Argument for command line: –crop or –CropBorder
Type: int
Option is mandatory: false
Default value if not set: 0

DimBorder

The numbers of pixels to dim the image to zero at the image borders.
Argument for command line: –dim or –DimBorder
Type: int
Option is mandatory: false
Default value if not set: 0

FrameMetadata

Frame metadata for a tilt series can be stored inside the tilt series metadata file or in an additional file. Only used if input is a tilt series.
Argument for command line: -meta or –FrameMetadata
Type: string
Option is mandatory: false
Default value if not set: ’’

SaveResultImages

Save an image of the powerspectrum and the matched CTF (for the lowest tilt in case of a tilt series).
Argument for command line: -img or –SaveResultImages
Type: bool
Option is mandatory: false
Default value if not set: false