Localize · version 6 · has a preview
Detect and fit with a free-width Gaussian PSF: x, y, photons, sigma.
This is where a localization table comes from. It reads the raw camera frames of an acquisition, finds the single fluorophores that are on in each frame, and fits each one with a model of its image – a 2D Gaussian whose width is fitted too – by maximum likelihood (Smith et al. 2010), with the Levenberg-Marquardt fitter of Li et al. 2018, to get its position with a precision far below the size of a pixel. The result is one row per fluorophore per frame: x, y, photons, background, the width of the PSF (point spread function: the image one molecule makes on the camera), and how precisely each is known – the localization precision, also called the CRLB or localization uncertainty.
Use it for 2D data. For 3D data from an astigmatic or otherwise engineered PSF – a cylindrical lens makes the spot wider in x on one side of the focus and in y on the other (astigmatism) – use Spline 3D with a bead calibration (also called a spline calibration or experimental PSF model); for two channels on one camera, the 2C fitters.
The camera matters: the fit works in photons, so the conversion from the camera's counts (ADU, analog-to-digital units, also called grey values) to photons must be right, or every photon count and every precision is off by the same factor. These values come from the file's metadata or the camera database where possible. The camera section starts folded, its title saying what was found – "camera: auto – iXon 888, 0.2 e-/ADU, 108 nm" – and opened, a field left on auto shows in grey what it was read as, and a number typed in replaces it. A camera that is in no database and whose numbers are not typed in is said in a line under the settings, and asked about once more at Run: Open camera editor adds it (and does not run), Cancel – the default – leaves the numbers to be typed into the camera fields. Preview runs detection on one frame and shows it, which is the way to set the detection threshold. The red line on the filtered image's colour bar, and the number in its title, is the cutoff detection applied to that frame – for a dynamic cutoff, worked out from that frame's local maxima.
The work is done in five steps, each a part of the settings.
1. Counts to photons. A camera reports counts (ADU), which are photons after subtracting the offset (also called baseline or bias: what a pixel reads with no light) and multiplying by the conversion (also called sensitivity or gain: electrons per count; for an EMCCD, also dividing by the EM gain, its electron multiplication):
2. Finding candidates. The image is smoothed to suppress noise and the smooth background is subtracted, with a difference of Gaussians: a Gaussian of the PSF's width (filter sigma) minus one 2.5 times wider. A spot then stands out as a bump on a flat floor. Every pixel brighter than all eight of its neighbours is a local maximum, and those above a threshold (cutoff) are candidates.

One simulated frame, in photons (left), and after the difference-of-Gaussians filter (right), with the candidates above the dynamic cutoff circled.
The dynamic cutoff adapts to each frame by itself. Most local maxima of the filtered image are noise, and their values form a distribution; the cutoff is set above it,
with and
the 20th and 80th percentiles of the maxima of that frame, and
the cutoff value (1.7). A percentile is taken as SMAP takes it: the
-th of
maxima is the
-th smallest, with no interpolation between neighbours. The fraction is a robust measure of the spread of the noise, so the cutoff is "
noise widths above the typical maximum" whatever the background. The absolute cutoff is a fixed number, in photons of the filtered image. Lower values find dimmer molecules and more noise.
3. Cutting fit boxes. A small square, the fit box (also called ROI size or fitting window; fit box, 13 pixels), is cut around each candidate. A candidate too close to the edge of the image for its box to fit is dropped rather than fitted off centre.
4. The fit. Each box is compared with a model of what a single emitter looks like: a Gaussian of width , integrated over each pixel, with
photons, at position
, on a flat background
per pixel,
The five parameters are those that make the observed pixels
most probable, given that each pixel's photon count is Poisson distributed around
– the maximum likelihood estimate. This is the best that can be done with the data: it makes use of every photon, and weighs each pixel by how noisy it really is.
Two fits of one frame that end less than a pixel apart are one molecule's, and only the one nearest its own candidate is kept. Far from focus an astigmatic spot (elliptical) is a streak, and the peak finder finds a maximum at each of its ends; both boxes hold the whole spot and both fits slide to the molecule, which would otherwise be in the table twice.

One fit box from the frame above: the data, the fitted model, and what is left over. A good fit leaves only noise.
The likelihood is maximised iteratively, with the Levenberg-Marquardt method (details below), from a start at the box's centre of mass.
5. Precision, and the table. The fit also says how well it could possibly have done. From the model, the Cramér-Rao lower bound (CRLB) is the smallest variance any unbiased estimate of each parameter can have, and a maximum likelihood fit reaches it. Its square root is written as the precision of each localization (x_err, y_err and their root mean square xy_err, photons_err, ...). It is what the precision histograms of Localization Statistics show and what renderers blur by.

