Skip to content

particula.data.registry

Register trusted measurement algorithms and custom readers.

Classes

NameDescription
OperationRegistrySelect versioned process strategies and trusted user readers by name.

Functions

NameDescription
_concentrationDivide counts/s by sampled cm³/s to obtain particles/cm³.
_moving_averageCompute complete trailing sample means, resetting after a clock gap.

OperationRegistryclass#

class OperationRegistry()

Select versioned process strategies and trusted user readers by name.

_batch_readersattributeinstance attribute#

_batch_readers: dict[str, Callable[..., BatchReader]] = {'delimited': MeasurementReader}

_processesattributeinstance attribute#

_processes: dict[tuple[str, str], MeasurementProcess] = {}

_readersattributeinstance attribute#

_readers: dict[str, Callable] = {}

__init__method#

def __init__() -> None

Register the particle concentration and causal voltage mean.

available_operationsmethod#

def available_operations(product: Measurement) -> dict[str, dict]

List compatible and required roles for each operation.

batch_readermethod#

def batch_reader(name: str) -> Callable[..., BatchReader]

Return the batch strategy for use with import_to_parquet.

describemethod#

def describe() -> list[dict]

Describe registered operations, units and parameter schemas.

readermethod#

def reader(name: str) -> Callable

Resolve a built-in or caller-installed reader strategy.

registermethod#

def register(process: MeasurementProcess) -> None

Register one implementation for a qualified ID and version.

register_batch_readermethod#

def register_batch_reader(name: str, factory: Callable[..., BatchReader]) -> None

Register a batch strategy for both memory and disk imports.

register_readermethod#

def register_reader(name: str, reader: Callable) -> None

Register a callable accepting source, profile and reader limits.

resolvemethod#

def resolve(operation: str, version: str) -> MeasurementProcess

Resolve a versioned operation or report the registered choices.

_concentrationfunction#

def _concentration(rate: pl.Expr, sample_flow: pl.Expr) -> pl.Expr

Divide counts/s by sampled cm³/s to obtain particles/cm³.

_moving_averagefunction#

def _moving_average(signal: pl.Expr, *, window: int, max_gap_seconds: float) -> pl.Expr

Compute complete trailing sample means, resetting after a clock gap.