TimeBandsConsumer#
- class spectacoular.consumer.TimeBandsConsumer
Bases:
TimeConsumerProvide frequency-band data to a Bokeh
ColumnDataSource.This
TimeConsumer-derived class specializes in plots over frequency bands, such as octave spectra.It works like
TimeConsumer, but ignoresdownandrollover. Instead, only the first sample of each block is taken from the input.dshas a column for each input channel with one frequency-band value in each row.bandsgives the bands, andlfunccan be used to convert them to human-readable label strings.- lfunc
Function to convert bands into list of labels
- bands
List of labels for bands
- numbands
Number of bands
- update()
Update the data source from the GUI event loop.
- 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.
- init_ds()
Initialize the
ColumnDataSourcewith channel columns.
- result(num)
Yield the output block-wise.
This method does nothing in this class.
- 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
- 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)