arguslib package

Subpackages

Submodules

arguslib.config module

Handles loading and merging of configuration files from standard locations.

arguslib.config.load_config(filename)[source]

Loads and merges YAML configuration from standard locations.

It searches for filename in the defined CONFIG_SEARCH_PATHS. Configurations are merged, with values from files found later in the search path (i.e., user-specific) overriding earlier ones (system-wide).

Parameters:

filename (str) – The name of the YAML file (e.g., ‘cameras.yml’).

Return type:

Dict[str, Any]

Returns:

A dictionary containing the merged configuration.

Raises:

FileNotFoundError – If no configuration file is found in any of the search paths.

arguslib.config.load_path_from_config(filename)[source]

Loads a single path from a text file in standard config locations.

Return type:

Path

arguslib.protocols module

Defines structural types (Protocols) for use in type hinting across arguslib.

This helps decouple interfaces from concrete implementations, preventing circular imports and improving static analysis.

class arguslib.protocols.ProvidesRadarScanTime(*args, **kwargs)[source]

Bases: Protocol

A protocol for instruments that can provide radar scan start and end times.

get_scan_time_bounds(dt)[source]

Returns the UTC start and end time of the radar scan corresponding to dt.

Return type:

tuple[datetime, datetime]

class arguslib.protocols.DirectRenderable(*args, **kwargs)[source]

Bases: Protocol

A protocol for instruments that render directly to an image array.

This contract is for instruments that do not use Matplotlib for plotting. Their show and annotate_positions methods operate on an internal image buffer and do not return an Axes object. The final image can be retrieved via to_image_array().

show(dt, ax=None, **kwargs)[source]
Return type:

None

annotate_positions(positions, dt, ax=None, **kwargs)[source]
Return type:

None

to_image_array(time=True)[source]
Return type:

ndarray

Module contents

Arguslib

A library for bringing together and visualising different atmospheric observations, including ground-based cameras, radar, and aircraft data.

This top-level __init__ file exposes the primary user-facing classes for easier access.