Documentation
=============

Welcome to the osl-dynamics documentation!

The :doc:`API reference <autoapi/index>` provides documentation for the classes, methods and functions in osl-dynamics. New users may find the :doc:`FAQ <faq>` useful.

**New users are encouraged to have a look at the config API interface:** `here <https://osl-dynamics.readthedocs.io/en/latest/autoapi/osl_dynamics/config_api/index.html>`_.

Models
------

Various models are implemented in osl-dynamics. Finalised models that have been used in published papers are described below.

- :doc:`Hidden Markov Model (HMM) <models/hmm>`.
- :doc:`Dynamic Network Modes (DyNeMo) <models/dynemo>`.

Tutorials
---------

The following tutorials illustrate basic usage and analysis that can be done with osl-dynamics.

**Data tutorials**:

- :doc:`tutorials_build/data_loading`.
- :doc:`tutorials_build/data_prepare_meg`.
- :doc:`tutorials_build/data_prepare_fmri`.
- :doc:`tutorials_build/data_time_delay_embedding`.

**Static (time-averaged) modelling tutorials for MEG**:

- :doc:`tutorials_build/static_spectra_analysis`.
- :doc:`tutorials_build/static_power_analysis`.
- :doc:`tutorials_build/static_aec_analysis`.

**Dynamic modelling tutorials**:

- :doc:`tutorials_build/sliding_window_analysis`.
- :doc:`tutorials_build/hmm_training`.
- :doc:`tutorials_build/dynemo_training`.
- :doc:`tutorials_build/hmm_dynemo_get_inf_params`.

**HMM post-hoc analysis tutorials**:

- :doc:`tutorials_build/hmm_multitaper_spectra`.
- :doc:`tutorials_build/hmm_plotting_meg_networks`.
- :doc:`tutorials_build/hmm_summary_stats`.
- :doc:`tutorials_build/hmm_fmri_dual_estimation`.
- :doc:`tutorials_build/hmm_plotting_fmri_networks`.

**DyNeMo post-hoc analysis tutorials**:

- :doc:`tutorials_build/dynemo_regression_spectra`.
- :doc:`tutorials_build/dynemo_plotting_networks`.
- :doc:`tutorials_build/dynemo_mixing_coefs`.

**Group-level analysis tutorials**:

- :doc:`tutorials_build/group_contrast`.
- :doc:`tutorials_build/group_network_response`.

More examples scripts can be found in the `examples directory <https://github.com/OHBA-analysis/osl-dynamics/tree/main/examples>`_ of the repo.

Workshops
---------

- `2023 OHBA Software Library (OSL) workshop <https://osf.io/zxb6c/>`_.
