de_twin.column.Column#
- class de_twin.column.Column(state=None, *, clock=None, instrument_type=None, allow_ht=False, stage_speed_um_s=100.0, tilt_speed_deg_s=10.0, stage_limits=(2000.0, 2000.0, 500.0, 70.0, 30.0), corrector=None, seed=0, corrector_options=None)[source]#
Bases:
objectA simulated column. Thread-safe (
self.lockis anRLock).- Parameters:
state (MicroscopeState | None) – Initial state (defaults:
MicroscopeStatedefaults, i.e. 200 kV, MAG1 20 kx, screen up so the camera sees the beam).clock – Callable returning seconds, or an object with
now()(de_twin.clock.Clock). Stage motion is interpolated on this clock; a virtual clock fast-forwards it.instrument_type (str | None) – Vendor string reported as
INSTRUMENT_Type(“JEOL” default, or “FEI”).allow_ht (bool) – Permit high-tension / filament writes (refused by default).
stage_speed_um_s (float) – Stage dynamics;
stage_speed_um_s=float('inf')makes moves instantaneous.tilt_speed_deg_s (float) – Stage dynamics;
stage_speed_um_s=float('inf')makes moves instantaneous.stage_limits (Iterable[float]) – Stage dynamics;
stage_speed_um_s=float('inf')makes moves instantaneous.corrector (str | None) –
None/"none"(default; orstate.corrector),"probe","image"or"both": fit a CEOS-like aberration corrector (self.corrector).seed (int) – Seeds the corrector’s native aberrations, tune, drift and noise.
corrector_options (dict | None) – Extra keyword arguments for
Corrector(tuned=Falsefor a cold start,drift_rates={...},served="image").
- __init__(state=None, *, clock=None, instrument_type=None, allow_ht=False, stage_speed_um_s=100.0, tilt_speed_deg_s=10.0, stage_limits=(2000.0, 2000.0, 500.0, 70.0, 30.0), corrector=None, seed=0, corrector_options=None)[source]#
Methods
__init__([state, clock, instrument_type, ...])Camera lengths in mm of the active optics mode (empty in TEM imaging).
close()Nothing to release for a simulated column.
get(name)Read a property by its DE-TEM-Channel name (see the module docstring).
Magnifications a
Magnificationwrite can reach from here (empty in TEM diffraction).move_stage([x, y, z, alpha, beta, wait, timeout])now()on_change(callback)Call
callback(name, value)after every accepted write (outside the lock).op_state()DE-TEM-Channel OperationState: 1 running while the stage moves, else the last set's.
set(name, value)Write a property by its DE-TEM-Channel name.
set_alpha_selector(alpha)set_beam_blank(blanked)set_beam_shift_um(x, y)set_beam_tilt_mrad(x, y)set_column_valves(open_)set_condenser_aperture(index)set_condenser_stig(x, y)set_convergence_mrad(mrad)set_defocus_um(um)set_function_mode(mode)Raw vendor function mode, or a JEOL name ("MAG1", "LowMAG", "DIFF", ...).
set_ht_kv(kv)set_image_shift_um(x, y)set_instrument_type(vendor)set_intensity(value)set_magnification(magnification)set_magnification_index(index)set_objective_stig(x, y)set_probe_mode(mode)set_projection(mode)set_screen(down)set_spot_size(spot)set_stage([x, y, z, alpha, beta])Start a stage move (non-blocking; see
wait_idle()).set_tem_stem(mode)state()Snapshot, with the stage interpolated to now.
stop()Freeze the stage wherever its trajectory has reached (stopStage).
Clock seconds until the stage has arrived (0 when idle).
values()Every readable property.
wait_idle([timeout])Block until the stage has arrived.
Attributes
Raw JEOL function mode 0..4 (MAG1, MAG2, LowMAG, SAMAG, DIFF).
- on_change(callback)[source]#
Call
callback(name, value)after every accepted write (outside the lock).
- mag_ladder()[source]#
Magnifications a
Magnificationwrite can reach from here (empty in TEM diffraction). In TEM imaging that is LowMAG’s and MAG1’s together: a write beyond the active mode’s ladder crosses into the other (imaging_mode_for), as a real column’s mag knob does, so a client stepping this ladder is not stuck at the top of LowMAG.- Return type:
Ladder
- cl_ladder()[source]#
Camera lengths in mm of the active optics mode (empty in TEM imaging).
- Return type:
Ladder
- op_state()[source]#
DE-TEM-Channel OperationState: 1 running while the stage moves, else the last set’s.
- Return type:
- set(name, value)[source]#
Write a property by its DE-TEM-Channel name. Raises
ColumnRefused.
- set_stage(x=None, y=None, z=None, alpha=None, beta=None)[source]#
Start a stage move (non-blocking; see
wait_idle()). um / degrees.- Return type:
None
- set_function_mode(mode)[source]#
Raw vendor function mode, or a JEOL name (“MAG1”, “LowMAG”, “DIFF”, …).
- Return type:
None