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
18 stars 4 forks source link

Add tags to output datasets in MDA files #440

Closed MBartkowiakSTFC closed 1 month ago

MBartkowiakSTFC commented 1 month ago

Description of work This PR adds an extra attribute called 'tags' to IOutputVariable. As a result, the HDF5 datasets in the MDA output file will have a 'tags' attribute as well. This does not change the output as such, but is a starting point allowing to store useful hints for the data plotter.

The DOS calculation will now label 'dostotal' as 'main', and 'dos{element name}' as 'main,partial'. The goal is to let the plotter create a quick plot out of an entire output file, where the main result is plotted first (solid line) and the partial results are added (using dashed lines, etc.)

Fixes

  1. The 'tags' attribute has been added to IOutputVariable,
  2. For each job, keyword arguments 'main_result = True' and 'partial_result = True' have been manually added for the outputs considered the main/partial results of a given analysis type.

To test All tests should pass. The tags are not used at the moment.