Hi, I have been thinking of how to handle the 'space_mapping_refactor' branch in relax. This follows from the thread at http://thread.gmane.org/gmane.science.nmr.relax.scm/24009/focus=7228. I am also doing this as part of my current expansions of the structure user functions, as I am looking at creating gnuplot scripts for data visualisation. The idea I have is to implement a software independent API in relax in the lib.plotting package. The API will be used for assembling all of the data plotting capabilities of relax. The idea is simple. You chose a plot type and select the software. The API will raise a RelaxError if the software backend is missing for that plot type. The lib.plotting API function will then call the software dependent backend function in lib.plotting. I'm not sure yet if using classes and inheritance (in the same way as the specific analysis API is implemented) or simple functions would be the best way to handle this. This will make support for different plotting software - Grace, OpenDX, matplotlib, gnuplot, etc - coherent. For user functions which are dependent on the software (the grace and dx user function classes), these could simply choose the software for the user. However this lib.plotting API idea could allow the grace and dx user functions to be merged into a new plotting user function super class whereby the user functions are based on the plot type, and a format user function argument is then used to select the output/software type.
From the user perspective via the user functions, they will simply
chose the software that they would like the plotting to be done with via the format argument and then the user function backend then chooses the plot type and calls the lib.plotting API to do all of the work. The user function only needs to know about the supported plot types. This can be implemented as a slow evolution of code into lib.plotting. It will require no minor release number changes, as additions to a new lib.plotting package will not break any scripts and not change the current relax library layout too much. However the idea of merging the grace and dx user function classes into the plotting super user function class will require a minor release number change as it will break almost all relax scripts. Regards, Edward P. S. I will probably delete the 'space_mapping_refactor' branch as it contains almost no new or useful code.