Skip to content

Commit

Permalink
Merge branch 'main' into plot_source
Browse files Browse the repository at this point in the history
  • Loading branch information
cgohil8 committed Feb 21, 2024
2 parents 75f6d7a + b397393 commit c227a48
Show file tree
Hide file tree
Showing 23 changed files with 337 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: "3.9"
python: "3.8"
# You can also specify other tool versions:
# nodejs: "16"
# rust: "1.55"
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
OHBA Software Library (OSL)
===========================

Documentation: https://osl.readthedocs.io/en/latest/.

Install from Source Code
------------------------
The recommended installation depends on your operating system. OSL can be installed from source using:
Expand All @@ -14,11 +16,10 @@ pip install -e .
where the environment file `<os>.yml` can be:

- `linux.yml` for a generic linux machine.
- `m1_mac.yml` if you are using a modern Mac computer.
- `hbaws.yml` if you are using an OHBA workstation at Oxford.
- `bmrc.yml` if you are using the BMRC at Oxford.

Note, all of the above environments come with Jupyter Notebook installed. The `hbaws.yml` and `m1_mac.yml` environments also comes with Spyder installed.
Note, all of the above environments come with Jupyter Notebook installed. The `hbaws.yml` environment also comes with Spyder installed.

Deleting osl
------------
Expand Down
45 changes: 31 additions & 14 deletions doc/source/api.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
API
================
===

This page is the reference for the functions in OSL.

Expand Down Expand Up @@ -162,9 +162,11 @@ Utility functions for running an OSL Preprocessing pipeline.


GLM
******
***

GLM Base
++++++++

Modality specific wrappers for glmtools.

.. currentmodule:: osl.glm.glm_base
Expand Down Expand Up @@ -193,7 +195,7 @@ Modality specific wrappers for glmtools.
SensorClusterPerm.get_sig_clusters

GLM Epochs
++++++++++++++++++++++++
++++++++++

.. currentmodule:: osl.glm.glm_epochs

Expand Down Expand Up @@ -227,7 +229,7 @@ GLM Epochs


GLM Spectrum
++++++++++++++++++++++++
++++++++++++

GLM-Spectrum classes and functions designed to work with GLM-Spectra computed from MNE format sensorspace data

Expand Down Expand Up @@ -284,11 +286,13 @@ GLM-Spectrum classes and functions designed to work with GLM-Spectra computed fr


RHINO
********************
*****

Tools for Coregistration and forward modeling

Coregistration
++++++++++++++

Deep-level RHINO functions used by wrappers

.. currentmodule:: osl.source_recon.rhino.coreg
Expand All @@ -309,6 +313,7 @@ Deep-level RHINO functions used by wrappers

Forward modeling
++++++++++++++++

Deep-level RHINO functions used by wrappers

.. currentmodule:: osl.source_recon.rhino.forward_model
Expand All @@ -324,7 +329,8 @@ Deep-level RHINO functions used by wrappers


FSL-utils
+++++++++++
+++++++++

Deep-level RHINO functions used by wrappers

.. currentmodule:: osl.source_recon.rhino.fsl_utils
Expand All @@ -342,7 +348,8 @@ Deep-level RHINO functions used by wrappers


Polhemus
+++++++++++
++++++++

Deep-level RHINO functions used by wrappers

.. currentmodule:: osl.source_recon.rhino.polhemus
Expand All @@ -358,7 +365,8 @@ Deep-level RHINO functions used by wrappers


Surfaces
+++++++++++
++++++++

Deep-level RHINO functions used by wrappers

.. currentmodule:: osl.source_recon.rhino.surfaces
Expand All @@ -378,7 +386,8 @@ Deep-level RHINO functions used by wrappers


Utils
+++++++++++
+++++

Deep-level RHINO functions used by wrappers

.. currentmodule:: osl.source_recon.rhino.utils
Expand Down Expand Up @@ -448,7 +457,7 @@ Deep-level RHINO functions used by wrappers


Source Reconstruction
**********************
*********************

Pipeline Functions
++++++++++++++++++
Expand All @@ -467,6 +476,7 @@ Primary user-level functions for running OSL coregistration and source_recon fun

Wrappers
++++++++

Primary wrapper functions to use in a source_recon configuration

.. currentmodule:: osl.source_recon.wrappers
Expand Down Expand Up @@ -499,6 +509,7 @@ Primary wrapper functions to use in a source_recon configuration

Beamforming
+++++++++++

Second-level beamforming functions used by wrappers

.. currentmodule:: osl.source_recon.beamforming
Expand Down Expand Up @@ -533,9 +544,9 @@ Second-level beamforming functions used by wrappers
_prepare_beamformer_input



Sign-flipping
+++++++++++++

