ConfigurationClient

version: 2025.3.17.dev1

class epoc.ConfigurationClient(host=None, port=6379, token=None, db=0)

Provides synchronization between PCs and persistent storage of values Currently based on Redis but could be extended to other backends

property PI_name: str
property XDS_template: Path
add_overlay(value)
after_write()

Call after finished an acquisition to update the configuration TODO! Find a better name

property base_data_dir: Path
property beam_center
property cal_dir
property data_dir: Path

Directory where the current experiment will be stored. Computed from the configured experiment TODO! Do we need the support for a custom directory

property experiment_class: str
property file_id

Unique identifier for the current dataset

property fname: str

Filename for the current dataset generated from the configured experiment and the current date

property fpath: Path
property frames_to_sum
from_yaml(path: Path, flush_db=False)

Return to a know state, or populate a new database args: path to the yaml file flush: if True, clear the database before loading

property jfjoch_host
property last_dataset: Path | None

Path to the last dataset that was recorded. Can be used to trigger processing

property log_fpath: Path
property mag_value_diff
property mag_value_img
property measurement_tag: str

Tag to identify the current measurement. will be part of the filename

property ncols
property nrows
property overlays
property project_id: str
property receiver_endpoint
property rotation_speed_idx: int
property temserver

ZMQ Endpoint for the TEM server For example: tcp://TEM-pc:5555

property threshold: int

Threshold that is applied after conversion but before summing of images.

property timestamp: str

Returns the current date in the format YYYY-MM-DD #TODO! should we set this manually instead for experiments crossing over midnight?

to_yaml(path: Path)

Save the current configuration to a yaml file

property today: str

Returns the current date in the format YYYY-MM-DD #TODO! should we set this manually instead for experiments crossing over midnight?

property viewer_cmax
property viewer_cmin
property viewer_interval
property work_dir: Path

Directory where output of data analysis will be stored

property year: str

Returns the current year in the format YYYY