TimeConsumer#
- class spectacoular.consumer.TimeConsumer
Bases:
TimeOutProvide Acoular time data to a Bokeh
ColumnDataSource.This
TimeOut-derived class builds an interface from Acoular’s generator pipelines to Bokeh’sColumnDataSourcemodel for plots and tables.consume()runs in an extra non-GUIthreadand fetches blocks of data with lengthnumfromsource. These blocks are stored indata, andupdate()is then registered as a callback for the GUI event loop.update()sends the data, downsampled by a factordown, tods, which holds an overall length ofrolloversamples. The elapsed time in seconds is stored inelapsed.- ds
Bokeh’s ColumnDataSource, updated from result loop
- channels
channels to have in the output
- num
input block size
- down
downsampling factor for output
- rollover
total length of columns in ds
- thread
thread in which
consume()runs
- elapsed
elapsed time in data
- updated
flag for update / consume
- data
transport between consume / update
- init_ds()
Initialize the
ColumnDataSourcewith channel columns.
- ch_names()
Yield channel names for iterating over channels.
- consume(doc)
Consume samples from the source in a non-GUI thread.
- Parameters:
- doc
Server document used to register callbacks.
- update()
Update the data source from the GUI event loop.
- result(num)
Yield the output block-wise.
This method does nothing in this class.
- source
Data source;
Generatoror derived object.
- sample_freq
Sampling frequency of output signal, as given by
source.
- num_channels
Number of channels in output, as given by
source.
- num_samples
Number of samples in output, as given by
source.
- digest
A unique identifier for the generator, based on its properties. (read-only)