Documentation for Hyplot

Author:
Sander Valcke
Astronomical Observatory
University of Ghent
Belgium
sander [dot] valcke [at] ugent [dot] be

Compiling and Running

To get hyplot up and running you roughly have to go through the following steps:

Packages:

In case of any problems please feel free to contact us!

Note for Mac users: for those of you that don't know it: there are good package repositories for Mac, an example being Fink (http://www.finkproject.org/). This can save you the trouble of installing the required packages manually.

What does hyplot do?

Gui mode gives you a selection of plots:

Some features of the GUI:

documentation

doxygen support is built-in into hyplot in the sense that is integrated into the cmake build system and most of the classes are documented in the proper style. If you have doxygen installed doing a swift "make doc" should produce a Documentation/html folder full of goodies, just open the index.html with your favourite browser and you're good to go.

Although doxygen supports python for some reason it does not interpret the standard escape sequences when present in the python way of documenting things (through docstrings). One way of solving this is by documenting python code in the doxygen way, but we prefer documenting python code the python way. This can be solved in a very simple way by using an input filter for python files. An example is doxypy: http://code.foosel.org/doxypy Then go to your Doxyfile and alter the line

FILTER_PATTERNS =

to read: FILTER_PATTERNS = *.py=doxypy.py

et voila, perfect support for standard python documentation!

a bit of history

Quite some work has been put into the graphical part of hyplot: the gui and the associated plotting. For plotting we started off using pgplot, where we were very soon faced with its limitations (no object-orientation, strict way of representing data, difficult to handle the colorbar, ...) but the main turnoff was that it did not have a Qt device, which we needed to be able to plot in our Qt Gui. Although a Qt device for pgplot has been developed it is not a standard part of it, using it would require people to modify and reinstall their pgplot library.

We thus decided to migrate away from pgplot, to plplot (what's in a name :p). After fully integrating plplot into the code we decided that it also did not fit our needs: standard 2D color plots did not seem to be possible Oo. We did not find any other good plotting package supporting Qt in C/C++ (or fortran, for that matter). There is however the beautiful matplotlib Python package, which does everything we want (and more!). Only downside (from our point of view, having a C/C++/Fortan code): it's Python. After some digging and toying there was a first attempt to have python create a QWidget with the plot, which was returned to the C++ part of the code. Although this approach worked it was hard to have the plot itself interact with the code. We then decided to rewrite the gui we had so far in Python, and wrapping our C++ API using sip, allowing Python to call it. Our code has thus now become a Python code with C++ extensions which do all the heavy lifting: reading/storing the data, calculating renderings, calculating CMDs, ...

And that's how we ended up with a code which is a mixture of C/C++/Fortran/Python :p

Different IC type

At present we are still stuck with storing our data in long, static arrays. You can thus either read the data and then copy it to those arrays (the approach used in CDataGadget), or read it directly into those arrays. This includes reading the data into arrays in the fortran common block.

At some point this underlying static structure will disappear and it will be possible to just inherit CDataReader with your own class (like we have done with CDataGadget), overriding some virtual routines and that should do it.


Generated on Fri Oct 16 18:59:57 2009 for HYPLOT by  doxygen 1.5.8