  In four-dimensional scanning transmission electron microscopy (4D STEM) a
focused beam is scanned over a specimen and a diffraction pattern is recorded
at each position using a pixelated detector. During the experiment, it must be
ensured that the scan coordinate system of the beam is correctly calibrated
relative to the detector coordinate system. Various simplified and approximate
models are used implicitly and explicitly for understanding and analyzing the
recorded data, requiring translation between the physical reality of the
instrument and the abstractions used in data interpretation. Here, we introduce
a calibration method where interactive live data processing in combination with
a digital twin is used to match a set of models and their parameters with the
action of a real-world instrument.
