Giter Site home page Giter Site logo

ipaacaplot's Introduction

ipaacaPlot

A simple visualization tool that plots realtime data received via the Ipaaca[1] middleware.

Uses wx and matplotlib to plot either timedate or distributions that are send via Ipaaca on arbitrary channels/categories.

Usage:

Starting the ipaacaPlot is as simple as:

python ipaacaPlot [path_to_config]

Usage-Accepted IUs

ipaacaPlot currently accepts 2 kinds of signals:

  1. Timeline data: In this mode, the user specifies a IU category and a payload key. The data coming over that category and corresponding to the given key is collected online and is plotted either against the time of arrival or simply their order of arrival. Example payload for plotting the probability P(A=a): {"P(A=a)": 0.1}
  2. Distribution data: In this mode, the user specifies a IU category, a payload key containing the distribution bins, and a payload key containing the distribution values. The data in distribution plots is currently always overwritten with the last received data, i.e. there is not history as in timeline data, but one can see the entire distribution over the specified bins at one glance. Example payload for the entire distribution P(A): {"bins": ["A=a","A=b","A=c"], "values": [0,1,0.6,0.3]}

Requirements

ipaacaPlot is build upon the following 3rd party dependencies:

  • wxpython (GUI elements)
  • matplotlib (actual plotting)
  • ipaaca (to receive the messages that are being plottet)

[1] https://github.com/SocialCognitiveSystems/ipaaca

ipaacaplot's People

Contributors

jpoeppel avatar

Stargazers

Sebastian Kahl avatar

Watchers

Sebastian Kahl avatar

ipaacaplot's Issues

Scrollbars

  • Horizontal Scrollbars would be nice to have, in case we add too many channels to be displayed on a page
  • Vertical scrollbars would be needed in case the user makes the window to small
    • Currently the channels will go over the plot which is ugly

Try if porting to QT improves performance

CPU Performance is only mediocore even after some good improvements. While this does not mean, that it definetly slows down other programs, this is a risk we want to avoid.

Blitting is not really a way out since new data changes a lot ( apart from the actual data at least the x-axis for time series and both x and y axes for distributions if y was not fixed, which in turn changes the potential grid etc).

Maybe QT is does more performant draws? Could be worth investigatng (in a dummy project first!)

Implement different frontends

Currently ipaacaPlot uses only wxPython as the frontend. In theory we could allow different frontends (e.g. qt), so that users are not required to have one specific frontend installed.

As a more crazy thought: We could also implement a webfrontend, which communicates via sockets to a slim backend, this would however require major refactoring.

A webbased frontend would reduce the requirements a lot (one would need the backend requirements, e.g. flask, flask-socketio, flask-wtforms etc), but those are pure python requirements, thus a lot easier to install than most other frontends.

Option to collapse channel configuration

Currently added channels stay on the gui in their entire size. If multiple channels are added, the main window is resized accordingly. This can lead to big main guis (maybe even too big on some smaller screens, e.g. laptops).

It might be nice if one could collapse these channel configurations either horizontally or vertically.

Consider moving figurePos and figureOptions out of channel config

Currently figurePosition and figureOptions are stored for each channel, resulting in potentially multiple redundant attributes being stored.
Even worse, when loading a custom made config, old values would be overwritten which could result in strange behaviour for the user if he overlooked one value he would need to change.
An alternative would be to store figures steparately from the channels and only include the figure names.
This would however mean, that we would need to be able to create figures without any channels first when loading or come up with a smart way to jump from loading a channel to loading a referenzed figure.

Support old ipaaca version for windows?

Currently the scs only has an old ipaaca-binary for windows which still suffers from the shortcomings that required the ipaacaWrapper (which was reduced since it was redundant with the current version...).

Unfortunatly ipaaca does not export a version number which we could use to distinguish different versions to cope with them differently.
An alternative to fixing these "bugs" here would be to update the ipaaca build for windows.

Layout not working properly on start

On some machines (e.g. my laptop) the frame seems to not layout itself correctly as the elements might be on top of each other or not in view. A quick resize fixes this problem, but we should still look into the cause of this behaviour (maybe it is related to wx 3.0 cf 2.8 on the netboot machines or is it a timing issue with the laptop being to quick in reaching the layout function before all elements have been created properly?)

Add legends to plots

It would be nice if we could add legends to plots, especially for saving them. Questions that need to be answered for this:

  • How to provide the required information? Use channel description, e.g. the key for timeplots? Ideally one might want to change this only in the plot, not in his program.
  • Display always or only when saving?
  • Where to place the legend? Ideally the user would have fine grained control over this!

Ability to save recorded plot data

Sometimes we might want to save the received data, e.g. in order to create different plots from it later manually.
While the producing code could be adapted to store the data, it would be easier if we would just serialize the data we have stored in each channel anyways.

We will need to decide on a format (e.g. everything in one file vs one file for each channel) as well as the actual UI. Maybe an entry in the context menu, which opens a popup where one can specify which channels he wants to store.

Allow figures to be "detachable" and allow multiple figures

Currently all plots are drawn into the same figure which is fixed in the main window.
In some cases it might be preverable to have individual figures for different plots.

This kind of means that we need to create additional windows which new figures reside in, which also means we should be able to detach a figure from the main window, making that smaller and thus allowing to seperate the visual presentation and the controls.

Remove fixed coupling to ipaaca

Ipaaca is not really intended for just sending plain messages (numbers) back and forth (although it is quite frequently used in this way) and there exist many other middlewares (e.g. rsb, ros, protobuf, sockets, http etc). If we could find a way of decoupling the actual middleware receiver from the rest of the visualization, we could provide the same visualization utility for a bunch of different usecases, potentially with at most the extra overhead of having to write the specific receiver and potentially transforming the data in appropriate formats.

History for distribution plots

Distributions currently only show the current snapshot. It might be nice to save the history of distributions and be able to move back in time, to lock at how the distributions looked x-steps before?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.