de_twin.column.SoapTemChannelClient#

class de_twin.column.SoapTemChannelClient(host='127.0.0.1', port=5002, timeout=10.0)[source]#

Bases: object

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

>>> c = SoapTemChannelClient("127.0.0.1", 5002)
>>> c.execute_batch(["GUN_HT", "PROJ_Magnification"])     # ['200000', '20000']
>>> c.get("StagePosition"); c.set("Magnification", 50000)
Parameters:
__init__(host='127.0.0.1', port=5002, timeout=10.0)[source]#
Parameters:

Methods

__init__([host, port, timeout])

aberration(name)

aberrations()

Last measurement, [(name, (x, y))] in the corrector's order and units.

alignment_file()

batch_dict([keys])

call(method, **params)

Invoke method; keyword cl_cm style names map to cl-cm.

corrector_acquire_tableau([tab_type, ...])

corrector_correct(name[, value, target, ...])

correctorCorrectAberration.

corrector_endpoints()

corrector_error()

corrector_fetch_alignment_file()

corrector_get_config_option(name)

corrector_info()

getCorrectorInfo parsed (correctorType, mode, currentLabel, ...).

corrector_measure_c1a1()

corrector_present()

corrector_put_alignment_file(data)

corrector_read_back()

corrector_reconnect()

corrector_result()

corrector_set_config_option(name, value)

corrector_status()

corrector_wait([timeout, poll_s])

Poll getCorrectorStatus (wall clock) until it leaves 1 (running).

execute_batch(keys)

get(name)

get_corrector_beam_tilt()

get_pair(method)

get_property(key)

get_stage_position()

operation_status([op_id])

set(name, value)

Write name.

set_corrector_beam_tilt(x_rad, y_rad[, ...])

set_stage_position([x, y, z, a, b])

status(name)

stop()

call(method, **params)[source]#

Invoke method; keyword cl_cm style names map to cl-cm. Returns the response element’s children as strings.

Parameters:
Return type:

dict[str, str]

execute_batch(keys)[source]#
Parameters:

keys (Iterable[str])

Return type:

list[str]

batch_dict(keys=('GUN_HT', 'GUN_HTMax', 'GUN_HTState', 'PROJ_BeamBlankState', 'ILLUM_Filament', 'PROJ_Mode', 'PROJ_Magnification', 'PROJ_ImageShift', 'PROJ_Focus', 'PROJ_Defocus', 'PROJ_ImageBeamShift', 'PROJ_ScreenPosition', 'CAMERA_MeasuredExposureTime', 'STAGE_Status', 'STAGE_Holder', 'STAGE_Position', 'VACUUM_Status', 'VACUUM_ColumnValvesOpen', 'VACUUM_PVPRunning', 'VACUUM_Gauges', 'PROJ_CameraLength', 'INSTRUMENT_Type', 'PROJ_SubMode', 'PROJ_TemStemMode', 'STAGE_PositionFull', 'ILLUM_ImageShift', 'ILLUM_BeamShift', 'ILLUM_BeamTilt', 'PROJ_ObjStig', 'ILLUM_CondenserStig', 'OP_Status', 'STAGE_Mode', 'ILLUM_SpotSize', 'ILLUM_ProbeMode', 'ILLUM_ConvergenceAngle', 'ILLUM_AlphaSelector', 'ILLUM_CondenserApertureIndex', 'PROJ_DiffractionShift'))[source]#
Parameters:

keys (Iterable[str])

Return type:

dict[str, str]

get_property(key)[source]#
Parameters:

key (str)

Return type:

tuple[str, int]

operation_status(op_id=0)[source]#
Parameters:

op_id (int)

Return type:

int

stop()[source]#
Return type:

bool

get_stage_position()[source]#
Return type:

tuple[float, float, float, float, float]

get_pair(method)[source]#
Parameters:

method (str)

Return type:

tuple[float, float]

set_stage_position(x=None, y=None, z=None, a=None, b=None)[source]#
Return type:

bool

get(name)[source]#
Parameters:

name (str)

Return type:

Any

set(name, value)[source]#

Write name. Returns the channel’s success flag.

Parameters:
Return type:

bool

status(name)[source]#
Parameters:

name (str)

Return type:

int

corrector_present()[source]#
Return type:

bool

corrector_status()[source]#
Return type:

int

corrector_info()[source]#

getCorrectorInfo parsed (correctorType, mode, currentLabel, …).

Return type:

dict[str, str]

corrector_endpoints()[source]#
Return type:

list[str]

corrector_error()[source]#
Return type:

str

corrector_result()[source]#
Return type:

str

aberrations()[source]#

Last measurement, [(name, (x, y))] in the corrector’s order and units.

Return type:

list[tuple[str, tuple[float, float]]]

aberration(name)[source]#
Parameters:

name (str)

Return type:

tuple[float, float, bool]

alignment_file()[source]#
Return type:

str

corrector_measure_c1a1()[source]#
Return type:

bool

corrector_acquire_tableau(tab_type='', angle_mrad=0.0, max_fit='')[source]#
Parameters:
Return type:

bool

corrector_correct(name, value=None, target=None, select='', wait_ms=0)[source]#

correctorCorrectAberration. value None = the corrector’s own estimate, target None = zero. With wait_ms > 0, True means completed.

Parameters:
Return type:

bool

corrector_fetch_alignment_file()[source]#
Return type:

bool

corrector_put_alignment_file(data)[source]#
Parameters:

data (str)

Return type:

bool

corrector_get_config_option(name)[source]#
Parameters:

name (str)

Return type:

bool

corrector_set_config_option(name, value)[source]#
Parameters:
Return type:

bool

corrector_read_back()[source]#
Return type:

bool

corrector_reconnect()[source]#
Return type:

bool

set_corrector_beam_tilt(x_rad, y_rad, relative=True, wait_ms=0)[source]#
Parameters:
Return type:

bool

get_corrector_beam_tilt()[source]#
Return type:

tuple[float, float, bool]

corrector_wait(timeout=120.0, poll_s=0.05)[source]#

Poll getCorrectorStatus (wall clock) until it leaves 1 (running).

Parameters:
Return type:

int