interface¶
Displays the results of the analysis to the user, using images and plots.
- class hummingbird.interface.GUI(restore)[source]¶
Bases:
QMainWindow
,object
Main Window Class.
Contains only menus and toolbars. The plots will be in their own windows.
- add_backend(data_source)[source]¶
Add backend to menu if it’s not there yet and append to _data_sources
- property data_sources¶
Provide access to the GUI data sources
- property data_windows¶
Provide access to the GUI data widows
- instance = None¶
- class hummingbird.interface.DataSource(parent, hostname, port, ssh_tunnel=None, conf={})[source]¶
Bases:
QObject
Manages a connection with one backend
- property group_structure¶
- property hostname¶
Give access to the data source hostname
- property plotdata¶
Returns the data source dictionary of plotdata
- plotdata_added = None¶
- property port¶
Give access to the data source port
- property ssh_tunnel¶
Give access to the data source ssh_tunnel
- subscribe(title, plot)[source]¶
Subscribe to the broadcast named title, and associate it with the given plot
- subscribe_for_recording(title)[source]¶
Subscribe to the broadcast named title, and associate it with recorder
- subscribed = None¶
- property subscribed_titles¶
Returns the currently subscribed titles
- unsubscribe(title, plot)[source]¶
Dissociate the given plot with the broadcast named title. If no one else is associated with it unsubscribe
- unsubscribe_for_recording(title)[source]¶
Dissociate the recorder with the broadcast named title. If no one else is associated with it unsubscrine
- unsubscribed = None¶
- class hummingbird.interface.PlotData(parent, title, maxlen=1000, group=None)[source]¶
Bases:
object
Stores the data associated with a given broadcast
- property group¶
Returns the plot group
- property maxlen¶
Gives access to maximum size of the buffers
- property nbytes¶
Returns the number of bytes taken by the three buffers
- save_state(save_data=False)[source]¶
Return a serialized representation of the PlotData for saving to disk
- property title¶
Returns the plot data title
- class hummingbird.interface.H5Recorder(outpath, maxFileSizeMB=1)[source]¶
Bases:
object
Recording event variables to an HDF5 file.
Note
When reading from the recorder file, it might be necesssary to sort them using the timestamp before comparing different datasets.
- class hummingbird.interface.RingBuffer(maxlen, data=None, index=0, length=0)[source]¶
Bases:
object
Provides a ring buffer for scalar and numpy data. It’s always possible to retrieve the buffer data as a numpy array in O(1) This is achieve by always inserting two copies of any appended data, so it’s a bit slower to add data, and it takes twice as much memory as a regular buffer.
- property max¶
Returns the maximum value in the buffer, like a numpy array
- property min¶
Returns the minimum value in the buffer, like a numpy array
- property nbytes¶
Returns the number of bytes taken by the buffer
- property number_of_added_elements¶
- property shape¶
Returns the shape of the buffer, like a numpy array
- class hummingbird.interface.ZmqContext(iothreads)[source]¶
Bases:
object
Provides a singleton wrapper for a ZeroMQ context
- self_ = None¶
- class hummingbird.interface.ZmqSocket(_type, parent=None, **kwargs)[source]¶
Bases:
QObject
Wrapper around a zmq socket. Provides Qt signal handling
- closed = None¶
- connect_socket(addr, tunnel=None)[source]¶
Connect socket to endpoint, possibly using an ssh tunnel The tunnel argument specifies the hostname of the ssh server to tunnel through. Note that this still succeeds even if there’s no ZMQ server on the other end as the connection is asynchronous. For more details check the zmq_connect(3) documentation.
- ready_read = None¶
- ready_write = None¶