mahos_dq.meas.confocal.Confocal#
- class mahos_dq.meas.confocal.Confocal(gconf: dict, name, context=None)#
Node that coordinates confocal scan, piezo control, and PD tracing.
The node switches between IDLE/PIEZO/INTERACT/SCAN states, starts the required workers per state, and publishes status, image, and trace messages.
- Parameters:
target.servers (dict[str, tuple[str, str] | str]) – Instrument server mapping for confocal workers. Required keys:
scanner,piezo,clock, and names intracer.pd_names. Optional keys:switchandpg(and any keys listed inswitch_names).target.tweakers (list[str]) – Optional Tweaker node names whose settings are saved alongside saved confocal data.
inst_remap (dict[str, str]) – Optional mapping to override instrument name.
switch_names (list[str]) – Names of switch instruments activated in INTERACT/SCAN.
switch_command (str) – Switch command label used when enabling confocal routing.
pg_channels (list[str]) – (default: [“laser”], only target.servers.pg is given) List of PG channels to set high continuously on INTERACT or SCAN states.
pub_interval_sec (float) – Period for forced periodic publication while running.
scanner (dict) – Scanner worker configuration dictionary.
scanner.xnum (int) – (default: 51) Default value of param xnum.
scanner.ynum (int) – (default: 51) Default value of param ynum.
scanner.delay (float) – (default: 0.0) Default value of param delay.
scanner.time_window (float) – (default: 0.01) Default value of param time_window.
scanner.pd_analog (bool) – set True if PD is AnalogIn-based.
scanner.pd_bounds (tuple[float, float]) – (default: (-10.0, 10.0)) Default value of param pd_bounds.
scanner.oversample (int) – (default: 1) Default value of param oversample.
scanner.dummy_samples (int) – (default: 10) Default value of param dummy_samples.
scanner.poll_samples (int) – (default: 1) Default value of param poll_samples.
piezo (dict) – Piezo worker configuration dictionary.
piezo.interval_sec (float) – (default: 0.5) Interval to poll piezo pos.
tracer (dict) – Trace worker configuration dictionary.
tracer.pd_names (list[str]) – (default: [“pd0”, “pd1”]) PD names in target.servers.
tracer.interval_sec (float) – (default: 0.5) Interval to poll trace data.
tracer.size (int) – (default: 500) Size of trace data.
tracer.samples (int) – (default: 5) Number of samples per chunk.
tracer.oversample (int) – (default: 1) Oversample factor.
tracer.time_window_sec (float) – (default: 0.01) Time window for single data point.
tracer.pd_bounds (tuple[float, float]) – (default: (-10.0, 10.0)) PD’s voltage bounds.
- __init__(gconf: dict, name, context=None)#
Methods
__init__(gconf, name[, context])change_state(msg)close_resources()Close custom resources.
command_buffer(msg)command_trace(msg)direction_to_target_pos(direction)export_image(msg)export_trace(msg)export_view(msg)get_param_dict(msg)handle_req(msg)Handle an incoming Request and return a Reply.
load_image(msg)load_trace(msg)main()Main procedure that will be looped.
move(msg)restore_state()save_image(msg)save_trace(msg)shutdown(msg)wait()Wait until required resources are ready.
Attributes