Getting started
===============

Choose your edition
-------------------

* **Windows desktop:** follow :doc:`install-windows`. ROOT and musrfit are
  included in a WSL2 runtime. The guide covers first installation, existing
  runtime updates, and Windows-specific errors.
* **Linux desktop:** follow :doc:`install-linux`. Use an existing musrfit
  installation or install the separate runtime through Preferences.
* **Web:** open your site's muSRFlow URL, for example
  ``http://musruser.psi.ch/muSRFlow/``. The server runs the tools; there is
  nothing to install on your computer.

Packaged desktop applications do not require Node.js or npm.

.. _desktop-installation:

Desktop installation
--------------------

The complete instructions are in :doc:`install-windows` and
:doc:`install-linux`. Choose work and data folders in **File / Preferences**
before your first analysis. Keep work files outside the application
installation directory.

.. _getting-started-windows-installation:

Windows installation
--------------------

The Windows instructions have their own chapter: :doc:`install-windows`.
It also contains the update steps for older WSL runtimes.

Running the desktop app
-----------------------

When the window opens, the **Runs** tab is active. Choose the instrument,
year, and run numbers, check the model, and press **Plot** to inspect the
spectrum. Press **Fit** to fit it and refresh the parameter table. Generated
files go to the selected work directory; the **Results** tab and run log
show the outcome.

.. figure:: images/runs-tab.png
   :alt: Runs tab showing LEM run 514 from 2025, fit range, exponential cosine model, and Fit and Plot buttons.
   :width: 100%

   The browser edition before fitting. Run 514 (LEM, 2025) is an example
   selection, not a validated fit configuration. Choose your runs and model
   here; the Fit and Plot buttons remain available across tabs.

Opening the web edition
-----------------------

Open the deployment URL in your browser. Instrument options and available
run data depend on that site's server configuration. Fit and Plot run on
the server; output files can be opened from the result links.

The Quick Start guide
---------------------

The ``?`` button at the right of the tab bar opens a short, tab-aware guide.
On the desktop it opens in an independent window; in the browser it opens a
modeless dialog next to the main window. The full workflow chapters follow
the installation guides in this manual.

Support
-------

For questions and bug reports, include the version and run log and contact
`Zaher Salman <mailto:zaher.salman@psi.ch>`_. See :doc:`troubleshooting`
for common workflow problems.

For a complete example using real fitted LEM data and application screenshots,
see :doc:`lem2025-singlehist-example`.
