Spykeviewer as a more generic plotting utility....

46 views
Skip to first unread message

doug....@gmail.com

unread,
Feb 8, 2013, 6:58:14 AM2/8/13
to spyke-...@googlegroups.com

Robert,

Spykeviewer is a great utility. I have written a GUI application in Matlab for plotting multi-dimensional data and I was planning to attempt to do a re-write using Qt, Spyderlib and PyQwt! I've never used Qt before so the Spykeviewer application is just what I need to get started. I do like the way you have implemented the plugin system.

My technical background is powertrain vibration simulation. I plan to fork your project and attempt to make Spykeviewer to be a more generic plotting utility. I would prefer if the "blocks, channel groups, channels, segments and units" dimensions could be user defined. For example, I would choose to have: frequency (or engine order), engine speed (rpm), Signal Type, Location, dof.

I had to make 2 changes to get Spykeviewer to launch.

In the start.py I did this:

# The entry point for Spyke Viewer
#def main():
if __name__=="__main__":

In main_window_neo.py:

#from ..plugin_framework.data_provider_viewer import NeoViewerProvider
#from ..plugin_framework.filter_manager import FilterManager
from plugin_framework.data_provider_viewer import NeoViewerProvider
from plugin_framework.filter_manager import FilterManager

Please could you explain how to start up Spykeviewer without these changes?

I put the changes in my Github fork: https://github.com/DougRzz/spykeviewer

Thanks,
Doug

Robert Pröpper

unread,
Feb 8, 2013, 8:38:01 AM2/8/13
to spyke-...@googlegroups.com
Hi Doug,

I'm glad that you like Spyke Viewer! First, concerning your launch problem: It looks like you are trying to start the program without installing, the regular way to use it is to install it first. If you want to launch without installing, please use the script bin/spykeviewer instead of spykeviewer/start.py - that should work without changes.

To install, call "python setup.py install" or "python setup.py develop" (better if you intend to change the code, so you don't have to reinstall after every change) in the main directory, then you can start it using "spykeviewer". If you are on Windows, you might have to start "spykeviewer.exe" in the "Scripts" folder in your Python directroy (e.g. "C:\Python27\Scripts") because most Python versions do not add this folder to the PATH (see http://bugs.python.org/issue7231 ). Maybe I should mention these points in the installation docs.

I have also thought about turning it into a more general tool. However, some important features would not work without a data model (this is what the Neo library provides). Such models are likely to be domain specific.

On the other hand, there are quite a lot of features that would work in any domain, including large parts of the GUI and the plugin system. So I do think it is possible to adapt Spyke Viewer and keep most features intact. And once you have the concrete experience from your case, we could probably extract a general subset of Spyke Viewer that works with any kind data and could also serve as a basis for other domain specific forks.


Best,
Robert

DougR

unread,
Feb 8, 2013, 6:16:08 PM2/8/13
to spyke-...@googlegroups.com
Robert,

The suggestion to use bin/spykeviewer is working nicely.  Thanks!

A generic plotting tool for differing domains would be great. If this is possible, Spykeviewer should get a lot more use from the wider Python scientific community (although you might not necessarily want that to happen).

I would like to try and change the GUI slightly so I can specify the subplots and a few mathematical functions from the main GUI.   It might make the main GUI look a bit more cluttered but I think it would make writing the plugins a bit simpler if subplots and some functions could be specified from the main GUI.  I'll give it a go  - should be a good way of learning Qt.


Doug

DougR

unread,
Feb 12, 2013, 6:12:13 PM2/12/13
to spyke-...@googlegroups.com
Robert,

Excellent. Less neo dependency means I probably don't have to understand that particular data format.   Thanks. 

I've had a quick look at the cleanup branch. I noticed the main.ui is different.  The navigation window is now not defined in the Qt designer file.  Thats OK, I'll work out what changes you made in the .py files.

I've had a play with Qt Designer with the develop branch.  None of the GUI bits are actually working but I thought I would take some screenshots and try to explain what I hope to do. . See attached pptx file (also a pdf just in case you don't have Powerpoint 2010).  Hopefully it makes sense - it's getting late.

Also, did you ever consider making Spykeviewer a Spyder plugin instead of a stand alone application?

Thanks,
Doug



On 12 February 2013 12:44, Robert Pröpper 
wrote:
Hi Doug,

your project has motivated me to do some refactoring that I had planned for a while. If you check out the "Cleanup" branch from spykeviewer at GitHub, you'll find that the Neo-specific parts of the code are better separated than before. In particular, the MainWindow class does not use Neo anymore (though there still is an indirect dependency through spykeutils) and can be used by itself. MainWindowNeo only contains functionality that will not work without Neo.

Best,
Robert
gui_options_demo.pdf
gui_options_demo.pptx

Robert Pröpper

unread,
Feb 13, 2013, 10:54:20 AM2/13/13
to spyke-...@googlegroups.com
Hi Doug,

the navigation dock is now defined in neo_navigation.ui as it is Neo-specific. You can use it as a basis for your own navigation dock, see MainWindowNeo for how it is added to the main window. The other main thing you will have to adapt is the DataProvider class (in spykeutils.plugin). It is used in the console and plugins to get to your selected data (the "current" objects as well as the elements of the "selections" list) and its methods are very specific to the Neo data model.

Concerning Spyder plugins: I have thought about it when I started to use more and more of spyderlib's functionality. However, there are important considerations against that approach. First, the project is already quite usable as a standalone application and the documentation of Spyder's internal interfaces isn't too great. Also Spyke Viewer would be quite a big plugin that in turn loads other plugins etc., approaching the complexity of its host application. However, if a subset with more generic capabilities emerges in the future, it might be worth another look.

Best,
Robert
--
You received this message because you are subscribed to the Google Groups "Spyke Viewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyke-viewer...@googlegroups.com.
To post to this group, send email to spyke-...@googlegroups.com.
Visit this group at http://groups.google.com/group/spyke-viewer?hl=en.
 
 

Reply all
Reply to author
Forward
0 new messages