Results and diagnostics
=======================

The **Results** tab collects what each Fit or Plot produced: the generated
files, the execution details, and the full command log. The status bar at the
bottom of the main window gives the short-lived state without opening the
tab.

.. figure:: images/lem2025-singlehist-spectrum.png
   :alt: A fitted single-histogram spectrum displayed in a floating plot window.
   :width: 75%

   A spectrum is an interactive result, while its MSR, command log, ROOT file,
   and parameter table remain available as artifacts.

Result files
------------

The primary artifact is the **Result MSR** -- the fitted document that
contains the converged parameter block. Under **Other files** the tab lists:

* **ROOT plot** -- the ROOT canvas produced for the spectra display.
* **Template MSR** -- the template the document was generated from.
* **Output log** -- the full output of the run.
* **Parameter data** -- the ``par.dat`` parameter table that feeds the
  parameter plots.
* **All files** -- a link to the whole artifact package.

On the desktop the links open the files on your machine; on the web they
download or display the server-side artifact.

Execution details
-----------------

A collapsible **Execution details** block records when the action started and
finished, the process exit code, and whether the GUI parameter table and the
fitted result were synchronised afterwards.

Command log
-----------

The command log is the authoritative record: every command line muSRFlow
invoked, in order, with its arguments. It appears in the tab and in the
pop-up run log explained below. Use it to reproduce an analysis by hand or to
diagnose unexpected behaviour.

The status bar
--------------

The status bar under the main window keeps a terse permanent status:

* the **state** button (for example ``Idle``, ``Running musrfit``) -- click it
  to open the run log immediately;
* the **fit statistic** (for example ``χ²/NDF 1.012``), kept from the fit
  so a later plot does not erase it. For an independent-series fit the button
  instead shows the worst/best aggregate of the per-run statistics (or
  ``Series did not converge`` when any run failed); clicking it opens the
  per-run statistics table -- see :doc:`runs-fitting`;
* the **message** line for transient notices (click it to open the run log);
* the **file** and **directory** the last action operated on.

Hovering over a shortened value shows the full text. The state, statistic,
message, file, and directory elements appear only when they add context.

Run log window
--------------

The run log dialog shows the same command log as the Results tab, as a large
readable pane. It is opened from the status bar state or message, from the
outcome dialog, or by clicking the log area in Results. It is modeless, so
the main window stays usable while it is open.

Outcome dialog
--------------

If an action cannot be completed (a failed fit, an invalid run selection), an
outcome dialog explains what went wrong. It offers **Close** and, when
relevant, **Open run log** to inspect the commands that ran. A successful
action does not pop this dialog -- it stays out of the way.
