This tool attempts to correct for the drift that occurs during an acquisition. Without this correction the resolution of the sample is degraded which will affect visual quality as well as downstream analysis.
The drift correction (DC) tool is located in the side bar on the left-hand side of the screen under the dSTORM analysis button, marked below:
When to apply drift correction
Inputs
Outputs
View and interpret results
Save results
When the drift is very large, it can be easy to spot as the image appears smeared in the visualiser. When this is not the case, it can be useful to visualise the localisations coloured by frame index as shown in the image below. Usually, particularly bright spots will show the drift most clearly, as these tend to encompass a greater number of fluorophore blinking events across the acquisition and therefore will spread out over a large number of frames.
To visualise drift in this way select frameIndex in the list of options to color the channel by, this will automatically select the Rainbow colour map. It is worth checking for drift on even relatively small length scales (sub-100nm), as the algorithm is often able to correct even for this if density is sufficient, and can improve analysis results if the experiment is sensitive to such length scales. In certain edge cases (particularly for sparse datasets) drift correction may fail. Always make sure to validate the results visually before continuing the analysis.
The widget has two sides. The front side has the following buttons:
On/Off: Turn DC on or off for comparison (available after DC has been run or a previous DC execution has been loaded)
Run: Run a new DC execution with selected parameters
Load: Load a previously run DC execution
Revert: Go back to default settings for DC
The back panel of the widget allows the user to choose which type of algorithm they would like to use. Currently there are three methods, Drift correction at minimum entropy (DME) is an entropy minimization method inspired by this paper from Cnossen et al. Direct cross-correlation (DCC) and Redundant cross-correlation (RCC) use cross correlation between sets of points accumulated over frames that have been discretised into images.
The selection of the number of windows can be set automatically or selected manually.
If set to auto, the algorithm will keep adding frames together into a single window until 400,000 localisations have accumulated, and then perform a cross correlation between the windows using either DCC or RCC. There is also a minimum cutoff in the number of windows such that if there are less than 800,000 points (the minimum required to create two windows of 400,000 points each), the algorithm will simply use 2 windows and split up the number of points equally in each window .
If set to manual, the user can input the number of windows they would like to use manually and the algorithm will split the points equally into that number of windows.
Some experimentation with the number of windows may be needed to find an optimal result, the optimal number of windows can vary greatly depending on the density of the dataset and nature of the drift. Typically, if the drift is highly non-linear across the acquisition, a larger number of windows will be required to correct it. If the drift is linear over the acquisition, with the drift artifacts presenting as straight lines with smoothly varying frame index, a smaller number of windows can give better results.
Once a drift correction execution has been successfully run, the results can be loaded and viewed. The individual points in the visualiser will have their positions corrected and the value of the drift in the x and y dimensions is shown in the chart on the front side of the widget.
The axes of the plots can be changed using the symbol shown below
The plots from DC can be downloaded in several formats as shown below.
SVG and PNG are image formats that download the plots
JSON and CSV contains the drift per frame in x and y in text formats
For continued analysis on CODI, it is not necessary to download the drift correction results. Instead, subsequent tools will automatically detect any drift correction loaded at the time of execution.