The fitter reaches the bound. Thousands of spots simulated with known positions (1.3 pixel PSF, 10 background photons per pixel) and fitted: the scatter of the fitted positions about the truth (dots) against the precision the fitter reported (line), both falling as .
Finally positions, precisions and widths are converted to nanometres with the pixel size, fits that failed (a position or photon count that is not a number) are dropped, and the table is saved as <acquisition>_locs.hdf5 next to the data.
After the fit. Once the last frame is fitted, the steps of the folded section *after the fit* run over the whole table before it is saved: with elliptical ticked, astigmatic z (off by default); a drift correction (none by default); a chain of your own. Run these now, at the foot of the section, runs them on the open localizations later, without fitting again.
The likelihood. For Poisson pixels, maximising the likelihood is minimising the deviance
which is zero for a perfect model and grows with every pixel it gets wrong. Its gradient and curvature with respect to the parameters come from the derivatives
of the model, which for a pixel-integrated Gaussian are in closed form.
Levenberg-Marquardt. Each iteration solves for a step with the curvature matrix
– here the expected information
– with its diagonal enlarged by a factor . A small
is a Newton step, a large one a short step downhill.
shrinks after a step that lowered the deviance and grows after one that raised it by more than half; a step that went that far wrong is undone. Each parameter's step is also capped (one pixel for the position, at first), and the cap is halved whenever the step reverses direction. The fit stops when the deviance changes by less than one part in a million, or after iterations steps.
The start. Position: the centre of mass of the box. Background: the mean of its border pixels. Photons: the brightest pixel above background, times . Width: start sigma,
. During the fit
,
and
half the box. The position is not held inside the box: a fit that runs away is visible, and max fit distance rejects those that end further than that from their candidate.
One fit per molecule. After the fit, pairs of fits in one frame less than 1 pixel apart are taken to be one molecule (a single-emitter fit cannot put two molecules that close: both slide to the light's centre). Of each pair the fit nearer its candidate, peak_x_pix / peak_y_pix, is kept – the box that holds most of the spot – greedily, so a chain of three keeps one. In focus this almost never happens; on simulated astigmatic movies 12 – 20 % of isolated molecules 300 – 700 nm from focus had been fitted twice.
The CRLB. The Fisher information is the matrix above at the fitted parameters; its inverse is the covariance of the best possible unbiased estimate, and its diagonal the CRLB;
x_err is :
With no background it is simply per axis, with
the PSF's width widened by the pixel size
; background adds to it, the more so the dimmer the spot. That is why the precision is quoted with the photons: they set it.
EMCCD cameras. Electron multiplication doubles the variance of the signal (the excess noise factor, 2 for high gain), so the pixels are no longer Poisson. The photons are divided by 2 before the fit, which makes them Poisson again with half the counts, and the fitted photons and background are multiplied by 2 afterwards. The precision then correctly reflects the extra noise.
Read noise. A camera without EM gain – an sCMOS – adds Gaussian read noise, about one electron per pixel, to the Poisson counts, and a Poisson likelihood cannot take it: a count read as negative is treated as none, and at a photon or two of background the background comes out too high. So the read noise's variance is added to every pixel of the data and of the model before the fit (Huang et al. 2013), which makes the likelihood Poisson again to a good approximation and weighs each pixel by
; it is taken off the fitted background afterwards. read noise sets
: by default 1 electron without EM gain and 0 with it, since the gain leaves the read noise a fraction of an electron. On simulated spots at half a photon of background and one electron of read noise, the background comes back at 0.53 rather than 0.74. The variance is one number for the whole chip; an sCMOS's varies from pixel to pixel (0.7 to 1.4 electrons), which a variance map would capture and this does not.
Quality of the fit. logl is the log-likelihood of the fit and logl_rel the same per pixel of the fit box, so that it can be compared between box sizes. A spot that is not one emitter (two overlapping, or a bright speck of something else) fits badly, and filtering on logl_rel removes most of them.
Speed. Detection runs on blocks of frames; fit boxes are collected and fitted in batches of about 15 000 boxes (a script can set max_block_rois and n_threads), on all cores, in C++. Reading the file runs in the background while the previous block is processed.
Compared with the papers. The fit and its CRLB are those of Smith et al. 2010, and the steps those of Li et al. 2018, with these differences:
| setting | default | what it does |
|---|---|---|
| source – Where the frames come from. | ||
filesource.path | – | Any file of the acquisition: a Micro-Manager TIFF series, an NDTiff directory, one image out of a folder written one file per frame, or a simulation (*.sim.yaml, File > Simulate). The fit writes its table beside the acquisition unless output says otherwise. |
first frame (more)source.start | 0 | Frames before this one are skipped. |
last frame (more)source.stop | auto | Auto: to the end. at least 1 |
livesource.live | off | The file is still being written: fit what is there and keep watching for new frames. |
stop after (more)source.live_timeout | 30 s idle | Live: give up after this long without a new frame. at least 1 s idle |
frames per block (more)source.chunk | 200 | Frames read and detected at once; only memory and speed depend on it. at least 1 |
microscope – The microscope and its camera: ADU -> photons and pixel -> nm. Empty fields come from the file, the camera database and the microscope database; shown as one line and a window (gui.microscope_form), the values locked until unlocked. | ||
microscopecamera.microscope | auto | Auto: recognised from the file's metadata, else the last one used. |
cameracamera.camera | auto | Auto: identified from the file's metadata, else the microscope's. |
conversioncamera.conversion | auto | Photoelectrons per count; auto: from the file or the camera database. From the camera's data sheet or a calibration. If it is wrong, every photon count and every precision is wrong by the same factor. |
offsetcamera.offset | auto | The count of a pixel that saw no light. Usually 100 or a few hundred. |
EM gain oncamera.em_on | auto | An EMCCD with its electron multiplication on: the counts are divided by the gain, and the noise is doubled. It changes both the conversion and the noise model; see In detail. |
EM gaincamera.emgain | auto | The EM gain the camera was set to. |
pixel sizecamera.pixelsize_um | auto | The pixel's size in the sample, after the magnification. |
pixel size ycamera.pixelsize_y_um | auto | Auto: square pixels, the same as in x, or the microscope's. |
read noisecamera.read_noise_e | auto | Rms per pixel; auto: the camera's, else 1 (an sCMOS). |
channels – How the camera chip is read: whole, or as a split camera's two channels, and how the split lies – the microscope's arrangement, or chosen for a microscope without an entry (calibrate.dual.resolve_arrangement); never detected. | ||
readchannels.split | whole chip | Two channels: a split camera, each channel detected and fitted on its own; whether the dichroic was in, no file says. two channels is for a split camera: the frame is cut into its two channels by layout and split position, a mirror undone, and each channel is detected and fitted on its own – a dim channel then has a threshold of its own instead of the bright one's. Nothing pairs the two, and nothing maps one onto the other: each localization is on the chip where its channel saw it, with |
layoutchannels.layout | the microscope's | How the chip is split: the microscope's entry, or chosen by hand with the main channel and the split. On microscope, the entry of the microscope the file was taken on gives it (Microscope manager) – the layout, the main channel and where the channels lie, its arms' regions or the frame's halves – and the part says it in one line; a file no entry recognises asks for it to be chosen. main channel is shown either way: on the microscope's it is the entry's, its transmitted arm, and choosing the other half swaps the two dyes while the entry's regions and mirror stay. Choose a layout by hand and split position appears too. Read only on two channels. Choices: the microscope's; right-left; right-left mirrored; up-down; up-down mirrored |
main channelchannels.main_channel | the microscope's | The channel the other is registered onto: the microscope's (its transmitted arm), or either half, to swap them. Choices: the microscope's; left; right; upper; lower |
split position (more)channels.split_position | auto | The first pixel of the second channel, on the chip, for a layout chosen by hand; empty: the middle of the frame. at least 1 px |
| detection – Finding candidates in the filtered image. | ||
filterdetection.filter | difference of Gaussians | What the frame is smoothed with before maxima are looked for; the difference of Gaussians also removes a smooth background. Choices: difference of Gaussians; Gaussian |
filter sigmadetection.sigma | 1.2 px | The width of the smoothing: about the PSF's. 1 to 1.5 for a well-sampled microscope. at least 0.1 px |
cutoffdetection.cutoff_mode | dynamic (x noise) | Dynamic: set per frame from the noise of the filtered image; absolute: a fixed value. Choices: dynamic (x noise); absolute (photons) |
cutoff valuedetection.cutoff | 1.7 | Lower finds dimmer molecules, and more noise. For the dynamic cutoff, in units of the noise spread (1.5 to 2 is usual); for the absolute one, photons in the filtered image. Switching cutoff puts that mode's default here (1.7, or 20 photons), since the number means something else in the other mode. Use Preview to see what it finds. In a script, |
| fit region – Where in the frame to fit: shapes drawn on the preview's frame. | ||
drawnregion.shapes | Drawn on the Preview's frame: candidates outside the include shapes, or inside an exclude shape, are not fitted. To fit only part of the camera frame – one cell of several, or everything but a bright bead or a dirty corner – press Preview and draw on the frame it shows: the buttons above the figure draw a rectangle or a polygon to fit in (green) or to leave out (dashed red); undo and clear take shapes away, and edit takes a drawn shape back: click it, then drag its handles or its middle (a polygon by its corners; shift-drag moves it whole). With shapes to fit in, only the candidates inside one of them are fitted; a candidate inside a shape left out never is. The frame is still filtered whole, so a dynamic cutoff is set as without a region. The shapes are in the frame's pixels and kept with the settings – in the workspace, a chain or a batch they apply to every file. Read as two channels, a shape marks a part of the sample, not of the camera: its part on either channel is copied onto the other, where the channels' layout puts the same part of the sample (dotted on the Preview). A cell outlined on one half is fitted in both, and a strip left out along the boundary between the channels – where the filter's edge and scattered light give dim, false localizations – crops both channels' inner edges. Before version 5 a shape acted only on the half it was drawn on, so a fit in rectangle on one half left the other unfitted. A region that leaves a channel nothing to fit is said under the form, in the Preview and at the run. | |
use the regionregion.use | on | Off fits the whole frame and keeps the shapes. |
| model – A free-width Gaussian: x, y, photons, background and sigma. | ||
start sigmamodel.sigma | 1.2 px | The PSF width the fit starts from; it is fitted. at least 0.1 px |
ellipticalmodel.elliptical | off | Fit sigma_x and sigma_y separately. Six parameters instead of five: a width in x and one in y. For astigmatic data, whose two widths Astigmatic z turns into z; not for 2D data. Ticked, after the fit offers astigmatic z, so that the fit ends with z in the table – before any drift correction there, which then corrects z as well. |
| fit – Everything about the fit that is not the camera or the PSF model. | ||
fit boxfit.roisize | 13 px | The square cut around each candidate and fitted. Large enough to hold the spot and some background around it: about 7 PSF widths. Larger boxes catch more neighbours. at least 5 px |
iterations (more)fit.iterations | 50 | The most steps a fit may take. at least 1 |
max fit distance (more)fit.max_fit_distance | auto | Reject fits that ran off; auto: keep all. |
per-pixel noise (more)fit.per_pixel_noise | off | An sCMOS's offset and read noise pixel by pixel, from the camera's noise map. For an sCMOS: each pixel's own offset and read noise, from the noise map of the file's camera and readout mode, which Camera noise calibration makes from a dark movie. It helps most at low backgrounds and near hot pixels, costs about 1 % of the fitting time, and the precisions then account for each pixel's noise. Without a map for the readout mode, or with frames outside the map, the fit is refused and the form says why. |
| output | ||
save HDF5output.save | on | Write the table to a file as it is fitted. |
fileoutput.path | – | Filled from the source: <acquisition>_locs.hdf5 next to the folder the images are in. |
raw frames (more)output.raw_frames | 50 | Camera frames kept with the table, in photons, after their average; 0: none. 50 is enough to see what the camera saw at the start, the end and a few points between. Each kept frame costs its size in the file: for a 256 x 256 camera ROI about a quarter of a megabyte, for a full 2048 x 2048 sCMOS chip 16 MB, so fifty of those are 800 MB – set fewer there. |
show image tags (more)output.show_tags | PIZStage | Image tags drawn while the fit runs and when it is done, names or parts of names; empty: none (Analysis/Process/Image Tags).
|
| after the fit – The steps in the order they run; each step's settings follow its switch. | ||
astigmatic zfinish.astigmatic_z | off | Z from the widths of the elliptical Gaussian, before any drift correction so that it can correct z (Analysis/After fit/Astigmatic z). |
| z calibration | ||
calibrationfinish.astigmatic.calibration | from a file | A file from the PSF calibration window (elliptical Gaussian), or the curves typed. Choices: from a file; typed |
filefinish.astigmatic.path | – | An astigmatic z calibration (.h5). |
| curves – One curve per axis, s(z) = s0 sqrt(1 + u^2 + A u^3 + B u^4), u = (z - focus) / depth. | ||
width xfinish.astigmatic.typed.sigma_x_nm | 130 nm | s0: the narrowest the spot gets in x. at least 1 nm |
focus xfinish.astigmatic.typed.focus_x_nm | 300 nm | The z where x is narrowest; z = 0 is the round spot. |
depth xfinish.astigmatic.typed.depth_x_nm | 400 nm | How far from its focus the x width has grown by sqrt(2). at least 1 nm |
width yfinish.astigmatic.typed.sigma_y_nm | 130 nm | s0: the narrowest the spot gets in y. at least 1 nm |
focus yfinish.astigmatic.typed.focus_y_nm | -300 nm | The z where y is narrowest. |
depth yfinish.astigmatic.typed.depth_y_nm | 400 nm | How far from its focus the y width has grown by sqrt(2). at least 1 nm |
A x (more)finish.astigmatic.typed.a_x | 0 | Huang's cubic term in x. |
B x (more)finish.astigmatic.typed.b_x | 0 | Huang's quartic term in x. |
A y (more)finish.astigmatic.typed.a_y | 0 | Huang's cubic term in y. |
B y (more)finish.astigmatic.typed.b_y | 0 | Huang's quartic term in y. |
z rangefinish.astigmatic.typed.z_range_nm | 800 nm | +- this: where the curves are trusted. at least 10 nm |
z scalefinish.astigmatic.z_scale | 1 | True z per apparent z: about 0.7-0.8 for an oil objective imaging in water, 1 for none. at least 0.01 |
4Pi zfinish.fourpi_z | on | Z from the interference phase of a 4Pi fit, unwrapped by its envelope z (Analysis/After fit/4Pi z). |
| 4Pi phase | ||
calibrationfinish.fourpi.slope | as fitted | The phase's slope in z: kept with the table by the 4Pi fit, or read from a 4Pi model file. Choices: as fitted; from a model file |
modelfinish.fourpi.path | – | A 4Pi model (.h5): this program's or uiPSF v1's. |
time windowfinish.fourpi.window_frames | 1000 frames | The cavity's phase is measured over this many frames. at least 10 frames |
smoothingfinish.fourpi.smoothing | 1 windows | Average each window with its neighbours, this many in all. at least 1 windows |
refine periodfinish.fourpi.refine_period | off | Find the fringe period that the data agree with best. |
z scale (more)finish.fourpi.z_scale | 1 | True z per apparent z: 1 when sample and immersion index match. at least 0.01 |
overlay channelsfinish.overlay | off | Move the second half of a two-channel fit onto the first, by beads; channel is the half (Analysis/After fit/Overlay channels). |
| channel overlay | ||
transformation fromfinish.overlay_channels.source | transformation file | A saved registration, beads already fitted as two channels, or bead movies to fit. Choices: transformation file; fitted beads; bead movies |
filefinish.overlay_channels.path | – | A _2ct.h5 (Calibrate transform, or this plugin's), or a dual-colour bead calibration. |
fitted beadsfinish.overlay_channels.beads_table | – | Bead localizations fitted with channels > read: two channels. |
bead moviesfinish.overlay_channels.beads | – | A folder of bead movies, or one movie's path; beads seen in both halves. |
| bead fit – How the bead movies are fitted: Gaussian 2D, two channels, the sample's camera. | ||
cutofffinish.overlay_channels.bead_fit.cutoff | 1.7 | The detection threshold, in units of the filtered frame's noise (the fitters' dynamic cutoff). at least 0.1 |
at mostfinish.overlay_channels.bead_fit.max_frames | auto | Frames fitted per bead movie; auto: all. at least 1 frames |
| channels – Where a split chip's two channels lie: the microscope's entry, or chosen by hand. | ||
layoutfinish.overlay_channels.channels.layout | the microscope's | How the chip is split: the microscope's entry, or chosen by hand with the main channel and the split. Choices: the microscope's; right-left; right-left mirrored; up-down; up-down mirrored |
main channelfinish.overlay_channels.channels.main_channel | the microscope's | The channel the other is registered onto: the microscope's (its transmitted arm), or either half, to swap them. Choices: the microscope's; left; right; upper; lower |
split position (more)finish.overlay_channels.channels.split_position | auto | The first pixel of the second channel, on the chip, for a layout chosen by hand; empty: the middle of the frame. at least 1 px |
| registration – How a registration between two channels is measured: the vote, the pairing and the fit. | ||
transformationfinish.overlay_channels.registration.model | projective (8 coefficients) | Projective extrapolates gracefully; the polynomial describes a distorted field far better where the pairs reach, and is refused when they do not reach far enough. Choices: projective (8 coefficients); polynomial, order 3 (20) |
vote bin (more)finish.overlay_channels.registration.vote_bin_px | 2 px | The bin of the histogram of pair vectors the offset is voted in. at least 0.1 px |
vote smoothing (more)finish.overlay_channels.registration.vote_smooth_px | 4 px | The width of the difference-of-Gaussians filter the vote is scored with. at least 0.1 px |
coarse matchingfinish.overlay_channels.registration.coarse_tolerance_px | 20 px | First pass; must cover the rotation between the channels – 3 degrees over 512 px is 27 px. at least 0.1 px |
fine matchingfinish.overlay_channels.registration.fine_tolerance_px | 1 px | Second pass over clean matches only, which is where the accuracy comes from; 0 skips it. |
adapt fine matching (more)finish.overlay_channels.registration.adapt_fine_tolerance | on | Widen the fine matching to what the coarse fit misses its own pairs by, when those pairs are clean. |
minimum pairs (more)finish.overlay_channels.registration.min_pairs | 20 | Fewer pairs than this and the registration refuses. at least 4 |
pairs used in the fit (more)finish.overlay_channels.registration.max_pairs | 20000 | At most this many pairs, drawn at random, go into each fit. at least 4 |
outlier threshold (more)finish.overlay_channels.registration.reprojection_threshold_px | 1 px | The robust (RANSAC) fit's inlier radius, at least; it widens with the matching tolerance. at least 0.01 px |
dx/dy limit (more)finish.overlay_channels.registration.transform_axis_limit_px | 0.5 px | The largest |dx| or |dy| a pair may keep after the first fit, at least; it widens with the matching tolerance. at least 0.01 px |
keep the registrationfinish.overlay_channels.save | on | Write it beside the beads as <name>_2ct.h5 and use it again while the beads and these settings are unchanged. |
drift correctionfinish.drift | none | Estimate the drift from the finished table and subtract it from every localization. Off by default: it is minutes of work on a dataset it cannot see beforehand. Choices: none; RCC; COMET |
| RCC drift – How finely to bin, render and search. | ||
time windowsfinish.rcc.n_timepoints | 20 | How many windows the acquisition is cut into: more follow faster drift, fewer are less noisy. at least 2 |
pixel sizefinish.rcc.pixelsize_nm | 15 nm | The pixel of the images that are correlated; about the localization precision. at least 1 nm |
z bin (more)finish.rcc.z_pixelsize_nm | 5 nm | The bin width of the z histograms. at least 0.1 nm |
max driftfinish.rcc.max_drift_nm | 500 nm | The largest drift between any two windows that can be found. at least 1 nm |
peak fit half-width (more)finish.rcc.fit_window | 3 px | The patch the correlation peak is fitted over, for its sub-pixel position. at least 1 px |
max image size (more)finish.rcc.max_pixels | 2048 px | A wider field of view is folded back onto itself, to keep the correlation fast. at least 64 px |
correct zfinish.rcc.use_z | auto | Auto: if the table has z. |
merge blinksfinish.rcc.group | on | Merge the localizations of one blink into one before measuring. |
within (more)finish.rcc.group_dx_nm | auto | How close localizations in consecutive frames must be to be one blink; auto: the session's merge settings. |
dark frames (more)finish.rcc.group_dt | auto | How many dark frames a blink may skip; auto: the session's merge settings. |
tile (more)finish.rcc.tile_nm | 200 nm | The axial pass correlates z histograms in tiles of the field of view this size. at least 1 nm |
tile y (more)finish.rcc.tile_y_nm | auto | Auto: square tiles. at least 1 nm |
max axial drift (more)finish.rcc.axial_max_drift_nm | 200 nm | How far from zero the axial correlation peak is looked for. at least 1 nm |
skip zero shift (more)finish.rcc.exclude_zero_lag | on | Leave the zero-shift sample out of the axial peak search. |
error barfinish.rcc.split_half | on | Estimate again from each half of the field and show both: how far they differ is twice the curve's noise. |
reference (more)finish.rcc.reference | as estimated | The frame the drift is zero at; first or last frame for consecutive files. Choices: as estimated; first frame; last frame |
| COMET drift – COMET parameters. The defaults suit a typical SMLM movie. | ||
window unit (more)finish.comet.segmentation_mode | frames | What window size counts; time-window fit only. Choices: frames; localizations; windows |
window sizefinish.comet.segmentation_var | 500 | Frames or localizations per time window, or the number of windows; time-window fit only. at least 1 |
max driftfinish.comet.max_drift_nm | 300 nm | The largest drift expected; also the radius within which localizations are paired. at least 1 nm |
target sigmafinish.comet.target_sigma_nm | 30 nm | The finest width of the overlap Gaussian, where refinement stops. at least 0.1 nm |
initial sigma (more)finish.comet.initial_sigma_nm | auto | The width the refinement starts from; auto: a third of max drift. |
smoothing (more)finish.comet.boxcar_width | 1 windows | Running mean over this many windows between refinement steps; 1 is none; time-window fit only. 1 to 1000 windows |
interpolation (more)finish.comet.interpolation | cubic | The curve from the window estimates to every frame; time-window fit only. Choices: cubic; catmull-rom |
max locs / window (more)finish.comet.max_locs_per_segment | auto | A random subset of at most this many per window; auto: all; time-window fit only. at least 1 |
ftol (more)finish.comet.optimizer_ftol | 1e-07 | Relative change of the cost at which the optimizer stops. |
approximate kernel (more)finish.comet.approximate_kernel | on | Skip pairs more than 6 sigma apart; the spline fit always does. |
ftol coarse (more)finish.comet.optimizer_ftol_coarse | auto | Ftol for the steps above the target sigma; auto: ftol; time-window fit only. |
quality control (more)finish.comet.quality_control | off | Discard time windows whose fit does not beat no correction; needs fit spline off. |
min lift (more)finish.comet.min_lift | 0 | How much a window's fit must improve its overlap over no correction to be kept. |
merge blinksfinish.comet.group | on | Merge the localizations of one blink into one before estimating. |
within (more)finish.comet.group_dx_nm | auto | How close localizations in consecutive frames must be to be merged; auto: the session's merge settings. |
dark frames (more)finish.comet.group_dt | auto | How many dark frames a blink may skip; auto: the session's merge settings. |
two stage (more)finish.comet.two_stage | off | A grouped pass, then an ungrouped one within fine radius. |
fine radius (more)finish.comet.two_stage_radius_nm | 30 nm | The max drift of the second, ungrouped pass. |
RCC first (more)finish.comet.rcc_prepass | off | Correlate rendered time windows to take out the bulk of the drift, then run COMET over a small max drift. |
RCC windows (more)finish.comet.rcc_prepass_windows | 10 | The time windows RCC correlates. at least 2 |
RCC max drift (more)finish.comet.rcc_prepass_max_drift_nm | auto | Auto: RCC's own default. |
fit splinefinish.comet.spline | on | Fit the drift as a smooth curve in time rather than one value per time window. |
knot spacingfinish.comet.spline_knot_frames | 2000 frames | Frames between the spline's coefficients. at least 10 frames |
spline penalty (more)finish.comet.spline_penalty | 0 | Extra penalty on the curve's bending; 0 is none. |
transformationfinish.comet.transformation | shift | What changes over time besides the position; spline fit only. Choices: shift; xy scale; xy scale + rotation; xy affine; xy affine + z scale; 3D affine |
transformation knots (more)finish.comet.transformation_knot_frames | auto | Frames between the transformation's spline coefficients; auto: the knot spacing. at least 10 frames |
transformation penalty (more)finish.comet.transformation_penalty | 0 | Pulls the transformation towards none where the data say little; 0 is none. |
correct zfinish.comet.use_z | auto | Auto: if the table has z. |
precision weightsfinish.comet.precision_weights | on | Widen each pair's Gaussian by the two localizations' precisions, so imprecise ones count less; needs xy_err_nm, and z_err_nm for z. |
z width (more)finish.comet.sigma_z_factor | 1 x lateral | The overlap Gaussian's width in z as a multiple of its lateral width; 1 is one width for all axes. 0.1 to 20 x lateral |
error barfinish.comet.split_half | on | Estimate again from each half of the field and show both: how far they differ is twice the curve's noise. |
reference (more)finish.comet.reference | as estimated | The frame the drift is zero at; first or last frame for consecutive files. Choices: as estimated; first frame; last frame |
assign coloursfinish.assign_colors | on | Split the localizations by their photon ratio and write channel (Analysis/After fit/Assign colours). |
| colour assignment | ||
methodfinish.colors.mode | split at the minima | A cut in r, or a posterior per localization. Choices: split at the minima; probabilistic |
coloursfinish.colors.colors | 2 | How many species the histogram of r holds. 1 to 6 |
exclusion drfinish.colors.exclusion | 0.05 | Minima: leave this much of r on either side of a boundary unassigned. |
sigmafinish.colors.tolerance | 3 | Probabilistic: a colour is given only within this many sigma of its expected split, the sigma being that localization's own photon statistics plus any extra spread. 0: assign to the nearest colour however far away. |
keep the tailsfinish.colors.keep_tails | off | Probabilistic: apply the sigma test only between the outermost colours, so a localization more extreme than the first or the last mode is kept rather than refused. |
allowed crosstalkfinish.colors.crosstalk | 0.05 | Probabilistic: refuse what is too close to call as well – the largest expected fraction of wrongly assigned localizations. Narrow beside the sigma test, and what matters where two colours overlap. 1e-06 to 0.5 |
extra spreadfinish.colors.spread | 0 | Probabilistic: a species' own width in r, added in quadrature to the shot noise, for a dye whose splitting ratio varies across the field or between molecules. 0: shot noise alone (the summary prints what the modes suggest). |
use fitted errorsfinish.colors.use_errors | on | Take the photon errors from the fit where the table has them; otherwise sqrt(photons). |
use abundances (more)finish.colors.use_prior | on | Probabilistic: weight each species by how much of the sample sits under its mode. |
minimum photons (more)finish.colors.min_photons | 0 | Localizations with fewer photons in total are ignored and left unassigned. |
intensity LUT (more)finish.colors.cmap | viridis | The colour map of the intensity plot's 2D histogram. Choices: viridis; cividis; turbo; magma; inferno; Greys; Greys_r |
histogram bins (more)finish.colors.bins | 200 | How many bins the histogram of r has over its whole range, -1 to 1. 10 to 2000 |
smoothing (more)finish.colors.smoothing | 2 bins | The histogram is smoothed by this much before its maxima are looked for; it also sets how far apart two modes must be. |
expected r (more)finish.colors.expected | auto | The species' ratios, comma separated ("-0.65, 0.96"), measured on single-label samples or computed from the spectra. auto: the histogram's own maxima. |
channel 1 attribute (more)finish.colors.channel1 | auto | Auto: photons_ch0, or the first pair of per-channel attributes in the table. |
channel 2 attribute (more)finish.colors.channel2 | auto | The attribute r counts negative; name both attributes or neither. |
then chainfinish.chain | – | A saved chain run last, on the finished table; empty: none. |
The table, with one row per fitted spot:
| attribute | meaning |
|---|---|
frame | the camera frame |
x_nm, y_nm | the position on the camera chip (the camera ROI's corner added) |
camera_channel | on two channels: which channel saw it, 0 the main one |
photons, background | |
x_err_nm, y_err_nm, xy_err_nm | the precision (CRLB) |
photons_err, background_err | their CRLB |
sigma_nm | the fitted PSF width (sigma_x_nm, sigma_y_nm and their CRLB sigma_x_err_nm, sigma_y_err_nm if elliptical) |
logl, logl_rel | the log-likelihood, and per pixel |
peak_x_pix, peak_y_pix | the candidate the fit box was cut around |
iterations | how many steps the fit took |
All lengths are in nm. The fit measures in camera pixels and converts at the end; it keeps no pixel copy of these attributes, because the file records the pixel size (pixelsize_nm, and pixelsize_nm_xy for pixels that are not square): a position on the camera is x_nm divided by it. Only the candidate, peak_x_pix and peak_y_pix, stays in camera pixels.
The file also records the camera, the settings and the software version, so it can always be told how a table was made.
The camera frames. The file also keeps a few of the frames the table was fitted from, in photons (counts minus offset, times the conversion): first the average of every frame fitted, then the first fitted frame, then the rest spaced evenly up to the last one, as many as raw frames asks for, each with its frame number – the same number as in frame. In the Render tab they are a source of an image layer, placed in the table's coordinates, so they lie under the localizations: whether a structure is really there, where the cell edge is, or whether the focus was lost can be checked without the original stack. The average is the one to start with; a localization of frame 17 should sit on a spot in frame 17.
Based on SMAP's fit_fastsimple workflow and its MLE_GPU_Yiming fitter (Ries 2020). The main changes:
diffrawframes-th frame after the average; here a number of frames is kept, spaced evenly over the fitted range, so that a long acquisition does not fill the file with them.