de_twin.column.corrector.Corrector#

class de_twin.column.corrector.Corrector(kind='probe', *, clock=None, seed=0, tuned=True, ht_kv=200.0, lock=None, drift_rates=None, drift_step_s=1.0, operator=None, beam_check=None, label=None, served=None, sleeper=None)[source]#

Bases: object

Probe and/or image corrector of a column.

>>> col = Column(corrector="probe", seed=1, clock=ManualClock())
>>> col.corrector.pi4_angle_mrad()          # ~25-30 mrad when tuned
>>> r = col.corrector.measure("Standard")   # tableau; advances a ManualClock
>>> col.corrector.correct("B2"); col.corrector.correct("A2", fraction=0.7)

kind is "probe", "image" or "both". served is the side the DE-TEM-Channel face serves (the channel keeps one endpoint; the probe corrector by default). Every method takes side= to address the other one in-process.

Parameters:
__init__(kind='probe', *, clock=None, seed=0, tuned=True, ht_kv=200.0, lock=None, drift_rates=None, drift_step_s=1.0, operator=None, beam_check=None, label=None, served=None, sleeper=None)[source]#
Parameters:

Methods

__init__([kind, clock, seed, tuned, ht_kv, ...])

correct(name[, fraction, side, select, value_nm])

Correct fraction of the corrector's current estimate of name (from the last measurement / state of correction), i.e. CEOS correctAberration with target = (1 - fraction) * estimate.

endpoints()

get([side])

Ground-truth residual of a side (nm).

has(side)

load_alignment(data[, side])

measure([tab_type, angle_mrad, max_fit, side])

Acquire a tableau ("Fast"/"Standard"/"Enhanced") or, with tab_type="C1A1", a single C1/A1 measurement.

on_ht_change(ht_kv)

perturb([kind, scale])

pi4_angle_mrad([side])

residual_dict(side)

For MicroscopeState.{probe,image}_aberrations ({} when that side has none).

save_alignment([side])

set(name, value_nm[, side])

Set a residual coefficient exactly (an ideal correction; tests / scenarios).

set_beam_tilt(x_rad, y_rad[, relative, side])

status([side])

unit([side])

wait([timeout, side])

Attributes

beam_tilt

(x, y, known).

busy

served

property served: CorrectorUnit#
unit(side=None)[source]#
Parameters:

side (str | None)

Return type:

CorrectorUnit

has(side)[source]#
Parameters:

side (str)

Return type:

bool

residual_dict(side)[source]#

For MicroscopeState.{probe,image}_aberrations ({} when that side has none).

Parameters:

side (str)

Return type:

dict

get(side=None)[source]#

Ground-truth residual of a side (nm).

Parameters:

side (str | None)

Return type:

Aberrations

set(name, value_nm, side=None)[source]#

Set a residual coefficient exactly (an ideal correction; tests / scenarios).

Parameters:
Return type:

None

pi4_angle_mrad(side=None)[source]#
Parameters:

side (str | None)

Return type:

float

status(side=None)[source]#
Parameters:

side (str | None)

Return type:

int

property busy: bool#
property beam_tilt: tuple[float, float, bool]#

(x, y, known).

Type:

Commanded corrector beam tilt (WD) of the served side, rad

set_beam_tilt(x_rad, y_rad, relative=True, side=None)[source]#
Parameters:
Return type:

None

endpoints()[source]#
Return type:

str

measure(tab_type='Standard', angle_mrad=0.0, max_fit='', side=None)[source]#

Acquire a tableau ("Fast"/"Standard"/"Enhanced") or, with tab_type="C1A1", a single C1/A1 measurement. Blocks on the clock (a ManualClock is advanced). Raises CorrectorError on failure.

Parameters:
Return type:

MeasurementResult

correct(name, fraction=1.0, *, side=None, select='', value_nm=None)[source]#

Correct fraction of the corrector’s current estimate of name (from the last measurement / state of correction), i.e. CEOS correctAberration with target = (1 - fraction) * estimate. Returns the new ground-truth residual.

Parameters:
Return type:

Aberrations

save_alignment(side=None)[source]#
Parameters:

side (str | None)

Return type:

str

load_alignment(data, side=None)[source]#
Parameters:
  • data (str)

  • side (str | None)

Return type:

None

wait(timeout=None, side=None)[source]#
Parameters:
  • timeout (float | None)

  • side (str | None)

Return type:

int

perturb(kind='mode', scale=1.0)[source]#
Parameters:
Return type:

None

on_ht_change(ht_kv)[source]#
Parameters:

ht_kv (float)

Return type:

None