particula.data.registry
Register trusted measurement algorithms and custom readers.
Classes
| Name | Description |
|---|---|
OperationRegistry | Select versioned process strategies and trusted user readers by name. |
Functions
| Name | Description |
|---|---|
_concentration | Divide counts/s by sampled cm³/s to obtain particles/cm³. |
_moving_average | Compute 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__() -> NoneRegister 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) -> CallableResolve a built-in or caller-installed reader strategy.
registermethod#
def register(process: MeasurementProcess) -> NoneRegister one implementation for a qualified ID and version.
register_batch_readermethod#
def register_batch_reader(name: str, factory: Callable[..., BatchReader]) -> NoneRegister a batch strategy for both memory and disk imports.
register_readermethod#
def register_reader(name: str, reader: Callable) -> NoneRegister a callable accepting source, profile and reader limits.
resolvemethod#
def resolve(operation: str, version: str) -> MeasurementProcessResolve a versioned operation or report the registered choices.
_concentrationfunction#
def _concentration(rate: pl.Expr, sample_flow: pl.Expr) -> pl.ExprDivide 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.ExprCompute complete trailing sample means, resetting after a clock gap.