de_twin.faces.shm_face.ShmFace#

class de_twin.faces.shm_face.ShmFace(twin, name='DE_ExternalFrames', pace=True, warm_up=True, *, reuse=1, pool_size=16, threads=None, scan_output='DE_ScanOutput')[source]#

Bases: object

Serve DE-Server’s requests from twin.

warm_up renders one frame before attaching: a fresh twin spends seconds on its first frame (imports, GPU start-up, building the specimen), while DE-Server waits about one frame time plus a second before it gives up on the acquisition. ready is set once the face is warm and serving.

Throughput (the corner cut): reuse=N publishes each rendered frame up to N times, so a 4096² camera can stream at hundreds of frames per second while the detector physics renders tens; threads caps the cores the physics takes. Every frame is a correct single frame of the current view; what recycling costs is independence, so a sum of many frames is noisier than N-fold as many would be. reuse=1 (the default) publishes every frame once. In a scan steered by DE-Server’s voltages, the frames are kept per scan point instead: a probe held on one point is rendered pool_size times and then picked from.

Parameters:
__init__(twin, name='DE_ExternalFrames', pace=True, warm_up=True, *, reuse=1, pool_size=16, threads=None, scan_output='DE_ScanOutput')[source]#
Parameters:

Methods

__init__(twin[, name, pace, warm_up, reuse, ...])

start()

stop()

start()[source]#
Return type:

ShmFace

stop()[source]#
Return type:

None