Panels
Makes the PSF calibration the Spline 3D fitters read, from beads in a z stack, from single molecules on the coverslip in a z stack, or in situ from the blinking molecules of a measurement – the bead average or a physical model of the microscope's pupil learnt with uiPSF v2 – or, as a fourth, the curves of an elliptical Gaussian's widths in z that Astigmatic z reads, or, in the 4Pi mode, a 4Pi model for Spline 4Pi from 4Pi bead scans, and shows what each found and how well it fits.
A 3D fit needs to know what one molecule looks like at every height, the point spread function (PSF). This window makes that calibration from one of three samples (sample), each offering the methods that fit it (method):
The pupil model writes the same kind of file from all three and hands it to the same fitter, so they can be compared; the in situ one is valid at the focus the data were imaged at. One method makes no PSF at all:
The pupil model: the light from a point is collected by the objective, and everything the microscope does to it – the astigmatism of a cylindrical lens, the objective's own aberrations, the refractive indices it passes through – is described by the objective's pupil, a disc whose phase is written as a sum of Zernike modes (standard shapes such as astigmatism, coma or spherical aberration). From the pupil the PSF at any height follows by the physics of light, so the model is smooth without smoothing and also holds where the beads were noisy. The method is uiPSF (Liu et al. 2024, doi:10.1038/s41592-024-02282-x); this is its re-implementation in PyTorch (uiPSF v2), run inside SMAPpy.
Its input is the bead calibration's: z-stacks of sub-diffraction fluorescent beads, imaged while the objective steps through focus. Its output is the same kind of spline calibration file, so Spline 3D and Spline 3D 2C read it as they read a bead average, and beside it the model itself, which can start the next calibration of the same microscope.
Use it to calibrate for fitting, and to look at the microscope: every run shows the aberrations with their uncertainties and where the model and the data disagree. Untick save model to only look.
A calibration goes in two steps. Detect beads finds the beads, rings them on the Stacks page and says how many there are and, for the pupil model, about how long learning them will take and how much memory it will hold at most – so a run of an afternoon is never started by accident. The memory is measured, not guessed: the model's work for one bead is run once and what it held is read from the system (the graphics card's own count on a Mac's GPU or a CUDA card), and learning then takes as many beads at a time as fit in 80 % of the memory free at that moment – half of the graphics card's free memory on a CUDA card – counting each at 1.25 times what one bead held. Where even one bead does not fit, it is computed in smaller pieces (fewer Jacobian columns at once) until it does, and the line says so if it never does. On a CUDA card the memory said is the card's own. After a run the summary says when the card's memory ran out and its driver used system memory instead, which Windows does rather than fail, and which makes learning many times slower. More memory only lets more beads go at once, which is hardly faster: 19 beads of 100 slices of 27 × 27 pixels on a laptop's GPU took 40 s in fours, about 2 GB a bead, where all at once had filled 32 GB and swapped. When a run ends, the memory it used is handed back to the computer. Calibrate then learns from them; pressed first, it detects too. Pressed again after a change, it calibrates with the settings as they are then. A bar shows how far the run is and about how long it has left.
The pupil model needs PyTorch, an optional part of SMAPpy. Without it, or with one too old, Install PyTorch installs the right build for the computer (for Apple's GPU, an NVIDIA card or the CPU) into the Python running SMAPpy; the window also shows the command to type instead. The bead average works without it. It uses the GPU where PyTorch finds one (NVIDIA, or Apple's), and the line Detect writes says where: learnt on the graphics card, on Apple's GPU or on the CPU. A PyTorch built for the CPU only on a computer with an NVIDIA card – a plain pip install torch on Windows brings that one – works, several times slower; the window says so and offers Install PyTorch to replace it with the card's build.
This section and the next describe the pupil model from beads; in situ learning has its own section after them, and the bead average's are on its own page.
Looking at the stacks. The Stacks page shows each added file as it was recorded, one plane at a time, with a slider for the file and one for the plane. After Detect beads each bead found is ringed and numbered with its row in the table: cyan, or red for one too dim or a double?; after a calibration the ring's colour says whether it was used (blue), excluded (grey) or rejected (red). A mark made in the table and not yet applied by Calibrate dashes the ring, in the colour it will take. Clicking a ring selects the bead. Molecules' z sweeps and in situ's movies are shown frame by frame instead: every frame until the molecules are detected, then only the frames they were found on, each ringed on its own frame. A z sweep's frame also shows its sweep and the stage's z, read from the file's metadata.
Finding the beads is the bead calibration's own: the same detection, the same settings under beads, the same verdict on each bead's brightness. Of that verdict only too dim is applied here, before learning: a spot much fainter than the typical bead (below it divided by the square root of brightness range; the typical bead is the median weighted by each spot's light, so a crowd of specks does not pull it down) is a speck, not a bead, and its fit would be noise. A pair of two channels is judged by its light in both together. Specks do not cost a bead its isolation either, so a lower threshold finds more beads rather than fewer. A second bead the detection's smoothing merged into the first costs it its isolation, and a bead whose shape is far from the others' – two beads closer than any search can split – is marked double? and excluded on Calibrate, a dashed red ring, where space lets it in again (the bead calibration's page says how both are found). A too bright bead is kept and judged by its fit, which shows a doublet. The camera's numbers come from the camera database, as a fit of the same files would take them.
Cutting one box of raw pixels around each bead, converted to photons, with saturated pixels left out of the fit rather than the bead dropped. The first slice of every stack is left out: on real data it is often brighter than the rest.
Estimating the time. After detection the model is built for these beads and its image of one bead is computed a few times and timed, which takes a few hundredths of a second. Learning costs about two such images per bead and per fitted number (the pupil's modes, the blur, each bead's position, photons and background), measured on simulated beads at Zernike orders 3 to 8, so the estimate is that time × 2 × the beads × the numbers. It is good to about a factor of two: the number of iterations a fit needs depends on the beads.
Choosing beads by hand. The detected beads are listed in the table at once. A bead marked there (Exclude / include) is left out of the next calibration – or, after one, for the pupil model a rejected bead let in. Press Calibrate again to apply the marks. A bead excluded (or included) by hand stays so through every later Calibrate until its mark is withdrawn, as long as the beads are not detected again.
Learning fits one model to all beads at once: the pupil's phase as Zernike modes and its magnitude (shared), an extra blur of the image (shared), and each bead's position, brightness and background. It runs in two stages, the low orders first, then all of them. With start from, a previous model of the microscope starts the first stage: its low orders move with the beads before the higher ones are freed, which saves a third to half of the time and is safe even from a model of another camera. For two channels the transformation starts from where an elliptical Gaussian fit puts each bead in both channels, slice by slice – closer than the bead centres the detection pairs, and never from the previous model's, which a splitter can lose between sessions – unless too few beads give a position in both.
Rejecting beads by their fit: a bead whose residuals, brightness or position stand out from the others by more than rejection (k) robust standard deviations is left out, and the model is learnt again without it. The table says which beads were used and why the others were not.
Checking, after every calibration without a button. The fit quality fits every slice of every bead with the saved spline by the Spline 3D fitter itself, as the bead average's fit quality and SMAP's bead calibration do: what a localisation with this calibration will see. Each bead becomes a curve of fitted z against frame; a bead whose curve jumps or bends away from the others is one to exclude, and clicking its curve selects it in the table. For dual colour each pair is fitted by Spline 3D 2C's global fit, both channels at once with one position and one z, as the data will be.
Then the model is set against the data (Model vs data): every bead is moved onto the model – each slice to the height the fit found for it, the image shifted by the bead's fitted x and y in each channel – with its background removed and divided by its photons. The model of the same bead is moved the same way, so the residual shows the misfit and never the alignment. The average of the used beads is shown, or one bead alone. For the bead average the data is its average before smoothing and the model the smoothed PSF the spline is made from.
The ends of the stacks. Each bead sits at its own height, so its slices cover the stage's range shifted by it, and at the top and bottom only some beads remain. The pupil model keeps to the range every used bead covers: the spline on auto reaches that far, Model vs data shows only those planes, and the fit quality leaves out the slices of a bead beyond the spline. The bead average crops its average the same way.
Saving. With save model, the model is turned into a spline: the PSF of a point on the central pixel is computed on a grid through the z range every used bead covers, each pixel as the model saw it when it learnt, and normalised as the bead average is. The calibration goes beside the stacks, named as the bead calibration names it, with the model inside the same file, and goes to the fitter. One file: the spline cannot be copied without the model it was drawn from, which Spline 3D's focus and in situ read, and start from starts from. A calibration saved before November 2026 has its model in a .uipsf.h5 file beside it; that is still read.
What the file keeps of the run. For the pupil model and the bead average, one channel or two, the calibration also keeps what this window showed of it, so that Open calibration... can show it again when its beads are long gone: the settings of every section the method read, where each bead stack was (its path, its path from the calibration's folder, its size), the bead table and where each bead was, the averaged data and model of Model vs data, the fit quality, and, for the pupil model, its bead map and the start from model it began with. A few hundred kB, written after every save, Save as... and Uncertainty from halves.... A single bead's own volume is not kept: it is the stacks', and comes back with them.
The model is vectorial and high-NA: the pupil field carries the dipole emission's polarisation through the immersion, coverslip and sample media given under microscope, and the image is taken at each camera pixel's centre. The pixel's width blurs the image too, by its size / √12 (30 nm for 105 nm pixels), which the model always adds under the learnt blur, so that blur σ is what blurs the image beyond the pixel. Every camera integrates over its pixels, so there is no setting to leave it out; a script that reproduces a model learnt before November 2026, without it, can (PSFModelSettings(pixel_blur=False)). The coverslip. Between the sample and the immersion lies the coverslip, with its own refractive index (coverslip index) and thickness (coverslip thickness). The objective is corrected for one thickness, its design thickness: 170 µm, or what the microscope's entry gives for its objective (coverslip_design_um). With an oil objective the coverslip is the immersion – glass and oil have the same index – and neither thickness changes anything. With a water or silicone objective the coverslip is a layer of its own: a thickness other than the design's leaves a spherical aberration (what a correction collar takes out), and a coverslip tilted against the optical axis leaves mostly coma. The thickness is held at its value, never learnt: the few micrometres a coverslip varies give a spherical aberration that is the same at every depth, which the pupil's Zernikes take up anyway.
The coverslip's tilt – t_x and t_y, the angles about the two axes – is learnt with learn coverslip tilt, beside the pupil. Its prior is a normal distribution about 0 with a standard deviation of 0.05 rad (about 3°): it only keeps the tilt at 0 where the data say nothing. The tilt also moves the image sideways; that shift is taken out of the model, so the positions stay where the images are and the PSF stays centred for the spline. Who sees the tilt:
A tilt makes coma, linear in the angle; astigmatism only at second order (0.02 rad at 2°, 1 µm deep, oil), so a tilt cannot explain a large astigmatism. A model with a tilt, or with a coverslip off its design thickness, is saved as a version-3 model file, which older SMAPpy refuses rather than reading without the tilt.
The likelihood is Poisson with the camera's read noise added as a shifted Poisson, SMAPpy's own fitters' likelihood; with EM gain, the excess noise factor 2. Slices closer than largest z step (50 nm) are thinned for learning, and with learn z range only the slices that near the focus are kept. The first stage frees the modes up to radial order 4 and stops early; the second frees all of them up to Zernike order (auto: 6).
The pupil magnitude is by default the minimal model: rotationally symmetric and physical, a few numbers that mean something. It is cos θ^γ – θ the angle of the ray in the immersion, γ learnt, the shape an apodisation that falls towards the edge of the pupil has – times, when the sample's index is below the NA, the light beyond the critical angle damped as from an emitter a height h above the glass, exp(−2πκh) with κ = √((ρ·NA)² − n²)/λ (h learnt, in nm, with SAF damping; the spline for single molecules is drawn with h = 0), times the aperture, a cutoff at the objective's NA. The pupil is sampled a little beyond the NA (1.51 for 1.50), so that the aperture is this cutoff and not the edge of the sampling, which on M5's beads cut light the data wanted. On M5's 100 nm beads γ was 0.32–0.41 in both colours, both media and with and without the 3D lens. An asymmetric magnitude is left out: learnt freely it gains likelihood on every set, but held at what the other sets learnt it costs as much as it gained – it follows the acquisition, not the objective.
The magnitude can instead be 1 plus Zernike modes: all of them up to the order (Zernike), only the rotationally symmetric ones (symmetric Zernike: Noll 4, 11, 22, ...), or none, so that only the apodisation of the objective remains (fixed). The blur beyond the pixel's is a Gaussian, one σ (round, the default) or σ for x and y (free), learnt, or held at blur σ (fixed); held at 0, the image is blurred by the pixel alone.
The stage's drift (drift, under more): a lateral drift of the stage through each stack, linear per stack – the beads of a stack shifted by a rate (nm per µm of the stage's travel) times the slice's z, a rate per stack – or free per slice, a shift of every slice shared by all beads. Unmodelled, a steady drift reads as coma, which also moves the image through focus. On M5's beads every stack drifted the same way, 5–54 nm per µm, and a linear drift per stack took the beads' lateral bias from 2.4–7.2 nm to 1.3–2.5 nm with two numbers per stack. The drift follows the time since the stack began, not the stage's z (stacks starting at different heights drift alike from their start), and bends where it settles; a free drift per frame follows that, but the PSF it gives is the linear one's – coma within 0.5 nm, σ within 0.1 nm, γ within 0.01 – where no drift biased the coma by up to 5 nm. So linear per stack is the default.
Bead rejection scores each bead from the learning fit itself: its mean deviance per pixel (about 1 where the model is right), |log| of its photons against the median, its distance from its box's centre and the fraction of its pixels that were saturated. A score more than rejection (k) robust standard deviations (1.4826 × the median absolute deviation) above the median rejects the bead, with floors so that near-identical beads are not rejected for tiny differences; include and exclude in the table always win.
The spline is sampled on the knots of SMAPpy's spline grid, a pixel apart, each pixel sampled as in learning, at its centre, with z steps of spline z step (auto: the stacks' step) through ± spline z range (auto: the stacks' range). One channel: clipped at zero and scaled so that the brightest plane sums to 1. Two channels: both sampled on one z grid and scaled together, so that each channel's share of the light is the learnt one. The pixels are not integrated again: the model's blur already holds them, and integrating once more widened the spline's PSF, which pulled Spline 3D's z in by 1 % and bent it by up to 7 nm against the model's own localisation of the same beads.
In Model vs data the beads' images come from the learning itself: the used beads' fitted positions, photons and backgrounds, and the other beads localised on the final pupil. Each slice goes to the emitter's height in it (stage drift and z scale included) by linear interpolation onto the slices learnt from; x and y are shifted by the bead's mean position over its slices, in each channel where the transform puts it. Planes outside a bead's own slices are left blank, and only the planes every used bead reaches are shown. The XY planes shown are 100 nm apart, or 150 nm when 100 nm would need more than nine. Each image is scaled to its own peak, the residual symmetric about zero.
The covered range is the highest of the used beads' lowest emitter z and the lowest of their highest, from the fitted geometry; the spline's auto range is the nearer of its two ends about focus. A slice of the fit quality is left out when the nominal z plus the bead's offset (the median of fitted − nominal over its central slices) lies beyond the spline.
The progress bar's fraction during learning is how far the fall of the objective per iteration has come from the first iteration's to the solver's tolerance (10⁻³), on a log scale: a fit's gain falls roughly geometrically, and how many iterations it will need is not known in advance. The low orders are its first 45 %, all orders the next 45 %, the fit quality and the model views the rest. The time left is the time so far scaled by what is left.
The fit quality fits every bead, used or not, so a rejected bead's curve shows why. The fit box is the bead box less two pixels a side; the camera's read noise is added to the data as the learning's likelihood does; each slice is started from five heights and the best likelihood kept, so an ambiguous PSF shows as jumps. The centred error removes each bead's own offset (its height on the coverslip is not known), leaving the curve's distortion. For dual colour each slice of a pair is one global fit: x, y and z shared, the secondary channel placed where the learnt transform puts it and the photons free in each channel, so a wrong transform or channels whose z disagree show as they would in the data; one z per pair, and the photon ratio beside it.
The simplest 3D for an astigmatic microscope needs no PSF model: fit every spot with an elliptical Gaussian, which measures its width in x and in y, and read z off how those widths change with z. This method measures that change on the same bead z-stacks (Huang et al. 2008, doi:10.1126/science.1153529).
1. The beads are found as the bead average finds them (beads), the too-dim ones left out as there.
2. Every plane of every bead is fitted with the elliptical Gaussian of Gaussian 2D, in a box of fit box pixels around the bead. The box should be the one the data are fitted in: a Gaussian fitted to a PSF that is not a Gaussian finds widths that depend on the box. The camera's conversion turns the beads into photons, so the widths' errors are those a real fit reports, and its pixel size turns them into nm.
3. The beads are put onto each other. Beads on a coverslip are not all at one height – a tilted coverslip moves them by tens of nanometres across the field – so each bead's z is moved to put its own round spot, where its two widths are equal, at 0. A bead whose widths never cross in the stack is not used. z is the height in the sample: the objective raised by dz leaves the bead dz below focus.
4. One curve per axis is fitted to all the beads' widths, weighted by their errors,
where is the narrowest width,
the focus of that axis and
how far from it the width has grown by
.
and
are the two terms Huang added for what a real objective does beyond a perfect beam; with higher orders off they are 0. A bead that touched another, or a plane whose fit failed, is not allowed to pull the curve: the fit's loss grows only linearly beyond three errors. z is then moved once more, so that 0 is where the curves cross, and the range of the beads is the range the curves are trusted over.
It takes seconds and needs no PyTorch. Its file, <name>_astigz.h5 beside the stacks, is handed to Astigmatic z – the step of Gaussian 2D's after the fit – and never to a fitter's model: it is not listed for the fitters' auto. Its pages are Widths in z – every bead's widths over the curves, the selected beads ringed – and z from the widths: each bead plane's widths turned back into z by Astigmatic z's own method, against the z it was taken at, and the error it reports there. A good calibration scatters a few nanometres about zero near focus and more towards the ends, with no trend; a trend means the curves miss the beads, and the table's residual (nm) says which bead misses most.
In the 4Pi mode the window makes the model Spline 4Pi reads, from 4Pi bead scans. A 4Pi microscope sees each molecule through two objectives, in four phase images.
1. The scan comes in as the fitter's data do, through the channel layer: a Hamamatsu DCIMG z stack with the four images on one chip, or MATLAB quadrant files. channels says where the images are: the quadrant files' own layout, the microscope's from the microscope database, typed corners, or the 4Pi-SMS design. A scan may have phase steps of the deformable mirrors at every slice (mirror steps), or one phase per slice, as a scan that only moves the stage has.
2. The beads are found on the first channel's image, summed over the whole scan, where the interference averages out: every peak above peak threshold of the brightest one, both of any two closer than isolation. A bead brighter or dimmer than the median one by more than outlier factor is marked excluded in the table, where it can be let in again. The channels are registered from the same images (an affine map from a few beads, a projective one from eight or more), and every channel's box (box) is cut where the registration puts the bead.
3. The model, by the method:
background taken off, and its brightness scaled to the beads' mean.
brightness at their centre: the stage moves the phase along the scan, each bead sits at its own phase, and the mirror steps add theirs.
then gives each channel's own I, A and B. That needs the phases spread round the circle. Mirror steps always spread them; without steps it takes beads at different phases. Where they are not spread enough, the four channels are taken to share one PSF, differing only in brightness and phase offset, and solved together.
their noise, and a noisy model claims precisions it does not have.
The model is saved with the channel layout its maps belong to, as <name>_4pi.h5 beside the scans.
Which to use. On the 4Pi-SMS example's five beads (a scan without steps, their phases too close for a model per channel), both models fit the example's Nup96 movie. The bead average fits its pixels better (a likelihood per pixel of −0.66 against −0.75). But its precisions are too small: its envelope's z scattered 2.5 times its error, the pupil model's 1.1 times. The pupil model's errors can be taken at their word; the bead average is a check of it that assumes no optics, and the better choice the more beads, and the more phases, the scan has.
The pages are Model – each channel's I, A, B or modulation |A, B| / I through focus, the channels on one colour scale, and the modulation at the centre – and z against the stage: every bead fitted back with the saved model, the envelope's z and z from the phase, each less the stage. A good model gives a flat line for the envelope's z, a few tens of nanometres wide, in the model's z range. It should give a flat line for the phase's z too. If the phase's z runs at a slope, the model's fringe period is not the beads': for the pupil model, the emission wavelength under microscope is likely off. On the 4Pi-SMS example data, 680 nm made z from the phase run 7 % steep. The bead average fits back to its own beads almost perfectly, so this page says little about it.
The fringe period is checked. After the pupil model is learnt, the window measures the fringe period the beads show on their own, with no optics: the same fit of each bead's brightness through the scan the bead average starts from, on the eight brightest. If the model's period differs from it by more than 8 %, a line under the detection says so, with both periods and the emission. A smaller difference is not a sign of the wrong optics: with its own optics uiPSF's example learnt 264 nm against its beads' 251 nm. A pupil model cannot learn the period away: the period follows from the emission and the immersion index under microscope, so with the wrong ones the model lowers its coherence to make up for it, and its modulation comes out low in every channel. uiPSF's 4Pi example learnt with the 4Pi-SMS example's microscope (660 nm, 100 nm pixels, against 600 nm and 129 nm) gave 279.5 nm against its beads' 251 nm, and a coherence of 0.2; with its own, a coherence of 0.77–0.83. The bead average needs no check: its period is the beads'.
Beads are not single molecules. A bead's dye sits in polystyrene up to its diameter above the glass, the bead's size blurs the PSF along z, and the light a molecule right at the glass sends beyond the critical angle – the supercritical-angle fluorescence (SAF), part of a high-NA objective's image – is a bead's only in part. Molecules stuck to the coverslip have none of this: they are what a single-molecule fit sees. With the sample molecules on the coverslip in a z stack, the pupil model is learnt from them: dye molecules (AF647 on M5, for instance) on a clean coverslip in blinking buffer, imaged while the stage sweeps through focus again and again – 41 frames at 50 nm over ±1 µm, 10 to 15 sweeps per file, one frame per step. A molecule blinks on for a frame or a few, so each detection is its own emitter, as in situ; but its height is known, as a bead's: it is on the glass, and the stage says where the focus was.
Reading. The stage's z of every frame comes from the files themselves: Micro-Manager's ZPositionUm (NDTiff, MMStack) or an OME-TIFF's PositionZ. The frames are cut into sweeps where z turns back or jumps, so sweeps upwards, downwards or both in turn are each a sweep. A file without a recorded z needs z step and frames per sweep.
What a molecule should look like. Every frame is searched with a difference of Gaussians and each spot fitted with an elliptical Gaussian. Each file's focus is where the spots are round (σx = σy, behind a cylindrical lens) or smallest (without one), and the median widths of the brighter half of each z step, against the distance from that focus, are the width curve: the spot each frame should show.
Finding them. Each frame is filtered with the spot of its own defocus – an elliptical Gaussian of the curve's widths, its mean subtracted so that a flat background cancels – and a peak above significance robust standard deviations of the filtered frame is a candidate. A spot 1 µm out of focus, dim at its peak, is found at its own size. Only molecules inside the illuminated circle count (illumination radius): the illumination is a circle a little larger than the image's inscribed circle, and the corners are dark and full of false detections.
Choosing them, stringently, since free and loosely bound dye images too: the spot's Gaussian centred in its region (within 1.5 pixels, or the curve's width where that is wider), its widths within 30 % of the curve's on both axes (shape; twice that beyond 400 nm of defocus), no neighbour within reach with a fifth of its light (weaker ones are masked), its photons in one window for every z, set by the spots within 300 nm of focus: from half their median (a quarter beyond 400 nm, where the Gaussian counts a defocused spot's photons short) up to their bulk, since the brightest are overlaps. Then at most molecules are drawn evenly over 100 nm bins of defocus, so that the far defocus, where fewer are found, keeps its share.
Out of focus a spot is broader and its Gaussian less sure of its centre and widths, so those limits widen with it; and the molecules on the glass are one population at every z, so the brightness window is the in-focus spots'. A window per defocus bin, as before, took its median from what that bin held, and far out of focus that was mostly overlaps and the brightest blinks, several times the in-focus median. On M2's sweeps of November 2026 the defaults (with significance 3.5) found twice as many molecules beyond ±600 nm, and the model learnt from them described those molecules better. The table counts them by state and rule; the Stacks page rings each on its frame.
The geometry. A molecule found in frame k of sweep s, at (u, v) on the field, is at defocus
with z_k the stage's z, f_s a focus per sweep (the stage drifts between sweeps, about ten seconds apart) and (a, b) the focal plane's slope – the coverslip's tilt, shared by all sweeps. All molecules sit at one height h above the glass, their z in the sample: the dye's linker and whatever holds it. It is held at 5 nm by default; auto under more (height) learns it from 0. It is the sample's, never the microscope's, and it is the only thing the supercritical (SAF) light sees: that light decays as above the glass, κ its decay rate, so the height is told by how bright the outermost ring of the pupil is. The focus, the plane's slope and a molecule's own offset only defocus it. The phase a molecule at h carries is the same for all of them, so the pupil and the foci take it up rather than the height.
The model saved is the objective's: the learnt pupil with that phase taken out, kept as its Zernikes and h. A fit then draws each molecule with the whole physics of its own z – its SAF and its phase – and needs only one height per molecule. Learnt, the height is told by the ring's brightness alone, which the pupil's magnitude can trade with: if it runs off, hold it.
Learning, in rounds. The pupil, the foci, the plane and the height are learnt as from beads – the low orders first, molecules judged by how well they fit, then every mode. Then each molecule is localised again on the learnt model with its z free, the z check: how far it lands from where the plane puts it, against the precision the model promises (the CRLB). A molecule more than three CRLBs and 100 nm off is not on the glass, or not one molecule, and the next round learns without it, from the last model. The rounds stop when the pupil no longer moves by more than its noise, or after three.
What it gives. A spline as the pupil model's from beads – the PSF of a molecule at the learnt height against defocus, z = 0 in focus – for Spline 3D on auto, with its model inside the same file, which Spline 3D's focus model reads for data deeper in the sample. The pages: Selection (the molecules by defocus and state), z check (the bend – the median offset per 100 nm of defocus – and the scatter, in CRLBs), Foci and plane, the pupil's pages as for beads (CRLB among them, the spline drawn at the molecules' height), and Model vs data per defocus bin. On M5's AF647 (November 2026) the bend was about 5 nm rms over ±600 nm and the scatter 1.75 CRLB; the bins at +900 and +1000 nm break away, which the spline's range on auto leaves out (it reaches to the 2nd and 98th percentiles of the molecules' defocus).
Dual colour. On a chip split into two channels, each gets its own width curve and detection, and the molecules are paired through the map between the channels: a dual bead calibration or a registration file (registration), or, left empty, measured from the molecules themselves, as a movie's registration is – the chip cut into its channels as channels says (the microscope's entry, the arms' sides or regions in the Microscope manager, or a layout chosen by hand), each spot in the channel it lies in. A molecule seen in one channel only keeps the region the map puts in the other. One focus per sweep is shared by both channels; each channel learns its own pupil, and the map is refined. It saves as a dual bead calibration does, for Spline 3D 2C.
The elliptical Gaussian, with this sample, fits each chosen molecule in the fit box with the elliptical Gaussian the data will be fitted with, its z the stage's from its file's focus, and fits the curves to all of them, for Astigmatic z.
Time. About 13 minutes for 4000 molecules over three rounds on a laptop's GPU (the first round most of it); Detect molecules says how long, from a timed pass of the model. The memory a chunk of molecules takes is set from what the computer has free: about 120 MB per molecule of a 25-pixel region.
A PSF measured with beads on the coverslip is not quite the PSF of molecules in a cell: the light from deep in the sample crosses the index mismatch between the sample and the immersion oil, which adds spherical aberration that grows with depth, and the sample itself may add more. In situ learning fits the pupil model to the molecules of the measurement instead (uiPSF's in situ learning, Liu et al. 2024). A molecule's height in the sample is not known, unlike a bead's in a z-stack: it is learnt with the pupil, molecule by molecule, and the focus – how far above the coverslip the objective put its focal plane – with them.
Finding the molecules. The movies are read in blocks of 200 frames, coarse to fine over the whole of each – first ten blocks spread from its start to its end, then the blocks between them – until molecules spots pass the selection below, or the movies are read. How many frames that takes depends on how dense the molecules are and how large the field, which is why it is a number of molecules that is set and not of frames. Reading stops with some z bins still short once another holds twenty times its share: those heights are rare in the data (below the coverslip there is nothing), and reading on would not fill them. In each block the background is a sliding median over time. Spots are looked for at three sizes and kept when they hold significantly more photons than the background around them, never by comparison with the brightest spot of the frame: a molecule far from focus is dim per pixel but has as many photons, and it is these that tell most about the PSF. Each spot is fitted with an elliptical Gaussian; a molecule's frames are linked into one blink. A molecule with another closer than three widths of each is rejected with all its frames; a farther neighbour's pixels are masked, unless it has less than a fifth of the molecule's photons.
Choosing them. The molecules are sorted by an estimate of their height – an astigmatic spot's elongation (z proxy) – into 21 z bins, and each bin's share of molecules is drawn at random from a window of brightness below its brightest: the very brightest are where two unresolved molecules collect. A bin with fewer than its share gives all it has, and the others make up the number. A tenth of the molecules is held out of learning. The z bins page shows what was chosen.
Learning, in rounds. The first round learns from the Gaussian's choice, started from start from or the astigmatism typed in – the start sets the sign of astigmatism and spherical aberration, which the data alone can barely tell. Each further round localises every molecule found on the model, chooses again by the model's height, photons and fit, and learns again from the last model, until nothing moves beyond its noise or after rounds.
What is held. Molecules tell less about the pupil than beads do, and two parts of it are better taken from the microscope than learnt from them. The pupil's magnitude – how much light the objective passes at each angle – is the objective's own: on M2 its rotationally symmetric part was the same over eight bead calibrations of different days, cameras and colours, and it is what keeps a bead's z straight through focus. Learnt from molecules, it trades with the focus, so that two starts end a hundred nanometres apart. And the finest aberrations, above the Zernike order, gain little over a bead model's. So with hold on the start's, in situ takes the magnitude and the phase above the order from start from, or else from the objective's pupil kept with the microscope (Add to microscope...), and learns the rest: the phase up to the order, the blur, the focus. From a minimal bead model the magnitude is its γ; from a Zernike one, its rotationally symmetric modes (the others are never learnt in situ: there they took over the astigmatism from the phase). The beads' SAF damping is never taken over: it is the beads'.
γ belongs to the microscope. γ is how the objective passes light at steep angles: a property of the objective – perhaps a little of the colour – and of nothing else, not of the sample or the 3D lens. So without start from in situ takes it from the microscope's entry: a gamma typed there (one value, or one per emission filter), or else the γ of a minimal pupil kept with the microscope (Add to microscope...), under any state of the 3D lens, the one nearest in colour, with the NA it learnt if learn NA was on. Only when the microscope has none is a nominal γ (0.36, from M5's beads) held, and the window warns: it matters. On M2's January clathrin movie the beads' γ, 0.08, gave in situ the beads' astigmatism, and 0.36 gave a quarter of a radian more (and fitted the molecules a little better); on another M2 movie 0.36 cost 2 nats per molecule. With hold on nothing, γ is learnt from the molecules, and the focus is then pinned (focus fit), since the two cannot both be learnt.
One model, handed on. Every method builds its model from the same choices, the PSF model section (Zernike order, pupil magnitude, and under more blur, blur σ and SAF damping), and a learnt model hands itself on in one form: its kind, its phase in nanometres of wavefront, γ or the magnitude's Zernikes, and its blur. That is what Add to microscope... keeps, what in situ holds and starts from, and what Spline 3D's focus in situ holds of the bead model. A pupil kept before November 2026, in the older form, is not used: keep it again from a new bead model.
The coverslip. The focus and all the heights can move together, changing the images only a little; the fit alone places the focus to some tens of nanometres. With on the coverslip, the lowest molecules are taken to lie on the coverslip: the lower edge of the localised heights must be at 0, and where it is found moves the focus in the next round. With molecules on the coverslip this pins the focus to a few nanometres. On auto the focus is found this way before the first round.
The sign. After the last round the mirror image of the learnt pupil – astigmatism and spherical aberration of the other sign, the molecules mirrored about the focus – is fitted too. If the data clearly prefer it, the status bar warns: the start's sign may have been wrong.
The files or folders of bead z-stacks, all learnt from together; for in situ the section is movies, the measurements' movies. Several at once – the folders of a few z-stacks, say – with Add... on a Mac, with Select several folders... (Cmd- or Ctrl-click), or by dropping files or folders from the Finder or Explorer on the window. A folder gives every acquisition in it, as the batch finds them (a Micro-Manager series once, an NDTiff folder as one). A blinking movie added for a bead method, or a bead z-stack for in situ, is said at once – told apart by what Micro-Manager wrote, z slices or time points, else by length – with the method that reads it offered, or the file removed.
Adds stacks. On a Mac the system's open panel takes files and folders together, several at once (Cmd- or Shift-click), so the folders of a few z-stacks are added in one go. On Windows and Linux it takes files only; add folders with the arrow beside it, or drop them on the window.
In the arrow beside Add...: adds folders, several at once (Cmd- or Ctrl-click); with search subdirectories ticked, every acquisition inside them.
Removes the selected entries. Delete (or Backspace) on the list does the same and selects the next entry, so pressing it again and again empties the list from there.
Empties the list.
Whether a folder added – by Add..., Select several folders... or a drop – is searched in its subfolders too.
What the files show: beads in a z stack, molecules on the coverslip in a z stack, or blinking molecules in the sample (in situ). It decides which methods method offers. Switching keeps the files and settings and clears the result.
What the sample offers: for beads the pupil model (uiPSF), the default, which models the PSF rather than averaging the beads' noise, the bead average and the elliptical Gaussian; for molecules on the coverslip the pupil model and the elliptical Gaussian; in situ, the pupil model (in situ). The window shows only what the method reads.
Single channel; Dual colour for a camera split into two halves, a PSF per half and the transformation between them; or 4Pi, four phase images of a 4Pi microscope (4Pi). The pupil model learns a pupil per channel, with the photon share and the focus offset. Only the modes the method has are offered: in situ and the elliptical Gaussian are single-channel; the molecules on the coverslip single channel and dual colour.
Pupil model only, under model. A previous model of this microscope: its calibration, which carries the model, or for an older one its .uipsf.h5 file. It starts the learning and is drawn beside the new Zernikes, so a change in the microscope shows. Empty, the learning starts from the beads alone.
On: the calibration (for the pupil model with the model inside it) is saved beside the stacks, named as the bead calibration names it and never over another file, and handed to the fitter. Off: the figures only; Save as... still saves.
The microscope control, folded, titled with the microscope found for the first stack (M2 · 3DA on · iXon 1 · 127 × 116 nm), orange when something the method needs is missing. Open: the microscope, recognised or chosen by hand for stacks no entry recognises (for this window's runs, not the entry), the camera, and only the values the method uses – the camera and the pixel for the bead average, the optics too for a model. Each value comes from the microscope database for the microscope that took the first stack (recognised from its metadata, else the last one used) and the state its devices were in, and from the camera database for its camera; the field shows it in grey, with where it comes from in its label's tooltip. The values are locked: the lock opens them, a value typed over the found one wins and is marked, and ↺ gives it back. Also the Microscope manager. There is no default for the NA and the wavelength: a microscope the database does not know needs them typed, because a wrong value cannot be noticed in the result, only in a model that does not fit. The calibration keeps the microscope's state – which filter, the 3D lens in or out – and a fit warns when its data were taken otherwise.
The objective's numerical aperture, as engraved on it.
The beads' emission wavelength, the centre of the filter's band. On auto read from the name of the filter the microscope was set to (676/37: 676 nm); with a filter whose name is not a band (a long-pass) it has to be typed.
For dual colour, the secondary channel's; auto: the microscope's arm on the other half of the chip. An arm whose filter gives no wavelength (an empty slider, the band set by the splitting dichroic) has to be typed; a microscope with no second arm takes the same as emission.
The immersion oil's refractive index; auto: the microscope's, else 1.518 (the standard oils of Olympus, Leica and Zeiss).
At the head of model, not under microscope: it is the sample's, and it often needs changing. The refractive index of the medium the emitters sit in – the beads' or the molecules' – which decides how much light beyond the critical angle reaches the objective (supercritical-angle fluorescence, SAF) and the spherical aberration that grows with depth when it differs from the immersion's:
On auto each mode keeps its own assumption: water for one objective, and for 4Pi the immersion's, the buffer taken as index-matched; the box says which. The index is saved with the calibration, and a fitter that draws the PSF for another one says so. Choose what the calibration's emitters sat in: beads in water are water, even when the cells will be in buffer – the fitter's own sample index draws the PSF for the sample. Learning the index (learn sample index) is no substitute: in situ, learnt freely, it ran to 1.41.
In grey, the index the choice stands for; typing over it makes the choice typed, and ↺ gives it back. learn sample index starts from it.
The coverslip's refractive index. Leave it on auto with an oil objective; with a water or silicone objective it is the glass's, about 1.52 for #1.5 coverslips.
Shown only when the coverslip's index differs from the immersion's. The coverslip actually used, if it is known to be off the objective's design thickness; #1.5 coverslips are 170 ± 5 µm. A collar set to it does the same in the microscope.
The choices of the model, explained under In detail. The method's own fields (bead diameter, drift, field dependence, the coverslip's tilt, the rejection) sit beside the PSF model section; in situ shows only the tilt of them.
The PSF model's choices, one section wherever a model is learnt – beads in one or two channels, in situ, 4Pi – so that the same choices build the same model in each, the 4Pi mode too: minimal, one γ for both objectives (same magnitude), a round blur over the pixel's own. On uiPSF's 4Pi beads the minimal pupil fitted as well as the rotationally symmetric Zernikes, with fewer numbers, once the NA under microscope was the objective's effective one: 1.32 for its nominal 1.35. At the nominal NA it fitted 1 % worse (9 700 nats) and bent the envelope's z by up to 9 nm, against 5 nm: learn the NA once (learn NA) and type what it finds.
The highest radial order of the pupil's modes. Higher orders describe finer aberrations and cost more time and more beads.
minimal (cos θ^γ, the ring beyond the critical angle and the aperture), Zernike, symmetric Zernike or fixed (the apodisation only); In detail says what each is. Not shown for in situ, which decides it by its hold. With two channels each learns its own γ: two colours pass the objective's edge differently. Should the two come out alike on real pairs, one shared γ would be fewer numbers to learn; that is to be revisited.
Under more. Whether the blur beyond the pixel's is learnt or held at blur σ; the output page reports what it came to. free learns it along x and y apart, round one value for both: the default everywhere, in situ too, since a free blur takes up astigmatism the pupil should hold. free stays as an option. In situ was measured on both (November 2026): on two M2 movies and Zenodo's tubulin a round blur found the same astigmatism as a free one, within 0.05 rad from either start (on M2 as close to the beads'), and fitted the held-out molecules as well; on simulated molecules whose blur is 50 × 65 nm a round one cost 0.01 rad of astigmatism. The 0.2 rad once seen with a round blur came from regions of 15 pixels, since replaced by 25. Do not take the beads' blur over: on M2 the molecules wanted about 50 nm, the beads 67 nm.
Under more. The blur beyond the pixel's own: its start, or its value when held, so 0 holds the image at the pixel's blur. A large learnt value is worth a look: on M2 it is about 67 nm, which the pupil alone cannot replace (with the blur held at 0 the in-focus core comes out 15 % too sharp).
On by default, for minimal only. The supercritical-angle ring – the light beyond the critical angle, present when the sample's index is below the NA – is damped by exp(−2πκh) with h learnt: the beads sit on the coverslip, yet their ring is weaker than a point's there (their dye is spread over the bead, and the bead model takes them as points). Off, the ring is a point's on the coverslip. The damping belongs to the beads, as their size does: the spline for single molecules is drawn without it, their supercritical light following the physics of their own depth, and in situ never learns it. Shown only for the minimal magnitude over a sample whose index is below the NA.
Off by default, for minimal only, in every method: the aperture then cuts at the NA under microscope. On, the NA is learnt – an effective NA, started at the typed one and kept between 0.8 of it and 5 % above it – and saved with the model; an in situ model that holds the beads' γ holds their learnt NA with it. On uiPSF's 4Pi beads the typed 1.35 fitted 9 700 nats worse than a learnt 1.31, and bent the envelope's z twice as much. So, for a new objective, learn the NA once with this tick and then type the learnt value under microscope. It is not a fixed ratio of the nominal NA: on M5's beads it ran to the edge of the sampled pupil, 1.51 behind a typed 1.50. Why the aperture comes out smaller is not understood; the sample's index does not explain it.
Off by default: the sample's index is sample index at the head of model. On, it is learnt from that value, one index for every channel and for both objectives of a 4Pi, and saved with the model – a diagnostic, for when the buffer's index is not known. The index decides where the critical angle lies, how much light the Fresnel transmission lets through at each angle, and the depth's wave in situ; with SAF damping the supercritical ring follows it. Whether there is a ring at all is decided by the typed index: learning from an index above the NA adds none. On simulated beads it comes back to 0.001; in situ the pupil's spherical modes, the blur and the focus take most of a wrong index up, so there it says little.
linear per stack by default, two numbers per stack; free per slice two per slice, kept small (5 nm) where the data say nothing; none for stacks without drift. Offered for beads, not in situ.
The beads' size, so that it is taken out of the model: a 100 nm bead is not a point. 0 for beads much smaller than the resolution. It is 0 by default – the beads in use are 40 or 100 nm, and neither would be right for the other – but 0 is rarely right, so with beads its label is red while it is 0, and a run says so in the warning line under the buttons.
Learns the coverslip's tilt beside the pupil (In detail): always offered in situ, and for beads only when the coverslip's index differs from the immersion's. Tick it when the coma of the result differs between samples mounted on different days, or in situ when molecules lie well above the coverslip. Off, the tilt is 0.
Learns astigmatism and coma that change over the field of view, beside the pupil at the field's centre: each a smooth polynomial of where the bead is on the chip, astigmatism up to the square of the distance, coma in proportion to it, as nodal aberration theory says an objective's aberrations vary. The spline is then one per point of a grid over the beads' span, as fine as the learnt field needs (one spline when it is flat), and Spline 3D fits each spot with the splines around it blended. Offered for beads of one channel. Tick it for a field of view of more than about 50 µm, or when beads at the edges fit worse than in the middle. After the run the summary says whether the field is real – a test of its coefficients against none, in nats beside its threshold – and the largest change of each mode across the beads; when it is not significant, calibrate without it. The grid has at most 9 × 9 splines; when the field changes faster than that follows (the blend more than 0.5 % of the PSF's peak from the model between the nodes) the summary says so: spots far from the centre may then be fitted slightly less well. Over a 177 µm field that still cost nothing measurable. On M5's fields of about 25 µm the astigmatism changed by 0.09 rad from the centre to the edge, and a spline for the whole field put spots there 4–13 nm off in z (the study).
Learning takes every n-th slice, n the largest whole number whose step stays within this: stacks at 20 nm learn from every 2nd slice at 50 nm (40 nm apart), every 3rd at 60 nm. The slice at the stack's middle, its focus, is always kept. On dim beads at 10 nm, learning at 50 nm lost phase precision only as the fewer photons say (0.0047 rad against 0.0077), in a sixth of the time; the memory a run takes falls with the slices too. Lower it for stacks whose PSF changes fast in z (an engineered PSF); the spline is still sampled at spline z step.
±1.5 µm by default: the slices within that of the focus are learnt from, and a shorter stack is used whole; on auto the whole stack always. On a ±2 µm stack the far slices are mostly background. The model is drawn over the range it learnt; spline z range on auto then stays within it. A narrower range also needs a smaller pupil grid, so the run takes less memory and time.
How beads are found, and for the bead average how they are aligned and averaged: the bead average's settings, which its page explains. The pupil model reads only the finding; bead box is also the size of the boxes it learns from and of its spline.
The elliptical Gaussian method's own settings (Elliptical Gaussian).
The 4Pi mode's own settings (4Pi).
Where the channels lie on the chip, as the fitters' channels part says it – in dual colour for beads and molecules alike, and in the 4Pi mode, whose part is Spline 4Pi's own. On the microscope's it is one line, the microscope's entry as the Microscope manager keeps it: the arms' sides or regions for dual colour, each channel's region and mirror for 4Pi (the shipped 4Pi-SMS example is one). main channel is shown in dual colour on the microscope's layout too: the entry's (its transmitted arm), or the other half for a calibration with the dyes the other way round. Choose the layout by hand for a microscope without an entry; only then is the split position shown. On auto, 4Pi takes the layout quadrant files give themselves, else the microscope's.
On the chip, as SMAP's 4Pi settings give them (x4pi).
As set on the deformable mirrors. Which way round they act is found from the data.
Large enough for a defocused bead, small enough that beads near the edge of a channel are kept: 21 pixels for 100-130 nm pixels.
0.2 finds beads down to a fifth of the brightest's peak. Lower it when dim beads are missed; raise it when specks of background are taken for beads.
0 takes the box: no other bead within a bead's box, whose light the model would take for its own.
2.5 marks out a bead more than 2.5 times brighter or dimmer than the median one – two beads stuck together, or a speck. The marked beads stay in the table, and Exclude / include lets them in again.
Shown for a Zernike pupil magnitude only: the minimal one has no modes. auto takes the modes the PSF model's pupil magnitude says: on symmetric Zernike the rotationally symmetric modes up to the Zernike order – Noll 4, 11 and 22 up to the 6th – for the vectorial model, and every mode for the scalar one. Fewer, 4 and 11 say, ask for a smoother apodisation; an empty field or none holds the magnitude flat. On eight of uiPSF's example beads, 4 and 11 alone fitted 1 % worse than auto, and a flat magnitude 11 % worse: the apodisation matters.
On by default: both objectives get one magnitude shape, as twin objectives have – with a minimal magnitude, one γ; how much light each arm brings is learnt apart either way. On uiPSF's 18 example beads a γ per objective came out 0.400 and 0.405 and fitted no better. On eight of uiPSF's example beads the two objectives, left free, learnt nearly the same magnitude, and one shared magnitude fitted as well (0.01 % apart) in two thirds of the time.
On by default: the modulation then falls off from the centre of the spot as the data's does. On uiPSF's bead scans it fitted 4 % better than the scalar model, uiPSF v1's, and took no longer; on its movie it localised z a little better. Its pupils' magnitude is rotationally symmetric, as an objective's apodisation is: free in every direction it let the learning end in one of several answers by where it started. Keep it on. Off is uiPSF v1's scalar model, for a comparison with v1's models; it keeps the full magnitude, which it needs, and fits v1's beads less well.
On by default: on uiPSF's bead scans it lowered the deviance from 1.16 to 1.06, the largest single term found.
The box each bead plane is fitted in, in pixels. Use the fit box of the fit the data get (13 by default): a defocused spot is cut by the box, and a width measured in another box does not describe the data's.
Fits Huang's and
as well. Off, each axis is the plain defocus curve: better when the stacks are short or the beads few, since five numbers per axis then follow the noise. On, the curves follow a real objective's widths far from focus.
The width every fit starts from; leave it unless fits fail on very wide or very narrow spots.
In situ learning's own settings, and how many molecules to learn from; the few settings of how they are found that depend on the data are under more.
How far above the coverslip the objective put its focal plane, as it was moved from the coverslip's focus. A rough value is enough: the rounds learn it. auto: estimated from the molecules on the coverslip before learning. With focus fit on typed it is the focus, held.
the start's: the symmetric magnitude and the phase above the Zernike order held from start from, or else from the microscope's kept pupil (the default; see What is held), and without either the microscope's γ. every aberration: the whole pupil of start from (or the kept one) held, every mode of phase and magnitude, and only the focus and the blur learnt, with no twin test – the beads' pupil taken as the objective's, for a sample whose depth is the question (Spline 3D's focus in situ runs this). nothing: the symmetric magnitude learnt from the molecules, for a microscope with no pupil kept and no model to start from; the focus is then pinned to the coverslip unless focus fit says typed.
learnt: with the pupil, the lowest molecules' edge as its guide (the default). from the coverslip: set each round where the lowest molecules' edge puts it, not fitted. typed: held at focus. When no coverslip edge is found – the molecules lie too deep, or none touch the coverslip – the status bar says so: type the focus if it is known.
Under more, and rarely typed: on auto the microscope database gives it, for the state the 3D lens was in (the entry's astigmatism_nm, read from bead models of the microscope). It is the start's vertical astigmatism in nm of wavefront, and what it really sets is the sign: the same molecules are explained by the mirror-image pupil with z flipped, and the start decides which of the two is learnt. For a microscope the database does not know, more opens with the field in orange and calibrating asks for it: read it from a bead calibration of the microscope, or give a model under start from, with which the field is not used and not shown.
Tick when the sample touches the coverslip, so that its lowest molecules lie on it: their edge pins the focus. Untick for a sample that floats above it.
At most this many rounds; most stop earlier, when nothing moves any more.
What the spline's z means: the height above the plane in focus (z = 0 where the spot is sharpest, as for beads), or the height above the coverslip, so that Spline 3D reports where the molecule is in the sample.
In situ: each frame of a blink counts as one: it is fitted as one. About 2000 is enough for the Zernikes up to the default order; more costs learning time in proportion. Reading and finding them took about ten seconds per thousand frames of 128 × 128 pixels on a laptop.
The square each molecule is fitted in. On auto it spans 3 µm of the sample: 25 pixels on 116–127 nm pixels, 29 on 110 nm. Smaller regions can bias the pupil: on dSTORM data of clathrin, 15 and 21 px regions learnt an astigmatism a third stronger than the same day's beads, and 25 px the beads' own. A small region does not cut the spot wrongly (the model is cut alike); it hides the faint outer light that tells apart two nearly equal answers – the right astigmatism with a blur stronger along one axis, or more astigmatism with a round blur. A larger region costs little: on that dense movie it masked 1.4 % of the pixels instead of 0.3 %, and rejected no more molecules as overlapping. On a high, uneven background (several hundred photons per pixel) a large region sees more of the unevenness; such data need care. Set it by hand only with a reason: very small pixels (65 nm makes 47 px, which costs memory and time).
How far above the background's noise a spot must be. Lower finds dimmer molecules, and more noise. For molecules on the coverslip it is the peak of the filter matched to the frame's defocus, in robust standard deviations of the filtered frame: 5 on M5's AF647.
Molecules on the coverslip: one height for all of them, held at 5 nm by default – a dye on its linker a few nm above the glass. On auto it is learnt; then it trades with the pupil's apodisation (γ), the two damping the outer pupil alike, so hold it again if the learnt one runs to its bound (200 nm) or is unlikely for the sample. Learnt on M5's AF647 it came to 11 ± 1 nm with γ 0.448. Molecules that are not all at one height, or off the focal plane, make it come out higher.
How each file's focus is found: where σx = σy behind a cylindrical lens (astigmatic), or where the spot is smallest (round). On auto, from how much the spots' elongation changes over the sweep.
On auto the circle inscribed in the image. Set it smaller for an illumination smaller than the image, larger when the whole image is lit.
Only for files that do not record the stage's z for each frame; with frames per sweep, every sweep upwards from the first frame.
With a typed z step: how many frames one sweep has.
Dual colour: the file holding the map between the channels, a dual bead calibration or a registration from a movie. Empty, it is measured from the molecules' own detections, on the channels channels cuts the chip into; the learning refines it either way. Dual-colour beads have a registration too, folded: how they are paired and their map fitted, always from the beads themselves (the bead average's registration).
astigmatism for an astigmatic PSF; size for one without astigmatism, which sorts by distance from focus only.
How the model is sampled into the spline the fitter reads.
The spline's z spacing; auto, the stacks' own.
How far above and below focus the spline reaches; auto, the range every used bead covers (The ends of the stacks).
Detect molecules for in situ: finds the molecules, rings them on their frames and counts them by state in the table; the Stacks page then steps through the frames molecules were found on, and before it shows a movie's first frame only. For beads: finds the beads, lists them in the table, rings them on the Stacks page and says how many there are, how long calibrating them will take and how much memory it will hold at most, of how much is free (How it works). A new detection drops an earlier calibration from the window; its files stay. Changing the files, the mode, the method or a setting under beads drops the detection.
Makes the calibration from the detected beads, detecting them first if they are not, with the settings as they are and the beads marked in the table; with save model, saves it. After a calibration it is pressed again for anything: a setting under beads detects the beads anew (and the marks, which named the old ones, go); any other setting is used with the same beads. When nothing but the marks changed, the pupil model starts from the last fit, which is quicker, and both methods save over that run's files; otherwise a new calibration saves to a new file. The fit quality and the model against the data follow at once. The bar under the buttons shows the fraction done and the time left; the status line counts the iterations.
Pupil model: stops the learning within a few seconds – before the next bead's share of the iteration it is in, not at the iteration's end, which on many beads can be minutes away. Nothing is saved, and the beads are neither scored nor drawn against the model.
Shown with the pupil model while PyTorch is missing or too old, or built for the CPU only beside an NVIDIA card: installs it into the Python running SMAPpy, with pip's progress in the status line; pressed again, it stops. The pupil model can be used as soon as it is done – after replacing a CPU build once SMAPpy is started again, if a calibration had already loaded the old one.
Saves the calibration under another name, or one made with save model off.
Shows a saved calibration again, as it was shown when it was made: its pages – Model vs data, Fit quality, CRLB and, for the pupil model, the pupil, the Zernikes, the residual atlas and the bead map – and its bead table, all from the file; its sample, method, mode and settings set in the window. Its bead stacks go back into the file list where they are found: where they were, or at the same place beside the calibration when the folder was moved whole. Where they are not, it asks for the folder they are in now and finds them there, in its subfolders too, by name and size; Cancel shows the calibration from its file alone, with no stacks. Some found and some not, none are added: Calibrate would make another calibration from a part of them. With the stacks, Calibrate makes the calibration again (marks start afresh after its detection); Browse stacks... shows the average. For the pupil model and the bead average, and files saved from November 2026 on (Saving); an older file, or another method's, says that only its spline can be used.
Under the table. The beads, slice by slice in any direction (XY, XZ, YZ), in their own window, with the model and the residual, data − model, beside them as ticked (model, residual), each on its own contrast. With average the average of the used beads; without, a second slider steps through the beads one at a time, each moved onto the model as the average is.
Pupil model, after a calibration, with at least 8 used beads. Asks how many splits (3 by default, 2 to 10) and says about how long one takes, then splits the used beads at random into two halves that many times and learns each half on its own, from the same start as the run – its start from model, or none – through the same stages, never from the finished fit. A split's two halves are two calibrations from different beads; how far they disagree is the uncertainty: each half has twice the full fit's variance, so ((A − B) / 2)² estimates the full fit's, and the root of its mean over the splits is shown. Inside a half nothing is rejected or held out, so every half measures the same beads. A split costs about one calibration (two fits of half the beads); 3 splits give the error bar to about ±40 %, 5 to about ±30 %, and more add little when the beads are few, since the splits then overlap. Stop stops it. The result goes into the Pupil and Zernikes pages and the Zernike table, and, when the calibration was saved, into the model the calibration carries.
Against the CRLB it shows what the CRLB leaves out: beads that differ from one another, and a learning that does not end in one place from one start. It cannot show an error every half shares – a wrong NA, index or wavelength.
Puts the saved calibration into the fitter again (it is put there when it is saved). For dual colour, the Spline 3D 2C fitter; for the elliptical Gaussian, Use in Astigmatic z: Gaussian 2D gets elliptical ticked and, in its after the fit, astigmatic z on with this file, calibration set to from a file. Every saved calibration is also listed, with the microscope and the device states of its beads, so that a fitter left on auto finds it for data taken the same way, without this button (Spline 3D).
After a pupil model or an in situ run: keeps the learnt pupil – every Zernike of phase, in nm of wavefront, and of magnitude, with the blur – in the microscope's entry, for the state its 3D lens was in, its colour and its camera, in your microscopes.json. It describes the objective, so it holds for that camera's files of every day, older ones too. In situ learning starts from it when there is no start from, its vertical astigmatism standing in for the entry's astigmatism; Spline 3D fits with it where there is no bead calibration, and Simulate draws with it (calibration's menu). Asks first, saying what it replaces. Only for beads taken on a recognised microscope in its current setup.
Marks the selected beads for the next Calibrate: a bead to be left out, or, after a calibration, for the pupil model a rejected one to be included. Pressed again, the mark is withdrawn; a choice by hand stays until then. Space does the same.
Stacks is there from the start (How it works); the others appear after a calibration. Both methods have:
The bead average's other pages are the bead calibration's (Overview, Transformation for dual colour, Fit quality, Field diagnostics, Bead diagnostics, CRLB), explained on its page. The pupil model's:
Pupil and Zernikes, Zernike table and Residual atlas describe all beads together (one pupil per channel), so they do not follow the table's selection.
For dual colour, Pupil and Zernikes comes once per channel.
The bead average's table is the bead calibration's. The pupil model's lists each bead with its brightness verdict (as the bead calibration would give it), its state, the reason for a rejection, and its deviance, photon score and offset from the box's centre.
For in situ the table counts the frames and molecules in each state: used, held out, not drawn, and rejected with the reason. Its pages are Pupil and Zernikes, Zernike table, CRLB (the spline at the focus learnt) and Residual atlas as above, and: