radioviz.models.data_model
Data model definitions for RadioViz application.
This module defines core data structures for representing data sources, their origins, storage configurations, and states within the RadioViz application. It provides immutable dataclasses for data integrity and enumerations for tracking data provenance and status.
Classes
|
Enumeration of data kinds. |
|
Enumeration of possible data origins. |
|
Immutable data source representation. |
|
Flags representing data state. |
|
Data storage configuration. |
|
Immutable spatial derivation representation. |
- class radioviz.models.data_model.DataKind(*values)[source]
Bases:
StrEnumEnumeration of data kinds.
Defines different categories of data based on their nature and usage within the application.
- static _generate_next_value_(name, start, count, last_values)
Return the lower-cased version of the member name.
- AGGREGATE = 'Aggregate'
Aggregated data formed by combining multiple data sources.
- DERIVED = 'Derived'
Data that has been derived from other sources.
- ORIGINAL = 'Original'
Original data that has not been processed or modified.
- class radioviz.models.data_model.DataOrigin(*values)[source]
Bases:
StrEnumEnumeration of possible data origins.
Represents different sources from which data can originate in the application. This enumeration is used to categorize data based on how it was obtained or created.
- static _generate_next_value_(name, start, count, last_values)
Return the lower-cased version of the member name.
- DERIVED = 'derived'
Data is derived from other sources.
- FILE = 'file'
Data originates from a file.
- IMPORT = 'import'
Data is imported from external sources.
- SIMULATION = 'simulation'
Data is generated through simulation.
- USER = 'user'
Data is provided by a user.
- class radioviz.models.data_model.DataSource(label: str, origin: DataOrigin, parent: DataSource | None = None, derivation: SpatialDerivation | None = None)[source]
Bases:
objectImmutable data source representation.
Represents a data source with its label, origin, and optional parent relationship. This class is immutable (frozen) to ensure data integrity once created.
- label: str
- Parameters:
label (str) – Human-readable name for the data source
- origin: DataOrigin
- Parameters:
origin (DataOrigin) – The origin type of the data source
- parent: DataSource | None = None
- Parameters:
parent (DataSource | None) – Optional parent data source, defaults to None
- class radioviz.models.data_model.DataState(*values)[source]
Bases:
FlagFlags representing data state.
Provides a bitmask-based system for tracking various states of data, such as whether it has been modified, is persistent, or is transient.
- static _generate_next_value_(name, start, count, last_values)
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_values: the last value assigned or None
- MODIFIED = 1
Data has been modified since last save.
- NONE = 0
No specific state flags set.
- PERSISTENT = 2
Data is persisted to storage.
- TRANSIENT = 4
Data exists only temporarily in memory.
- class radioviz.models.data_model.DataStorage(path: Path | None)[source]
Bases:
objectData storage configuration.
Represents the storage configuration for data, including the path where data is stored. This class is mutable to allow updates to storage paths during runtime.
- path: Path | None
- Parameters:
path (Path | None) – Path to the data storage location, or None if not specified
- class radioviz.models.data_model.SpatialDerivation(parent_id: UUID, roi: ROI, transform: Transform | None = None)[source]
Bases:
objectImmutable spatial derivation representation.
Represents the spatial relationship between a derived data source and its parent, including the region of interest (ROI) and optional transformation applied. This class is immutable (frozen) to ensure data integrity once created.
- parent_id: UUID
- Parameters:
parent_id (UUID) – Unique identifier of the parent data source