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
21 stars 5 forks source link

Output xaxis preview #441

Closed MBartkowiakSTFC closed 4 months ago

MBartkowiakSTFC commented 4 months ago

Description of work Action widget now includes a QTextEdit preview field, which informs users about the data axis of the output. This allows the user to check how a change to the input parameters affects the output of the analysis. At the moment the main application is to confirm that the frame selection results in a sufficient energy resolution and range.

At the moment only FramesConfigurator, InstrumentResolutionConfigurator and QVectorsConfigurator create a preview of an output axis. The automatic conversion of the units will be added in another PR.

closes #412

Fixes

  1. Configurators now have a new method: preview_output_axis.
  2. Action collects and displays the output axis of each configurator using the show_output_prediction slot.
  3. Extra checks have been added to prevent the GUI from crashing when only a single frame is selected. A single frame is a valid choice for FramesConfigurator, but makes the InstrumentResolutionConfigurator fail.

To test Load a trajectory into the GUI and select an analysis in the "Actions" tab. Try changing the frames input and check if it affects the preview in the text field just above the "RUN" button.