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 usually the first icon located on the left-hand side of the screen.
It is always good to run drift correction on every single molecule localisation microscopy acquisition.
To visualise drift in this way select Frame in the list of options to colour the channel, 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 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), which is the method used in NimOS, and Redundant cross-correlation (RCC) use cross correlation between sets of points accumulated over frames that have been discretised into images. RCC is available as a Python script for NimOS.
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 Visualising drift corrected points toggle allows the user to see the data with and without drift correction applied. When corrected, 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.