API reference#

The twin#

twin.DigitalTwin

A complete simulated instrument.

clock.Clock

Real-time clock, optionally scaled.

clock.ManualClock

Clock that only moves when told to (deterministic tests, offline studies).

processing.Processor

Reference acquisition + correction, keyed like DE-Server's RefFinder.

Shared state#

state.MicroscopeState

Everything the column can report or be told.

state.AcquisitionRequest

What the camera has been asked to produce.

state.ScanRequest

state.HolderState

In-situ holder state.

state.FrameMeta

Metadata published alongside every simulated frame.

state.ExposureMode

DE-Server ExposureMode (Constants/Params.h).

state.RenderMode

Column and corrector#

column.Column

A simulated column.

column.MirrorColumn

A Column that follows a DE-TEM-Channel over SOAP.

column.ColumnAdapter

A de_microscope/autopilot SimColumn-shaped view of a twin Column.

column.SoapTemChannelClient

A small, stdlib-only client for DE-TEM-Channel (or the twin's SOAP face).

column.corrector.Corrector

Probe and/or image corrector of a column.

column.lowdose.LowDose

The column's low-dose state; column.Column owns one and drives it.

column.lowdose.LowDoseArea

column.ColumnRefused

The column understood the request and refused it (the Dummy's false).

column.CorrectorError

A corrector command was refused or failed (getCorrectorError text).

column.MeasurementResult

A tableau / C1A1 measurement, as the corrector reports it (plus confidence).

column.CorrectorUnit

One corrector (one CEOS-RPC server): probe (STEM, port 7072) or image (TEM, 7071).

column.SoapError

A SOAP call failed (transport, fault or unparseable response).

optics.aberrations.Aberrations

A set of aberration coefficients (complex, nm).

Specimen and crystals#

specimen.Specimen

A deterministic virtual specimen: holder + preparation + time evolution.

specimen.SpecimenConfig

What to build: seed, holder, preparation, support film and option overrides.

specimen.from_name

Look up a preset, test pattern or legacy alias by name (case-insensitive).

crystal.library.CrystalLibrary

Reciprocal lattice + kinematic |F|^2 of one phase, computed once.

Detector#

detector.CameraModel

detector.Detector

A camera: sensor maps (dark, gain, defects) plus the per-frame noise pipeline.

detector.camera

Look up a camera model by name, alias or DE-Server enum name (case-insensitive).

Holders#

holder.connect_holder

Build a holder from a spec string (or return a holder object unchanged).

holder.SimHeatingHolder

Simulated MEMS heating (and optionally biasing) holder.

holder.ImpulseFollower

A real DENS holder through impulsePy (or any object with its API).

Optics and rendering#

optics.derive_optics

optics.OpticsConfig

optics.Calibration

Magnification -> nm/px and camera length -> 1/nm/px, per mag mode.

optics.realism.ColumnRealism

The imperfect geometry of a real column (see the module docstring).

optics.serialem.ColumnDefinition

A column defined by tables (from calibrations) rather than drawn from a seed: the same interface as ColumnRealism, so it goes in OpticsConfig(realism=...).

optics.serialem.to_serialem

Write the calibrations SerialEM would measure on a column (and, with properties_path, the camera's RotationAndPixel block).

optics.serialem.from_serialem

A column definition from a microscope's SerialEM calibrations (and, if given, the camera's RotationAndPixel lines).

render.Renderer

render.RenderConfig

Faces (serving the twin)#

faces.temchannel_soap.TemChannelServer

A threaded HTTP server speaking the DE-TEM-Channel SOAP API over a Column.

faces.deapi_server.TwinDeapiServer

The deapi protocol on a TCP port (plus the UDP stop listener), for one twin.

faces.shm_face.ShmFace

Serve DE-Server's requests from twin.

transport.shm.FrameProducer

The twin's end: open DE-Server's mapping and publish frames into it.

transport.shm.FrameConsumer

What DE-Server does, in Python: create the mapping, request an acquisition, read frames.