Configuration

System configuration (global)

class mundo.api.config.system.SystemConfig(
filename: Optional[str],
data: Dict[str, Any]
)

Global system configuration.

__init__(
filename: Optional[str],
data: Dict[str, Any]
) None

Creates a new system config based on the data from the configuration file.

Parameters
  • filename – The filename of the underlying configuration file, including file extension

  • config_data – The data loaded from the configuration file

property latest_session: Optional[str]

The filename of the session configuration that was previously loaded, e.g. before closing the application. This session will be the same as the loaded session.

Returns

The previously used session config filename, or None if no session has been loaded previously

property controller_type: Optional[str]

The controller type used for the platform. This is the name of a (possibly) registered controller loaded from an activated plugin.

property x_axis: mundo.api.config.controller.ControllerConfig

The connection parameters for the X-axis controller.

Returns

The X-axis controller connection parameters

property y_axis: mundo.api.config.controller.ControllerConfig

The connection parameters for the Y-axis controller.

Returns

The Y-axis controller connection parameters

property z_axis: mundo.api.config.controller.ControllerConfig

The connection parameters for the Z-axis controller.

Returns

The Z-axis controller connection parameters

property probe_diameter: float

The probe diameter of a probe that is inserted into a platform.

Returns

The diameter of the probe in nanometers

property default_sample_time: int

The default sample time for samples.

Returns

The default sample time

serialize() Dict[str, Any]

Serializes the system into a JSON-encodable dictionary.

Session configuration

class mundo.api.config.session.SessionConfig(
filename: Optional[str],
data: Dict[str, Any]
)

Session configuration.

__init__(
filename: Optional[str],
data: Dict[str, Any]
) None

Creates the session config and initializes the sample collection and sample queue based on the saved data, if any.

Parameters
  • filename – The filename of the session config

  • data – The saved data of the session config

property sample_collection: mundo.api.sample.SampleCollection

The currently used sample collection.

Returns

The sample collection used by this session

property sample_queue: mundo.api.sample_queue.SampleQueue

The currently used sample queue.

Returns

The sample queue used by this session

property calibrated_positions: Optional[Tuple[Tuple[float, float, float], Tuple[float, float, float], Tuple[float, float, float]]]

The calibrated positions for the current platform.

Returns

The calibrated positions used to calibrate

property platform: Optional[str]

The name of the platform that is used in the session.

property process_status: Tuple[mundo.api.process_status.ProcessMode, mundo.api.process_status.ProcessState]

The process mode and state of a process. This is meant to be used in the process page to determine what operation buttons should be shown.

Returns

A tupple of ProcessMode and ProcessState

property dropdowns: Dict[str, bool]

The dropdown states for plugins in the process page. This keeps track of whether or not they are open.

Returns

A dictionary containing the name of the plugin as key and whether or not they are open as value

property currently_processing_sample: Optional[mundo.api.sample.Sample]

The sample that is currently being processed by the queue processor. If no sample is being processed, this will be None.

Returns

The currently processing sample, if any

set_platform(
platform: mundo.api.config.platform.PlatformConfig
) None

Set the platform configuration that is currently being used in this session. This will automatically resize the underlying sample collection and update the sample queue limits.

Parameters

platform – The new platform config

serialize() Dict[str, Any]

Serializes the session into a JSON-encodable dictionary.

Platform configuration

class mundo.api.config.platform.PlatformConfig(
filename: Optional[str],
data: Dict[str, Any]
)

Platform configuration.

property rows: int

The number of rows in the sample platform.

property columns: int

The number of columns in the sample platform.

property depth: float

The depth of a sample in a sample platform.

property angle: float

The angle of the sample tubes. An angle of 90 degrees correspond to fully vertical sample tubes, whereas 0 degrees correspond to a fully horizontal sample tube.

property sample_diameter: float

The diameter of a sample.

serialize() Dict[str, Any]

Serializes the platform into a JSON-encodable dictionary.