ISISNeutronMuon / MDANSE

MDANSE: Molecular Dynamics Analysis for Neutron Scattering Experiments
https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx
GNU General Public License v3.0
23 stars 5 forks source link

Molecular Trace fix and plotting improvements #568

Closed MBartkowiakSTFC closed 1 month ago

MBartkowiakSTFC commented 1 month ago

Description of work Following a user request, this PR makes it possible to plot Molecular Trace results.

closes #565

Fixes

  1. MolecularTrace output has been corrected and now includes plotting axes,
  2. Plotting interface now has principal axis selection option,
  3. Plotting interface "use it" column now handles text input for selecting a subset of data.
  4. Text output of N-dimensional arrays is now possible in the plotter's text view.

To test Run a MolecularTrace analysis on a trajectory. Load the results into the plotter. Try changing the plotting axis in the Single mode. Choose a specific set of curves by putting a range description into the "Use it" column. (Accepted are single numbers, ranges 5-7, Python slices 2:8:3, and combinations of these. E.g. 5,7,15;18-20 will plot curves 5,7,15,18,19,20.) Switch to Heatmap mode. Input a single number into the "Use it" column to plot a different plane from the 3D set. Create a Text widget in the plotter and use it to save molecular trace 3D array to a CSV file.

MBartkowiakSTFC commented 1 month ago

Now it should be possible to swap axes in a heatmap plot by changing the principal axis.

In the course of the changes here I removed the option of plotting multiple heatmaps next to each other. The handling of multiple datasets has become complicated and I think that the plotting code needs to be refactored after November. For now if a user wants to compare two 2D maps, they would have to create them separately in two plotting tabs.

MBartkowiakSTFC commented 1 month ago

I think that we will leave it the way it is for now. Let's add it to the list of things that will be fixed in the plotter refactoring.