Gaussian 2D 2C

Localize · version 13 · has a preview

Detect and fit both halves of a split frame as one emitter with a Gaussian PSF, sharing x and y: adds the photon ratio that tells the two colours apart. No PSF calibration; the registration can be measured from the movie itself.

What it does

This is the fitter for two colours on one camera in 2D. A dichroic mirror in the detection path – a splitter, also called a dual-view or image splitter – splits each molecule's light between two halves of the camera chip, so every molecule appears twice in the same frame: once in the main (reference) half and once in the secondary half, a little shifted, turned and magnified. Both dyes appear in both halves, but in different proportions, and that proportion – the photon ratio – is what tells the dyes apart. This is ratiometric multicolour imaging (Bossi et al. 2008).

The plugin fits the two spots of a molecule together, as one emitter, the global fit of Li et al. 2022: one position for both halves, and a photon number for each. The position is then as precise as all the photons allow, and the photon split comes out of the same fit. At the end of the run it assigns the colours from that split (Assign colours) and, if asked, corrects the drift (RCC or COMET) or runs a chain of your own (After the fit). The detection, the camera settings and the Gaussian PSF (point spread function: the image one molecule makes on the camera) are those of Gaussian 2D, which explains them.

What it needs:

For 3D data with a bead calibration, use Spline 3D 2C; for one colour, Gaussian 2D.

How it works

