Skip to content
PreciSim
physics

Noise model

Image noise, axis read noise, reproducibility — and how noise propagates into calibration accuracy.

Two noise sources. Only two.

Every random quantity in the virtual machine comes from the noise section of the machine file:

"noise": {
  "seed": 20260921,
  "axisPositionMm": 0.0005,   // read noise on the reported axis position (mm, Gaussian sigma)
  "imageSigma": 3.0           // image noise (grey levels, Gaussian sigma)
}
Noise Added to Consequence
Image noise every pixel's grey value, zero-mean Gaussian edge jitter -> centre jitter -> result jitter
Axis read noise the position the controller reports the positions the calibration sees are already wrong

There is also repeatability, added to the true position — see Axes and errors. It is a different thing with different consequences.

What this model does not have

No shot noise, dark current, quantum efficiency, full-well capacity or bad pixels.

The parameters from an industrial camera datasheet are not modelled here, for the same reason as everywhere else: they make the model look more like a datasheet without adding anything to "why did this calibration come out wrong". A zero-mean Gaussian already produces the complete causal chain — edge jitter, centre jitter, result jitter — and that chain is what a calibration course is about.

If you are doing camera selection or image sensor simulation, this model is not enough. Do not base decisions on it.

Reproducibility is a hard requirement

With seed fixed, identical inputs must produce a bit-identical image.

Each row derives its random source from "frame seed + row index" rather than sharing one Random; sharing makes the result depend on thread scheduling, so the same frame can differ between two runs.

This is not fastidiousness. Without it you cannot write an assertion like "centre error < 0.05 px", and the whole regression suite becomes impossible.

How noise reaches the calibration

This is the part that matters.

Circle centre extraction

A centre comes from subpixel edge locations, and noise makes each edge point jitter by sigma_edge. For a circle with N edge points:

sigma_center ~= sigma_edge / sqrt(N)

So bigger circles (more edge points) give steadier centres. That is why the dots on a calibration target should not be too small: a 10 px circle and a 30 px circle differ by roughly 1.7x in centre accuracy.

On demo-xy-galvo the dots are 1.0 mm with a 1.7236 µm/px pixel size, so a dot is about 580 px across — very large, and deliberately so: get the chain working under easy conditions first, then shrink the dots and watch the accuracy fall.

Pixel size

Pixel size is solved from distances between several centres, and least squares averages part of the centre error away:

sigma_scale / scale ~= sigma_center / (D * sqrt(M))

where D is the span covered (px) and M the number of points.

Two practical conclusions:

  1. Span matters more than sample count. Nine points spread far apart beat fifty points crowded together.
  2. Going from 9 to 36 points buys a factor of 2; a 10x larger span buys a factor of 10.

Beginners almost always do the opposite — a dense cluster in the middle of the field, followed by surprise that it is not accurate.

Focus

See the last section of Optics and defocus: noise lifts the sharpness baseline, flattens the peak, and the fitted focus starts to wander.

How to change it

Edit the noise section of the machine description. Two useful experiments:

  • Raise imageSigma (3.0 -> 15) and watch how the spread of each chain's result changes;
  • Change seed and run the same chain ten times to see the repeatability — the closest thing to the real-machine experience, and the only way to answer "how accurate was this run".
Last updated: Sep 22, 2026
Was this page helpful?