+
+.. image:: /images/banner.png
+ :scale: 100
+ :align: center
.. toctree::
diff --git a/doc/source/user/features.rst b/doc/source/user/features.rst
new file mode 100644
index 00000000..a87eaa88
--- /dev/null
+++ b/doc/source/user/features.rst
@@ -0,0 +1,29 @@
+Other Features
+==============
+This page describes other useful features available in RasCAL-2
+
+Undo and Redo
+-------------
+RasCAL-2 is designed so that changes made to the project, controls and results can be undone. You can undo
+and redo an action by clicking the |undo| or redo |redo| buttons from the toolbar respectively. The history of
+reversible actions can be viewed by clicking **Edit > Undo History**. This will open the undo history dialog which
+shows a list of actions performed and the current action will be highlighted. Clicking on any entry in the list will
+make that entry the current action by undoing or redoing until that action is reached.
+
+.. image:: /images/undo_history.png
+ :scale: 80
+ :alt: Undo History Dialog
+ :align: center
+
+The following operations cannot be undone:
+
+* Visualization actions (e.g. changing the plot zoom, or arrangement of windows),
+* Changes to the settings,
+* Exporting plot, project or fits.
+
+
+.. |undo| image:: /images/undo.png
+ :scale: 10
+
+.. |redo| image:: /images/redo.png
+ :scale: 10
diff --git a/doc/source/user/interface.rst b/doc/source/user/interface.rst
index 2b3e8b94..4282fca7 100644
--- a/doc/source/user/interface.rst
+++ b/doc/source/user/interface.rst
@@ -1,2 +1,77 @@
User Interface
==============
+Starting the RasCAL-2 software would show a splash screen while the software is loading. When loading is complete,
+the startup screen will be shown.
+
+.. image:: /images/startup_screen.png
+ :scale: 80
+ :alt: RasCAL Startup Screen
+ :align: center
+
+At the top of the startup screen is the title bar which will show the name of the software and the project name and
+path if a project is opened. Below the title bar is the menu bar and toolbar, which provides access to a number of
+operations. At the center of the screen are options for creating or loading a RasCAL project.
+
+.. note:: Some operating systems can change the location and look of title and menu bar.
+
+Menus and Toolbar
+-----------------
+RasCAL-2 provides access to some actions in a menu bar under the tile bar. These actions are grouped into 5
+groups explained below. Clicking on a menu item will perform its associated action.
+
+.. note:: On startup, some menu items like the **Windows** menu will be disabled. These menu items will be enabled
+ after a project is created or loaded.
+
+1. **File**
+ * **New Project**: Create a new project.
+ * **Open Project**: Open a existing project or example project
+ * **Open RasCAL-1 Project**: Open a RasCAL-1 project.
+ * **Save**: Save changes to the current project.
+ * **Save To Folder**: Save current project to another folder.
+ * **Export as Script**: Export the project as a python script.
+ * **Export Fits**: Export the results as CSV files.
+ * **Settings**: Open the settings dialog.
+ * **Exit**: Close the RasCAL application.
+2. **Edit**
+ * **Undo**: Undo the last action.
+ * **Redo**: Redo the last undone action.
+ * **Undo History**: View the action history.
+3. **Windows**
+ * **Tile Windows**: Arrange windows in a tile formation.
+ * **Reset to Default**: Reset the windows locations and sizes to the user saved defaults.
+ * **Save Current Window Positions**: Save the current positions and sizes of the windows as the user default.
+4. **Tools**
+ * **Show Sliders/Hide Sliders**: Show or hide slider view in the project window. see :ref:`about_sliders`.
+ * **Clear Terminal**: Clears the text in the terminal window.
+5. **Help**
+ * **Help**: Open the documentation website in the browser.
+ * **Check for Update**: Check online for new RasCAL-2 version.
+ * **About**: Show information about RasCAL-2.
+
+RasCAL-2 also provides access to some actions in a toolbar below the menu bar. The toolbar actions are **New Project**,
+**Open Project**, **Save**, **Undo**, **Redo**, **Settings**, and **Help**. Clicking on the appropriate icon in the
+toolbar will perform its associated action.
+
+Window Management
+-----------------
+After creating or loading a project, the interface will display 4 sub-windows arranged by default in 2x2 irregular
+grid. The sub-windows are
+
+* Plot window (top left)
+* Project window (top right)
+* Terminal window (bottom left)
+* Controls window (bottom right)
+
+These sub-windows can be rearranged by clicking on the title bar of the sub-window and dragging the sub-window. The
+sub-window can also be resized, minimised and maximized similar to the main window. It can be useful to make a
+sub-window bigger or smaller to suit a workflow, after which the arrangement can be saved by clicking
+**Windows > Save Current Window Positions** in the menu, this will make that arrangement the default and RasCAL will
+use that saved arrangement whenever the software is started.
+
+If you move a sub-window and want to revert back to you saved arrangement, click **Windows > Reset to Default** in the
+menu. If you want to revert to the original arrangement, click **Windows > Tile Windows** then click
+**Windows > Save Current Window Positions** in the menu to save the arrangement.
+
+
+.. note:: The sub-windows cannot be dragged outside the boundary of the main software window but only within the
+ centre area of the main window.
diff --git a/doc/source/user/overview.rst b/doc/source/user/overview.rst
deleted file mode 100644
index a63e1e79..00000000
--- a/doc/source/user/overview.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-General Overview
-================
diff --git a/doc/source/user/plot.rst b/doc/source/user/plot.rst
index e8a00670..e9468374 100644
--- a/doc/source/user/plot.rst
+++ b/doc/source/user/plot.rst
@@ -107,9 +107,6 @@ The plot will be saved as png file with a white background by default, the backg
by changing the **Export Background Colour** option to **none** in Settings dialog
-.. |options| image:: /images/settings.png
- :scale: 10
-
.. |reset| image:: /images/refresh.png
:scale: 10
diff --git a/doc/source/user/project.rst b/doc/source/user/project.rst
index 72681818..a7463cb3 100644
--- a/doc/source/user/project.rst
+++ b/doc/source/user/project.rst
@@ -55,6 +55,8 @@ The project tabs help organise the components of a project, the following tabs e
* :doc:`project/domains`
* :doc:`project/contrasts`
+.. _about_sliders:
+
Changing Fitted Parameter Values
--------------------------------
Fitted parameters defined in the different project tabs can be modified in a single place using the slider view.
diff --git a/doc/source/user/settings.rst b/doc/source/user/settings.rst
new file mode 100644
index 00000000..48276a54
--- /dev/null
+++ b/doc/source/user/settings.rst
@@ -0,0 +1,50 @@
+Settings
+========
+The settings for RasCAL-2 can be configured by clicking |options| in the toolbar or clicking File > Settings in the
+main menu. The settings dialog has 3 tabs:
+
+1. **General**:
+
+ .. image:: /images/settings_general.png
+ :scale: 80
+ :alt: General Settings
+ :align: center
+
+ * **Style**: This sets the active theme of RasCAL-2. The software can use the default **system** theme, a **light**
+ or a **dark** theme.
+ * **Editor Fontsize**: This is the font size of the internal custom file editor.
+ * **Matlab As Default Editor**: This indicates that should if Matlab should be used to open both Python and Matlab
+ custom files.
+ * **Live Recalculate**: This indicates the results should be recalculated and plotted whenever the user changes values
+ outside edit mode. This can be disabled if running the calculation is expensive.
+ * **Show Stop Calculation Warning**: This indicates a warning should be shown to user when stopping a run will lead
+ to result being lost.
+
+ .. image:: /images/confirm_stop_dialog.png
+ :scale: 80
+ :alt: Confirm Calculation Stop Dialog
+ :align: center
+
+2. **Plotting**: Setting related to plots.
+
+ .. image:: /images/settings_plot.png
+ :scale: 80
+ :alt: Plot Settings
+ :align: center
+
+ * **Export Background Colour**: indicates if exported plot background should be white or transparent.
+
+
+3. **Matlab**: Setting related to running Matlab custom files.
+
+ .. image:: /images/settings_matlab.png
+ :scale: 80
+ :alt: Matlab Settings
+ :align: center
+
+ * **Current Matlab Directory**: This tells RasCAL-2 where the Matlab installation for custom files is located. On
+ Windows and Linux, this should be the folder path e.g *C:\\Program Files\\MATLAB\\R2023a* while on MacOS should be
+ the app e.g */Applications/MATLAB_R2023b.app*. The minimum supported MATLAB is 2023b.
+ * **Matlab RAT directory**: This tells RasCAL-2 to use the provided Matlab RAT files when running a Matlab custom
+ file. This could provide improved performance by avoiding switching in and out of Matlab code. Download and use
+ the latest version of RAT, set this to the path of the RAT folder e.g *C:\\RAT*.
diff --git a/doc/source/user/structure.rst b/doc/source/user/structure.rst
new file mode 100644
index 00000000..83c20793
--- /dev/null
+++ b/doc/source/user/structure.rst
@@ -0,0 +1,128 @@
+Project Structure
+=================
+A project in RasCAL-2 is a folder which contains the human-readable json files and other optional files such as
+custom files required to run a calculation. A folder based project structure means projects can typically be shared by
+copying the project folder.
+
+.. warning:: If you plan to share a project folder with custom files and/or run it on different machines, ensure that
+ RasCAL-2 is allowed to copy the custom files if it was outside the project folder (This is the default behaviour),
+ otherwise it will use an absolute path which could make the project fail to run.
+
+The primary files in a project folder are:
+
+* A *project.json* containing the model definition for the project.
+* A *controls.json* containing the control procedure and configuration.
+
+The project folder could also have:
+
+* An optional *results.json* containing the result of the last run.
+* Optional Custom files if RasCAL was allowed to copy them.
+
+Create New Project
+------------------
+In the startup screen, click the **New Project** button to open the new project dialog. The new project dialog can
+also be opened using the shortcut **Ctrl + N** or by clicking **File > New Project** in the main menu.
+
+.. tip:: You can also click the |new| icon on the toolbar.
+
+To create a new project:
+
+1. Type in the name of the project
+2. Click the **Browse** button and navigate to the folder which will hold the project. This folder can have
+ files in it but must not contain a project already.
+3. Click the **Create** button
+
+The new project dialog will close as soon as the project is created.
+
+
+.. image:: /images/new_project.png
+ :scale: 80
+ :alt: New Project Dialog
+ :align: center
+
+Load Existing Project
+---------------------
+In the startup screen, click the **Import Existing Project** button to open the load project dialog. The load project
+dialog can also be opened using the shortcut **Ctrl + O** or by clicking **File > Open Project** in the main menu.
+
+.. tip:: You can also click the |open| icon on the toolbar.
+
+To open an existing project:
+
+1. Click the **Browse** button, navigate to the project folder.
+2. Click the **Load** button
+
+.. image:: /images/load_existing.png
+ :scale: 80
+ :alt: Load Project Dialog
+ :align: center
+
+
+To load a recently opened project (last 10), click the **Recent Projects** tab in the load project dialog, then select
+the desired project from the list by clicking on the entry.
+
+.. image:: /images/load_recent.png
+ :scale: 80
+ :alt: Open existing project
+ :align: center
+
+To load an example project, click the **Examples** tab in the load project dialog, then select the desired example
+project from the list by clicking on the entry.
+
+Load RasCAL-1 Project
+---------------------
+In the startup screen, click the **Import RasCAL-1 Project** button to open the load RasCAL-1 project dialog. The new
+project dialog can also be opened by clicking **File > Open RasCAL-1 Project** in the main menu.
+
+To load a RasCAL-1 project:
+
+1. Click the **Browse** button, navigate to the folder with the RasCAL-1 project, and select the \*.mat file.
+2. Click the **Load** button
+
+The load RasCAL-1 project dialog will close as soon as the project is created.
+
+.. note:: MATLAB is required to run RasCAL-1 custom projects so ensure it is setup properly. But RasCAL-1 standard
+ layers projects can be loaded and run without MATLAB.
+
+.. image:: /images/load_rascal_1.png
+ :scale: 80
+ :alt: Load RasCAL-1 Project Dialog
+ :align: center
+
+Save a Project
+--------------
+To save a project, press **Ctrl + S** or click **File > Save** in the main menu.
+
+.. tip:: You can also click the |save| icon on the toolbar.
+
+To save to a different folder, click **File > Save To Folder...** and navigate to the new folder in the file dialog.
+
+Export as Script
+----------------
+The model definition of a project can be exported as a python script which can modified for further analysis. To export
+as a script, click **File > Export as Script...**, navigate to the desired save location in the file dialog, enter a
+name for the file and press the **Save** button. The exported script will require the ratapi python package to run so
+|install ratapi| in your python environment.
+
+Export Fits
+-----------
+The resulting data from a fit can be exported for further analysis outside RasCAL-2 or for custom plotting. To export
+fits, click **File > Export Fits...**, navigate to the desired save location in the file dialog, enter a name for the
+file and press the **Save** button. All the data will be exported to zip which contains several comma separated value
+(\*.csv) files, the name of each file will indicate the name of the data, the contrast number and domain number
+(if applicable) e.g the file called **sldProfiles_contrast_1_domain_2.csv** is the sldProfiles data for contrast 1 and
+domain 2 while **backgrounds_contrast_2.csv** is the background for contrast 2 and all or no specific domain.
+
+
+.. |install ratapi| raw:: html
+
+