pyRTC.utils
General utility helpers shared across pyRTC.
The utilities in this module cover several small but widely used concerns: configuration validation, file-path helpers, timing helpers, dtype encoding, basic numerical helpers, and lightweight socket/process convenience functions.
They are kept here because they are broadly reusable across components and do not belong to a single subsystem.
Functions
|
|
|
|
|
|
|
|
|
Append a numpy array to a binary file on disk. |
|
Bind a TCP socket, retrying across a short range of ports. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Convert a NumPy dtype to a unique float. |
|
Convert a unique float back to the original NumPy dtype. |
|
|
|
Generates a binary mask of size NxN with a circular aperture of radius R and a central obscuration of radius r. |
|
Generate a file path based on the current date and time. |
|
Append '_tmp' to the filename part of the given file path, before the file extension. |
|
|
|
|
|
Measure repeated execution-time statistics for a callable. |
|
|
|
|
|
|
|
|
|
Load a YAML file and return the parsed Python object. |
|
|
|
Return a config value or a typed default. |
|
|
|
|
|
|
|
Dispatch configuration validation based on the component class hierarchy. |
|
|
|
|
|
Exceptions
|
Raised when a component configuration does not meet pyRTC expectations. |