Second-level sign-flipping functions used by wrappers

.. currentmodule:: osl.source_recon.sign_flipping
Expand Down Expand Up @@ -566,6 +577,7 @@ Second-level sign-flipping functions used by wrappers

Utils
+++++

Utility functions for running an OSL Source Recon pipeline.

.. currentmodule:: osl.source_recon.batch
Expand All @@ -580,6 +592,7 @@ Utility functions for running an OSL Source Recon pipeline.

Parcellation
************

Second-level Parcellation functions used by wrappers

.. currentmodule:: osl.source_recon.parcellation.parcellation
Expand Down Expand Up @@ -620,6 +633,7 @@ Second-level Parcellation functions used by wrappers

Nifti Utils
++++++++++++

Second-level Parcellation functions used by wrappers

.. currentmodule:: osl.source_recon.parcellation.nii
Expand All @@ -638,9 +652,11 @@ Second-level Parcellation functions used by wrappers

Report
******

Sensor level
++++++++++++
.. currentmodule:: osl.report.raw_report

.. currentmodule:: osl.report.preproc_report

.. autosummary::
:toctree: stubs
Expand All @@ -656,6 +672,7 @@ Sensor level

Source level
++++++++++++

.. currentmodule:: osl.report.src_report

.. autosummary::
Expand Down Expand Up @@ -685,7 +702,7 @@ File handling


Logger
++++++++++++
++++++

.. currentmodule:: osl.utils.logger

Expand Down Expand Up @@ -735,4 +752,4 @@ OPM Utilities

convert_notts

correct_mri
correct_mri
22 changes: 13 additions & 9 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,27 @@

# -- Path setup --------------------------------------------------------------

import os
import sys
import inspect

__location__ = os.path.join(
os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe()))
)

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

sys.path.insert(0, os.path.join(__location__, "../.."))

# -- Project information -----------------------------------------------------

project = 'osl'
copyright = '2023, OMG'
author = 'OMG'
project = 'OSL'
copyright = '2023, OHBA Analysis Group'
author = 'OHBA Analysis Group'

# The full version, including alpha/beta/rc tags
release = '0.0.1dev'
release = '0.5.1'


# -- General configuration ---------------------------------------------------
Expand Down
26 changes: 21 additions & 5 deletions doc/source/install.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
Installation
============

First, make sure you have conda (or miniconda) installed: https://docs.conda.io/en/latest. Then oslpy can be installed from source using the following:
We recommend installing OSL within a virtual environment. You can do this with `Anaconda <https://docs.anaconda.com/free/anaconda/install/index.html>`_ (or `miniconda <https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_).

::
git clone https://github.com/OHBA-analysis/oslpy.git
cd oslpy
Linux
-----

1. Install FSL using the instructions `here <https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/Linux>`_.

2. Install OSL either via pip using::

pip install osl

or from source (in editable mode) using::

git clone https://github.com/OHBA-analysis/osl.git
cd osl
conda env create -f envs/linux.yml
conda activate osl
pip install -e .

Windows
-------

If you're using a Windows machine, we recommend you install FSL within a `Ubuntu <https://ubuntu.com/wsl>`_ (linux) subsystem following the instructions `here <https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/Windows>`_.

Then install OSL using the instructions above.
File renamed without changes.
File renamed without changes.
46 changes: 46 additions & 0 deletions envs/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: osl
channels:
- conda-forge
dependencies:
- python=3.8.16
- pip=23.0.1
- vtk=9.1.0=*osmesa*
- pyvista=0.38.5
- pip:
- jupyter==1.0.0
- ipympl==0.9.3
- ipywidgets==8.0.5
- ipyevents==2.0.1
- ipyvtklink==0.2.2
- jupyter-client==8.1.0
- numpy==1.23.5
- scipy==1.10.1
- matplotlib==3.7.1
- mne==1.3.1
- scikit-learn==1.2.2
- fslpy==3.11.3
- sails==1.4.0
- tabulate==0.9.0
- pyyaml==6.0
- neurokit2==0.2.3
- jinja2==3.1.2
- glmtools==0.2.1
- numba==0.56.4
- nilearn==0.10.2
- dask==2023.3.2
- distributed==2023.3.2
- parse==1.19.0
- opencv-python==4.7.0.72
- h5io==0.1.7
- mat73==0.60
- nibabel==5.0.1
- pandas==1.5.3
- panel==1.2.3
- pqdm==0.2.0
- seaborn==0.12.2
- tensorflow==2.9.1
- tensorflow_probability==0.17.0
- tqdm==4.65.0
- osfclient==0.0.5
- osl==0.5.1
- osl-dynamics==1.2.11
Loading

0 comments on commit c227a48

Please sign in to comment.