datamuxer.DataMuxer

class datamuxer.DataMuxer[source]

This class provides a wrapper layer of signals and slots around a pandas DataFrame to make plugging stuff in for live view easier.

The data collection/event model being used is all measurements (that is values that come off of the hardware) are time stamped to ring time.

The language being used through out is that of pandas data frames.

The data model is that of a sparse table keyed on time stamps which is ‘densified’ on demand by propagating measurements forwards. Not all measurements (ex images) can be filled. This behavior is controlled by the col_info tuple.

Parameters:events (list) – list of Events (any object with the expected attributes will do)
__init__()[source]

Methods

__init__()
append_event(event) Add an event to the DataMuxer.
append_events(events[, verbose]) Add a list of events to the DataMuxer.
bin_by_edges(bin_edges, bin_anchors[, ...]) Return data resampled into bins with the specified edges.
bin_on(source_name[, interpolation, agg, ...]) Return data resampled to align with the data from a particular source.
from_events(events[, verbose]) Create a DataMuxer from a list of Events.
include_timestamp_data(source_name) Add the exact timing of a data source as a data column.
remove_timestamp_data(source_name) Remove the exact timing of a data source from the data columns.
resample(bin_anchors, binning[, ...]) Return data resampled into bins with the specified edges.
to_sparse_dataframe([include_all_timestamps]) Obtain all measurements in a DataFrame, one row per Event time.

Attributes

col_info_by_ndim Dictionary mapping dimensionality (ndim) onto a list of ColSpecs
columns The columns of DataFrames returned by methods that return DataFrames.
default_downsample
default_upsample
ncols The number of columns that the DataMuxer contains
reference_time