mailRe: R2 from R1rho & R1


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on March 27, 2014 - 10:01:
Hi Troels,

Please see below.  It might be best to shift these discussions to the
relax-devel mailing list as well.


Yep, I think some "porcelain functions" that will work on
relax base "plumbing" functions would be the best solution?

I'm not quite sure what you mean here, but it sounds good ;)  In relax
there are a lot of API interfaces between the different parts of the
code.  By keeping a clean separation between the different parts of
relax, adding interpolation to one part requires zero changes to other
parts of the program.  I guess this is along the same lines.


That could return info to screen, and return values in dictionarys, where
the dictionary keys are also stored.
Actually, an extension of "calc_rotating_frame_params" in
"specific_analyses.relax_disp.disp_data"
which should take interpolated offset data as a possibility.

Extending calc_rotating_frame_params() is not necessary and is more of
a complication.  A single interpolation function where you pass in the
offset array with arguments for how much interpolation and how much
extension to add, and then that function returns the interpolated
array.  I.e. exactly as is performed in the
relax_disp.plot_disp_curves user function right now.  This is after
assembling the data, so we have jumped through one API already and the
dictionaries and keys no longer exist at this stage.  This makes life
a lot easier :)


For 3D, I would prefer that we use gnuplot instead ?

In relax there is currently Grace and OpenDX plotting abilities.
Adding matplotlib and gnuplot would be complementary.  For matplotlib
we would have to detect if this Python package is installed - which is
rather trivial.  But for gnuplot, this can be available at all times.
The most difficult part for gnuplot graphing support would be to find
a relax developer who knows the gnuplot commands for creating graphs!

This can also be saved for the relax-devel mailing list, but a plan
for the future would be to collect all these user functions into one
'plotting' user function class, for example:

plotting.dx_execute
plotting.dx_map
plotting.gnuplot_view
plotting.gnuplot_write
plotting.grace_view
plotting.grace_write
plotting.matplotlib_view
plotting.matplotlib_write

This is simply to make it easier for the user to find and choose.


I really really start liking the idea of the grace files.
Here you in "one" file carry around both the data and definitions to the
plot.

It is rather old software, but it is incredibly powerful.  And it
produces the highest quality, professional-looking 2D plots for
papers.


For matplotlib, you would need to acquire that the user has relax and
matplotlib installed at the same time.
That is not so good, and would be a problem for the compiled sources.

I am writing something at the moment for the relax-devel mailing list.
 But this is actually trivial.  If matplotlib is not present, we just
give a RelaxWarning to the user when they try to create a matplotlib
graph (this includes in the auto-analyses which are simply very large
relax scripts).


Unless you export python files, with the data inside, and then the plot
commands to matplotlib.

This would need to be discussed on the relax-devel mailing list.  As I
don't know matplotlib, I don't know the best way to do this.  Do you
create Python files with data so the user can change the plot, or do
everything in relax and output to SVG or some other format, as is
currently done in NESSY?  We can save this discussion for the
relax-devel mailing list.


Hm hm.

What is best?

Expect the user to know gnuplot , and have that installed?
Or that the user have matplotlib ?

The best here would be to give everything to the user.  Then you will
hear less from the users ;)  But this can be a gradual process.  We
could even one day add a new chapter to the relax manual about data
plotting, just to help the user understand what the best tools are and
how to create and visualise these plots.


I know that matplotlib on our RHEL system is only 0.99, and is not moving.
Gnuplot is old... And proven to work.

Reach for the future or backwards-compability?

relax is flexible enough to do everything!  For the record:

- gnuplot is from 1986 but is still developed.
- Grace is from 1991 but is also still developed (just).
- OpenDX is from 1991 but is abandoned.  Though it is insanely
powerful for multi-dimensional data plotting!
- matplotlib is from 2002 and is still active.

For the future though, you can never know when something will be
abandoned or when abandoned open source software will come back in a
more powerful incarnation.  So instead of choosing what would be best
and forcing that on a user, a relax developer who prefers one plotting
software over another can simply add support for that software.  And a
relax user with some scripting knowledge can easily become a relax
developer and add it themselves :)

Regards,

Edward



Related Messages


Powered by MHonArc, Updated Thu Mar 27 18:00:13 2014