kafka_dae_diagnostics.data

Data being served by this IOC.

Members

Data

A mutable object describing the data being served by this IOC.

class kafka_dae_diagnostics.data.Data(spectra: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy.float64]] = <factory>, callbacks: dict[str, ~collections.abc.Callable[[], None]] = <factory>, bin_boundaries: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy.int32]] = <factory>, callbacks_lock: ~threading.RLock = <factory>, total_events: int = 0, total_event_messages: int = 0, total_event_megabytes: float = 0.0, largest_kafka_timestamp: float = 0.0, most_recent_kafka_timestamp: float = 0.0, start_time: float = 0.0, stop_time: float = 0.0, event_processing_lag: float = 0.0)[source]

Bases: object

A mutable object describing the data being served by this IOC.

property average_data_rate: float

Average data rate of this run in MiB/s.

bin_boundaries: ndarray[tuple[Any, ...], dtype[int32]]

Time-bin boundaries (ns).

callbacks: dict[str, Callable[[], None]]

A list of callbacks to notify when data is updated.

callbacks_lock: RLock

Lock-object, must be taken when spectrum_updaters is iterated/mutated. :meta private:

property duration: float

Run duration in seconds.

event_processing_lag: float = 0.0

Estimated time difference between an event being recorded in electronics and processed in KDAEDIAG IOC.

property histogram_megabytes: float

Size of histogram array in MiB.

largest_kafka_timestamp: float = 0.0

Largest timestamp seen in an ev44 or pl72 message since the beginning of this run. Seconds since epoch.

property mev: float

Number of counts (in millions of events).

property mev_per_hour: float

Number of counts per hour (in millions of events).

most_recent_kafka_timestamp: float = 0.0

Timestamp in the most recently-processed ev44 or pl72 message. Seconds since epoch.

property num_periods: int

Number of periods in histogram.

property num_spectra: int

Number of spectra in histogram.

property num_time_channels: int

Number of time channels in histogram.

spectra: ndarray[tuple[Any, ...], dtype[float64]]

An array describing counts since last run start.

Has shape (n_periods, n_detectors, n_timechannels).

start_time: float = 0.0

Timestamp of the most recent pl72 run-start message. Seconds since epoch.

stop_time: float = 0.0

Timestamp of the most recent 6s4t run-stop message. Seconds since epoch.

total_event_megabytes: float = 0.0

Megabytes of event messages processed in this run.

total_event_messages: int = 0

Total number of ev44 event messages in this run.

total_events: int = 0

Total number of neutron events in this run.