
I’m basically building an UI for a simulator. So the high level overview is that you set up a simulation model, and then when you run the simulation you get a stream of data points with some axis (time or frequency usually) and columns for each node in the model. For some of these simulations the data points are complex numbers.
When I try to do anything with complex numbers I get errors that they can’t be encoded as JSON.
That makes sense. And you can’t plot raw complex numbers anyway.
But that leaves more of a design question, where do you do data processing in Bokeh? For processing you definitely want to work on complex numbers, not on separate real/imaginary or magnitude/phase components.
This ties into another problem I have with ColumnDataSources is that they don’t really have an index or data processing functionality like a Pandas dataframe. So it seems like a ColumnDataSource is more of a display structure than a data processing one, correct?
So now I want to stream data from my simulator. How would I set that up so that it’s streamed efficiently but allows data processing? At least I need to be able to process complex numbers to save them as separate components, but I want to be able to do other processing on the data.