1. The two channels, and the map between them. Which half is which comes with the transformation (its geometry: the two channels' rectangles on the chip, the main one first, and which of them is mirrored). The two halves are cut apart as two channel images, and a mirrored half is flipped back as it is cut – a flip moves pixels, it does not resample them. The halves need not be the same size: the split is where the microscope's arrangement put it when the transformation was made. The transformation maps a position in the secondary channel to the position in the main channel where the same molecule appears. It is a projective map – a shift, a rotation, a magnification and a slight tilt of the image plane – or, when it was measured with the polynomial model, a third-order polynomial that also follows a field distortion. The halves are rectangles on the camera chip, so the same file serves a movie taken with another camera ROI: a ROI that cuts into a half leaves less of it, and its pixels keep their place in it.

Left: one simulated frame. Each molecule appears in both halves; the lines join the two spots the fit treats as one emitter, each line starting at the main-half spot. Right: why a shift is not enough – where each point of the secondary half lands, less where the map's shift at the centre of the field would put it. What is left is the small turn and magnification between the halves, half a pixel at the edges of this 100-pixel field – as much as the precision many times over.

2. Candidates in each channel. Detection is that of Gaussian 2D – a difference-of-Gaussians filter and local maxima above the cutoff – run on each channel on its own, so a dynamic cutoff is set from each channel's own noise. The two channels happen to share a chip; a cutoff set over both would be set by the brighter one, and the fainter partner of every pair in the dim channel would not be found. (An absolute cutoff is the same number in both.)

3. Pairing. The peaks of the secondary channel are mapped onto the main channel with the transformation. A main peak and a mapped secondary peak within 4 pixels of each other, each the other's nearest, are one molecule: they become one candidate, at their mean position weighted by the square root of each peak's height. Peaks without a partner are kept: a molecule of the dye that puts little light into one half may be found only in the other, and it is still fitted. The candidate is rounded to a pixel in the main channel, that pixel is mapped into the secondary channel and rounded again, and a box (the fit box, also called ROI size or fitting window: fit box) is cut at each. A candidate whose two fit boxes do not both lie inside their own channels is dropped – half a fit box from the seam too, where a fit box would reach into the other channel.

A spot that is not round can give one molecule two peaks in a channel – an astigmatic spot far from focus is a streak with a maximum at each end – and the ends of a streak in one half need not lie near those in the other, so they are not paired. Each end is then a candidate, and each fit box holds the whole spot. Their fits all end on the one molecule, so after the fit two localizations of a frame less than a pixel apart are one: only the one nearest its own candidate, whose fit box holds most of the spot, is kept. A single-emitter fit cannot place two molecules that close anyway – two of them are both fitted to the middle of their light.

4. One fit for both fit boxes. Each fit box has its own Gaussian model, as in the single-channel fit, and the two are fitted at once by maximum likelihood: the Poisson likelihood of every pixel of both fit boxes. What makes it one emitter is that some parameters are linked – one number for both halves – and the rest are free. By default:

Linking x and y gains precision because the two spots are two measurements of one position. With the photons split evenly between halves of equal PSF width, the position from both is times more precise than from one half alone – a little less here, because the secondary spot in the simulation is wider.

The gain from fitting both halves as one emitter. Spot pairs simulated at known positions, the photons split evenly, 10 background photons per pixel in each half, a 1.3 px PSF in the main half and 1.45 px in the secondary: the scatter of x about the truth (dots) and the precision the fit reports (lines), fitting the main half alone (orange) and both halves linked (blue).

5. The photon ratio. The fit gives each molecule photons_ch0 in the main half and photons_ch1 in the secondary half. Their total is photons, and the fraction in the secondary half is

between 0 (everything in the main half) and 1. Each dye has its own ratio, set by its emission spectrum and the dichroic, so a histogram of ratio over a two-dye sample has two peaks. How far apart they are, against how wide they are, decides how well the colours can be told apart; the width shrinks with the photons, as for a pure photon-counting spread.

The colour is in the photon split. The simulated molecules of the two dyes (true ratio 0.25 and 0.75, dashed) fitted from the frames above. Left: the histogram of ratio of each dye. Right: the ratio of every localization against its photons – the dim ones spread widest, and are the ones colour assignment is least sure of.

6. Finishing. When the last frame is fitted, the steps of after the fit run over the whole table, in this order (After the fit has them all):

They are the same plugins as in the Analysis tab, so a fit that finishes itself and one finished by hand afterwards give the same numbers. Run these now, at the foot of the section, runs the steps as they are set on the open localizations without fitting again: that is how to add a step that was not ticked, or to change the colour rule. A step that fails is a line in the output and nothing more – the table is saved regardless. The localizations are written to the file as they are fitted; when a finishing step changed them, the file is written once more with the finished table, and every step goes into its history.

Calibrating from the movie. With registration > from this movie ticked, a first pass runs before the fit. It fits frames of the movie with a plain Gaussian 2D fit read as two channels, with the same camera and detection settings as the real fit: the halves are cut apart as the microscope's arrangement (or the one chosen in channels) says, each detected and fitted on its own, at its own threshold, and every localization keeps its channel. The arrangement is never detected. Every molecule then shows up as two localizations in the same frame, one per channel, and Analysis/Register/Calibrate transform's method finds the map from those pairs: the layout puts the second channel roughly onto the main one, the vector between every two localizations of a frame, one of each channel, is collected, the extra offset is the one that turns up over and over, the pairs are matched through it and a projective map is fitted, then matched again, more tightly, through that map and fitted again. The frames are chosen carefully:

The measured transformation is used for the fit and, with save it, written beside the output, as <acquisition>_locs_2ct.h5 by default, ready to be chosen as a file next time. The output box reports how many pairs it was registered on and the residual in x and y.

Checking it before the fit. Preview runs the same pass, so the registration can be judged before a long fit is started on it: the frame is drawn with the measured map, and a tab channel registration shows the figures of Calibrate transform – the vote, the residuals and where the pairs are. The first preview takes as long as the pass; the measurement is then kept, so another frame's preview, and the run after it, use it at once. It is measured again only when something it depends on changes: the movie, its frames, the camera, the detection, the fit or the calibration pass's own settings. A preview writes no file; the run saves the transformation, and its result has the same tab.

In detail

The model. For pixel of the fit box of half ( the main half, the secondary),

with the pixel-integrated Gaussian of Gaussian 2D. Each half has the five parameters , and the fitted vector holds one entry for each linked parameter and one per half for each free one – by default . A linked parameter reaches half through a factor and an offset,

and a free one as . The main half has , . For the secondary half, for x and y is the local scale of the transformation at the candidate (its derivative, by a one-pixel finite difference), and the offset is the sub-pixel remainder left when the partner fit box was rounded to a pixel, plus with half the fit box size, because the scale acts about the fit box's centre and not its corner. The link is diagonal: a rotation between the halves has no term of its own, and at the fraction of a degree of a splitter its effect within one fit box is far below the precision. The images are never resampled – warping one half onto the other would correlate the noise of neighbouring pixels and break the Poisson likelihood.

The fit. The deviance of Gaussian 2D, summed over the pixels of both fit boxes, is minimised with the same Levenberg-Marquardt steps, with the gradient taken through the link:

Each half starts as the single-channel fitter would from its own fit box (centre of mass, border background, brightest pixel); a linked parameter starts from the main half's value. The limits (, , the width inside the fit box) apply per half, and a linked parameter is limited once, through the main half. A pair one of whose fit boxes has no light at all is returned as not-a-number and dropped: the two halves are one measurement.

The precision. The Cramér-Rao bound comes from the Fisher information summed over both fit boxes,

so a linked x collects the information of both spots. For two halves with photons each and the same width, without background, that is against for one half: the factor of the figure.

What is written. x_nm, y_nm are the linked position on the camera chip, where the main channel saw the molecule: its own pixels put back on the frame, a mirror undone, and the camera ROI's corner added – as every fitter reports positions, so a whole-chip fit of the same movie puts the main channel's molecules at the same place. (Versions 7 and 8 counted them from the main channel's corner instead.) With the photons free, photons is and photons_err the two errors added in quadrature; ratio is . With link photons on, one number is fitted and the halves see and for the photon ratio ; photons is their total, , and ratio is 0: there is no split left to measure. (Before version 2 it was the main half's alone.) logl_rel is the log-likelihood per pixel of the two fit boxes together. EM gain (an EMCCD's electron multiplication) and the camera's read noise are handled as in the single-channel fit (Gaussian 2D), the read noise in both fit boxes. A transformation measured in the bead image's own pixels (a ROI-local geometry, made without the camera ROI) needs a movie of the same size, and a movie without a camera ROI in its metadata is taken to start at the chip's corner, with a warning.

Compared with the paper. The global fit is that of Li et al. 2022, whose software offers a Gaussian PSF beside its spline. Where the code departs from the publication:

Parameters

settingdefaultwhat it does
source – Where the frames come from.
   file
   source.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).
   first frame (more)
   source.start
0Frames before this one are skipped.
   last frame (more)
   source.stop
autoAuto: to the end. at least 1
   live
   source.live
offThe file is still being written: fit what is there and keep watching for new frames.
   stop after (more)
   source.live_timeout
30 s idleLive: give up after this long without a new frame. at least 1 s idle
   frames per block (more)
   source.chunk
200Frames 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.
   microscope
   camera.microscope
autoAuto: recognised from the file's metadata, else the last one used.
   camera
   camera.camera
autoAuto: identified from the file's metadata, else the microscope's.
   conversion
   camera.conversion
autoPhotoelectrons per count; auto: from the file or the camera database.
   offset
   camera.offset
autoThe count of a pixel that saw no light.
   EM gain on
   camera.em_on
autoAn EMCCD with its electron multiplication on: the counts are divided by the gain, and the noise is doubled.
   EM gain
   camera.emgain
autoThe EM gain the camera was set to.
   pixel size
   camera.pixelsize_um
autoThe pixel's size in the sample, after the magnification.
   pixel size y
   camera.pixelsize_y_um
autoAuto: square pixels, the same as in x, or the microscope's.
   read noise
   camera.read_noise_e
autoRms 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.
   read
   channels.split
whole chipTwo channels: a split camera, each channel detected and fitted on its own; whether the dichroic was in, no file says. Choices: whole chip; two channels
   layout
   channels.layout
the microscope'sHow the chip is split: the microscope's entry, or chosen by hand with the main channel and the split.

microscope reads it from the entry of the microscope the movie was taken on – 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 stops with a message asking for it. All the Ries lab's microscopes are right-left mirrored. Choose a layout by hand and split position appears. channels says where the two channels are on the chip; the map between them is the model's registration, whose measuring settings are only how it is measured. With a transformation file, the channels lie where the file says, the split it was measured on; a layout chosen by hand that says otherwise is not used, and a line under the form and a warning at the run say so.

Choices: the microscope's; right-left; right-left mirrored; up-down; up-down mirrored
   main channel
   channels.main_channel
the microscope'sThe channel the other is registered onto: the microscope's (its transmitted arm), or either half, to swap them.

For two far-red dyes split by a long-pass dichroic, the transmitted arm is the brighter and the usual main channel; on the microscope's the entry names it, and its choices say which half that is. Choose the other half to swap the dyes, also with the microscope's layout, whose regions and mirror stay. A transformation file's own main channel wins, and the form says so.

Choices: the microscope's; left; right; upper; lower
   split position (more)
   channels.split_position
autoThe 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.
   filter
   detection.filter
difference of GaussiansWhat 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 sigma
   detection.sigma
1.2 pxThe width of the smoothing: about the PSF's. at least 0.1 px
   cutoff
   detection.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 value
   detection.cutoff
1.7Lower finds dimmer molecules, and more noise.
fit region – Where in the frame to fit: shapes drawn on the preview's frame.
   drawn
   region.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 channels are still filtered whole, so a dynamic cutoff is set as without a region. The Preview's frame panel shows both channels where they lie on the chip, and a shape may be drawn on either: it marks a part of the sample, so its part on each channel is copied onto the other through the registration (dotted) – a structure that shows best in channel 2 is outlined there, and a strip left out along the boundary between the channels crops both inner edges. The shapes are kept with the settings: in the workspace, a chain or a batch they apply to every file. They act on the pairs: each channel's peaks are found and paired first, and a molecule is kept or left out by where it lies in channel 1, by the shapes and their copies – so a bead left out is not fitted from its partner in the other channel, and a molecule only the dim channel saw is judged where it lies. A region that leaves a channel nothing to fit is said under the form, in the Preview and at the run. Draw after the registration is chosen: without one the Preview shows the frame as the camera wrote it.

   use the region
   region.use
onOff fits the whole frame and keeps the shapes.
model – A free-width Gaussian per channel, and which parameters they share.
   start sigma
   model.sigma
1.2 pxThe PSF width both halves' fits start from; each is fitted. at least 0.1 px
   link x, y
   model.link_xy
onOne position for both channels, through the registration; unlink only to check the transform.

Unlinked, each half fits its own position. The table's position is the main half's, and dx_nm_ch1, dy_nm_ch1 say how far the secondary half put the molecule from where the transformation expects it, in the main half's coordinates. Their median over the field should be close to 0 and their scatter about the precision; a trend across the field means the transformation does not hold there. Relink for the real fit: linked, both halves pin one position and the precision is better.

   link photons
   model.link_photons
offOff for two colours – the photon ratio is what tells the dyes apart.

On, one photon number is fitted and the secondary half is expected to hold photon ratio times as many as the main: more precise, and no colour, and photons is the total over both halves. That suits two halves that see the same dye, not two dyes.

   link background (more)
   model.link_background
offOne background for both halves; off: each half fits its own.
   link width (more)
   model.link_sigma
offOff: each half finds its own width, which it should – they see different wavelengths and rarely share a focus.

Worth ticking only to test whether the two halves really differ in width.

   photon ratio (more)
   model.photon_ratio
autoSecondary / main, used when the photons are linked; auto: the beads' ratio if the transformation is a bead calibration, otherwise 1.

Only used with link photons on; with the photons free it has no effect. Left on auto it is 1 for a transformation measured from localizations, and the beads' measured ratio when the transformation file is a dual-colour bead calibration.

registration – Where the second channel is.
      transformation
      model.registration.path
–From Register/Calibrate transform, or a dual-colour bead calibration.

Ignored when registration > from this movie is ticked.

      from this movie
      model.registration.calibrate
onIgnore the file: fit the first frames with a plain Gaussian and register them.

On by default: this fitter has no bead calibration to bring a map along, and a movie's thousands of pairs measure it where the splitter is today. Untick it to use a transformation file instead – for a movie too sparse to register on, or to fit several movies with one map. The calibration pass fits at most at most frames with a plain Gaussian; then the real fit runs over the whole movie.

      at most
      model.registration.calibrate_frames
5000 framesThe most frames the calibration pass fits, however few localizations they give. at least 50 frames
      localizations wanted
      model.registration.calibrate_locs
10000In the dimmer of the two channels, which is what limits the pairs; blocks are read until this is reached or the frame cap is.

10,000 in the dim channel is usually plenty; a sparse movie runs out of frames first, and the output says so.

at least 500
      spread over
      model.registration.calibrate_blocks
10 blocksThe frames are taken as this many evenly spaced blocks across the whole movie, not as one run at the start. at least 1 blocks
measuring – How a registration between two channels is measured: the vote, the pairing and the fit.
         transformation
         model.registration.measure.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.

polynomial is refused, with a message, when the pairs are too few for its twenty coefficients or cover less than half of the field; the projective map is then kept.

Choices: projective (8 coefficients); polynomial, order 3 (20)
         vote bin (more)
         model.registration.measure.vote_bin_px
2 pxThe bin of the histogram of pair vectors the offset is voted in. at least 0.1 px
         vote smoothing (more)
         model.registration.measure.vote_smooth_px
4 pxThe width of the difference-of-Gaussians filter the vote is scored with. at least 0.1 px
         coarse matching
         model.registration.measure.coarse_tolerance_px
20 pxFirst pass; must cover the rotation between the channels – 3 degrees over 512 px is 27 px.

It has to cover what the voted offset alone cannot: a 3 degree rotation over 512 px is 27 px at the edge. Looser costs nothing measurable.

at least 0.1 px
         fine matching
         model.registration.measure.fine_tolerance_px
1 pxSecond pass over clean matches only, which is where the accuracy comes from; 0 skips it.

About seven times the residual of a healthy registration (0.13 px); tighter strips the edges of the field.

         adapt fine matching (more)
         model.registration.measure.adapt_fine_tolerance
onWiden the fine matching to what the coarse fit misses its own pairs by, when those pairs are clean.
         minimum pairs (more)
         model.registration.measure.min_pairs
20Fewer pairs than this and the registration refuses. at least 4
         pairs used in the fit (more)
         model.registration.measure.max_pairs
20000At most this many pairs, drawn at random, go into each fit. at least 4
         outlier threshold (more)
         model.registration.measure.reprojection_threshold_px
1 pxThe robust (RANSAC) fit's inlier radius, at least; it widens with the matching tolerance. at least 0.01 px
         dx/dy limit (more)
         model.registration.measure.transform_axis_limit_px
0.5 pxThe 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
      skip the first
      model.registration.calibrate_skip
500 framesThe opening frames of a movie are not single molecules: everything is on at once and often saturated, and fitting that gives a registration nothing to pair.

Set it to 0 for a movie that does not start with everything on, such as a simulation, or one started after a bleaching phase.

      save it (more)
      model.registration.save_calibration
onWrite the measured transformation beside the output, as *_2ct.h5.
channel move – How far a split camera's second channel moved on the chip since the beads, on top of their registration: the same part in every two-channel fitter and the DECODE training's prefit.
      move
      model.move.move
measuredNone: the registration as it is; typed: moved by the rows and columns below; measured: from this movie, by the fit with x and y free per channel (Preview shows it; kept beside the movie).

How far the splitter's second channel moved on the chip since the beads, on top of the registration: the beads' map with a translation, constant or over the frames. A move of a pixel or more leaves the peaks of the two channels unpaired and each molecule fitted twice, once in each half, with the other half's box in the wrong place. typed takes the rows and columns. measured measures it from this movie, in two steps. First a vote: each channel's peaks, the main channel's mapped into the second by the registration, every difference within 10 pixels in one histogram; partners pile up at the move. That finds the move to about a pixel, enough to put each partner in its box – a peak's maximum is not the PSF model's centre, so peaks cannot do more. Then the fit itself, with link x, y off – each channel its own x and y – on blocks of frames a block spread through the movie: each well-fitted pair (the better half by their error) says where its second channel lies against the link. The move is their error-weighted mean, pairs more than 3 robust standard deviations off left out; with over time, a robust smoothing spline of them over the frames. Preview measures it and draws a tab, channel move: each pair's shift against the frame with the move, and what is left after the move against z – a slope there means the registration and the PSF models disagree, which a move cannot mend. The measurement is kept beside the movie (<movie>.channel_move.json), so later previews and runs read it; the line under move says what was found. Unlike registration > from this movie, which measures a new map with a plain Gaussian, this keeps the beads' map and measures with the model that made it. measured is the default. Where too few pairs are found to measure it, the fit goes on with the registration as it is and says so. A constant move whose blocks differ by more than a quarter pixel is said to change: tick over time. This is the two channels moving against each other; the sample's own drift is the same in both channels and plays no part. learn says what the correction to the beads' map learns: shift (the default), or affine – the shift with a rotation, scale and shear, constant over the movie, from the same pairs: each pair's shift regressed on where its partner lies on the chip, with z as a term of its own so that a z-dependent offset is not taken for a turn. Either way the correction is composed with the beads' map into the one transformation the fit uses, and the table records it (registration_used in its metadata: the transformation, where the map came from, and the move); over time, the transformation at the move's mean, and the curve about it. On two of our movies an affine was measurable but moved no position more than 6 nm at the field's corners, so it is for a splitter turned since the beads.

Choices: none; typed; measured
      moved by
      model.move.rows
0 rowsHow far the second channel lies from where the registration puts it, along the chip's rows.
      and
      model.move.columns
0 columnsThe same along the columns.
      over time
      model.move.over_time
offA smooth curve over the frames instead of one move: for a splitter that drifts during the acquisition (the figure shows the drift either way).
      learn
      model.move.learn
shiftShift: how far the second channel moved; affine: also how it turned, scaled and sheared, learnt from the same pairs (for a splitter turned since the beads). Choices: shift; affine
      blocks (more)
      model.move.blocks
20Blocks of frames spread over the movie the move is measured on. at least 2
      frames a block (more)
      model.move.block_frames
50Frames in each block. at least 5
fit – Everything about the fit that is not the camera or the PSF model.
   fit box
   fit.roisize
13 pxThe square cut around each candidate and fitted.

Both fit boxes of a pair have this size, and both must lie inside the frame, each on its own half.

at least 5 px
   iterations (more)
   fit.iterations
50The most steps a fit may take. at least 1
   max fit distance (more)
   fit.max_fit_distance
autoReject fits that ran off; auto: keep all.
   per-pixel noise (more)
   fit.per_pixel_noise
offAn sCMOS's offset and read noise pixel by pixel, from the camera's noise map.

Each channel's pixels weighted by their own read noise, from the camera's noise map (Camera noise calibration), cut and mirrored into the channels as the frames are. The map must cover both channels.

output
   save HDF5
   output.save
onWrite the table to a file as it is fitted.
   file
   output.path
–Filled from the source: <acquisition>_locs.hdf5 next to the folder the images are in.
   raw frames (more)
   output.raw_frames
50Camera 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
PIZStageImage tags drawn while the fit runs and when it is done, names or parts of names; empty: none (Analysis/Process/Image Tags).

PIZStage draws the piezo position, which shows at once whether the focus lock held. The figure opens when the fit is done; a window of it still open from an earlier fit is redrawn every 5 seconds while the fit runs, in place and without coming to the front, so a focus lock that slips is seen during the acquisition. On a microscope whose piezo has another name, put that name (or part of it) here. Every tag that changed is kept in the file whatever this says; Analysis/Process/Image Tags draws any of them later.

after the fit – The steps in the order they run; each step's settings follow its switch.
   astigmatic z
   finish.astigmatic_z
offZ from the widths of the elliptical Gaussian, before any drift correction so that it can correct z (Analysis/After fit/Astigmatic z).
z calibration
      calibration
      finish.astigmatic.calibration
from a fileA file from the PSF calibration window (elliptical Gaussian), or the curves typed. Choices: from a file; typed
      file
      finish.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 x
         finish.astigmatic.typed.sigma_x_nm
130 nms0: the narrowest the spot gets in x. at least 1 nm
         focus x
         finish.astigmatic.typed.focus_x_nm
300 nmThe z where x is narrowest; z = 0 is the round spot.
         depth x
         finish.astigmatic.typed.depth_x_nm
400 nmHow far from its focus the x width has grown by sqrt(2). at least 1 nm
         width y
         finish.astigmatic.typed.sigma_y_nm
130 nms0: the narrowest the spot gets in y. at least 1 nm
         focus y
         finish.astigmatic.typed.focus_y_nm
-300 nmThe z where y is narrowest.
         depth y
         finish.astigmatic.typed.depth_y_nm
400 nmHow far from its focus the y width has grown by sqrt(2). at least 1 nm
         A x (more)
         finish.astigmatic.typed.a_x
0Huang's cubic term in x.
         B x (more)
         finish.astigmatic.typed.b_x
0Huang's quartic term in x.
         A y (more)
         finish.astigmatic.typed.a_y
0Huang's cubic term in y.
         B y (more)
         finish.astigmatic.typed.b_y
0Huang's quartic term in y.
         z range
         finish.astigmatic.typed.z_range_nm
800 nm+- this: where the curves are trusted. at least 10 nm
      z scale
      finish.astigmatic.z_scale
1True z per apparent z: about 0.7-0.8 for an oil objective imaging in water, 1 for none. at least 0.01
   4Pi z
   finish.fourpi_z
onZ from the interference phase of a 4Pi fit, unwrapped by its envelope z (Analysis/After fit/4Pi z).
4Pi phase
      calibration
      finish.fourpi.slope
as fittedThe 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
      model
      finish.fourpi.path
–A 4Pi model (.h5): this program's or uiPSF v1's.
      time window
      finish.fourpi.window_frames
1000 framesThe cavity's phase is measured over this many frames. at least 10 frames
      smoothing
      finish.fourpi.smoothing
1 windowsAverage each window with its neighbours, this many in all. at least 1 windows
      refine period
      finish.fourpi.refine_period
offFind the fringe period that the data agree with best.
      z scale (more)
      finish.fourpi.z_scale
1True z per apparent z: 1 when sample and immersion index match. at least 0.01
   overlay channels
   finish.overlay
offMove 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 from
      finish.overlay_channels.source
transformation fileA saved registration, beads already fitted as two channels, or bead movies to fit. Choices: transformation file; fitted beads; bead movies
      file
      finish.overlay_channels.path
–A _2ct.h5 (Calibrate transform, or this plugin's), or a dual-colour bead calibration.
      fitted beads
      finish.overlay_channels.beads_table
–Bead localizations fitted with channels > read: two channels.
      bead movies
      finish.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.
         cutoff
         finish.overlay_channels.bead_fit.cutoff
1.7The detection threshold, in units of the filtered frame's noise (the fitters' dynamic cutoff). at least 0.1
         at most
         finish.overlay_channels.bead_fit.max_frames
autoFrames 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.
         layout
         finish.overlay_channels.channels.layout
the microscope'sHow 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 channel
         finish.overlay_channels.channels.main_channel
the microscope'sThe 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
autoThe 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.
         transformation
         finish.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 pxThe 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 pxThe width of the difference-of-Gaussians filter the vote is scored with. at least 0.1 px
         coarse matching
         finish.overlay_channels.registration.coarse_tolerance_px
20 pxFirst pass; must cover the rotation between the channels – 3 degrees over 512 px is 27 px. at least 0.1 px
         fine matching
         finish.overlay_channels.registration.fine_tolerance_px
1 pxSecond 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
onWiden 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
20Fewer pairs than this and the registration refuses. at least 4
         pairs used in the fit (more)
         finish.overlay_channels.registration.max_pairs
20000At 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 pxThe 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 pxThe 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 registration
      finish.overlay_channels.save
onWrite it beside the beads as <name>_2ct.h5 and use it again while the beads and these settings are unchanged.
   drift correction
   finish.drift
noneEstimate 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.

Their pages, RCC and COMET, say which to choose; the settings under RCC drift and COMET drift are theirs, and only the chosen one's is shown.

Choices: none; RCC; COMET
RCC drift – How finely to bin, render and search.
      time windows
      finish.rcc.n_timepoints
20How many windows the acquisition is cut into: more follow faster drift, fewer are less noisy. at least 2
      pixel size
      finish.rcc.pixelsize_nm
15 nmThe pixel of the images that are correlated; about the localization precision. at least 1 nm
      z bin (more)
      finish.rcc.z_pixelsize_nm
5 nmThe bin width of the z histograms. at least 0.1 nm
      max drift
      finish.rcc.max_drift_nm
500 nmThe largest drift between any two windows that can be found. at least 1 nm
      peak fit half-width (more)
      finish.rcc.fit_window
3 pxThe 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 pxA wider field of view is folded back onto itself, to keep the correlation fast. at least 64 px
      correct z
      finish.rcc.use_z
autoAuto: if the table has z.
      merge blinks
      finish.rcc.group
onMerge the localizations of one blink into one before measuring.
      within (more)
      finish.rcc.group_dx_nm
autoHow close localizations in consecutive frames must be to be one blink; auto: the session's merge settings.
      dark frames (more)
      finish.rcc.group_dt
autoHow many dark frames a blink may skip; auto: the session's merge settings.
      tile (more)
      finish.rcc.tile_nm
200 nmThe 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
autoAuto: square tiles. at least 1 nm
      max axial drift (more)
      finish.rcc.axial_max_drift_nm
200 nmHow far from zero the axial correlation peak is looked for. at least 1 nm
      skip zero shift (more)
      finish.rcc.exclude_zero_lag
onLeave the zero-shift sample out of the axial peak search.
      error bar
      finish.rcc.split_half
onEstimate 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 estimatedThe 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
framesWhat window size counts; time-window fit only. Choices: frames; localizations; windows
      window size
      finish.comet.segmentation_var
500Frames or localizations per time window, or the number of windows; time-window fit only. at least 1
      max drift
      finish.comet.max_drift_nm
300 nmThe largest drift expected; also the radius within which localizations are paired. at least 1 nm
      target sigma
      finish.comet.target_sigma_nm
30 nmThe finest width of the overlap Gaussian, where refinement stops. at least 0.1 nm
      initial sigma (more)
      finish.comet.initial_sigma_nm
autoThe width the refinement starts from; auto: a third of max drift.
      smoothing (more)
      finish.comet.boxcar_width
1 windowsRunning mean over this many windows between refinement steps; 1 is none; time-window fit only. 1 to 1000 windows
      interpolation (more)
      finish.comet.interpolation
cubicThe 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
autoA 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-07Relative change of the cost at which the optimizer stops.
      approximate kernel (more)
      finish.comet.approximate_kernel
onSkip pairs more than 6 sigma apart; the spline fit always does.
      ftol coarse (more)
      finish.comet.optimizer_ftol_coarse
autoFtol for the steps above the target sigma; auto: ftol; time-window fit only.
      quality control (more)
      finish.comet.quality_control
offDiscard time windows whose fit does not beat no correction; needs fit spline off.
      min lift (more)
      finish.comet.min_lift
0How much a window's fit must improve its overlap over no correction to be kept.
      merge blinks
      finish.comet.group
onMerge the localizations of one blink into one before estimating.
      within (more)
      finish.comet.group_dx_nm
autoHow close localizations in consecutive frames must be to be merged; auto: the session's merge settings.
      dark frames (more)
      finish.comet.group_dt
autoHow many dark frames a blink may skip; auto: the session's merge settings.
      two stage (more)
      finish.comet.two_stage
offA grouped pass, then an ungrouped one within fine radius.
      fine radius (more)
      finish.comet.two_stage_radius_nm
30 nmThe max drift of the second, ungrouped pass.
      RCC first (more)
      finish.comet.rcc_prepass
offCorrelate 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
10The time windows RCC correlates. at least 2
      RCC max drift (more)
      finish.comet.rcc_prepass_max_drift_nm
autoAuto: RCC's own default.
      fit spline
      finish.comet.spline
onFit the drift as a smooth curve in time rather than one value per time window.
      knot spacing
      finish.comet.spline_knot_frames
2000 framesFrames between the spline's coefficients. at least 10 frames
      spline penalty (more)
      finish.comet.spline_penalty
0Extra penalty on the curve's bending; 0 is none.
      transformation
      finish.comet.transformation
shiftWhat 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
autoFrames between the transformation's spline coefficients; auto: the knot spacing. at least 10 frames
      transformation penalty (more)
      finish.comet.transformation_penalty
0Pulls the transformation towards none where the data say little; 0 is none.
      correct z
      finish.comet.use_z
autoAuto: if the table has z.
      precision weights
      finish.comet.precision_weights
onWiden 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 lateralThe 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 bar
      finish.comet.split_half
onEstimate 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 estimatedThe frame the drift is zero at; first or last frame for consecutive files. Choices: as estimated; first frame; last frame
   assign colours
   finish.assign_colors
onSplit the localizations by their photon ratio and write channel (Analysis/After fit/Assign colours).
colour assignment
      method
      finish.colors.mode
split at the minimaA cut in r, or a posterior per localization. Choices: split at the minima; probabilistic
      colours
      finish.colors.colors
2How many species the histogram of r holds. 1 to 6
      exclusion dr
      finish.colors.exclusion
0.05Minima: leave this much of r on either side of a boundary unassigned.
      sigma
      finish.colors.tolerance
3Probabilistic: 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 tails
      finish.colors.keep_tails
offProbabilistic: 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 crosstalk
      finish.colors.crosstalk
0.05Probabilistic: 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 spread
      finish.colors.spread
0Probabilistic: 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 errors
      finish.colors.use_errors
onTake the photon errors from the fit where the table has them; otherwise sqrt(photons).
      use abundances (more)
      finish.colors.use_prior
onProbabilistic: weight each species by how much of the sample sits under its mode.
      minimum photons (more)
      finish.colors.min_photons
0Localizations with fewer photons in total are ignored and left unassigned.
      intensity LUT (more)
      finish.colors.cmap
viridisThe colour map of the intensity plot's 2D histogram. Choices: viridis; cividis; turbo; magma; inferno; Greys; Greys_r
      histogram bins (more)
      finish.colors.bins
200How many bins the histogram of r has over its whole range, -1 to 1. 10 to 2000
      smoothing (more)
      finish.colors.smoothing
2 binsThe 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
autoThe 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
autoAuto: photons_ch0, or the first pair of per-channel attributes in the table.
      channel 2 attribute (more)
      finish.colors.channel2
autoThe attribute r counts negative; name both attributes or neither.
   then chain
   finish.chain
–A saved chain run last, on the finished table; empty: none.

Output

The table, one row per molecule and frame:

attribute meaning
x_nm, y_nmthe position on the camera chip, where the main channel saw it
x_err_nm, y_err_nm, xy_err_nmits precision (CRLB), from both halves
photons, photons_errthe photons of both halves together
photons_ch0, photons_ch1the photons in the main and the secondary half, and photons_err_ch0, photons_err_ch1
ratiothe fraction of the photons in the secondary half
background_ch0, background_ch1the background per pixel of each half (background is the main half's)
sigma_nm_ch0, sigma_nm_ch1the fitted PSF width of each half (sigma_nm is the main half's)
channelthe colour Assign colours gave it: 1, 2, or 0 for none
logl, logl_relthe log-likelihood, and per pixel of both fit boxes
peak_x_nm, peak_y_nm, iterationsthe candidate in the main half, and the steps taken

As for Gaussian 2D, every length is in nm and no pixel copy is kept: the file records the pixel size, and only the candidate (peak_x_pix, peak_y_pix) stays in camera pixels.

The finishing steps' figures – the ratio histogram of Assign colours, the drift curve – open with the fit's result.

What to check:

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.

Differences from SMAP

Based on SMAP's ratiometric workflow (fit_wavelet_dualcolorratiometric) and its global fit (fit_global_dualchannel, with the MLE_global_spline fitter in PSF free mode) (Ries 2020). The main changes:

References