Commit 9cbd68e8 authored by William Clarke's avatar William Clarke
Browse files

Update installation documentation.

parent b56d6edb
.. _conda:
:orphan:
===========
Conda Guide
===========
This is a short guide on setting up conda for the first time.
1. Download and install a python 3.7 version of Miniconda from the `package website <https://docs.conda.io/en/latest/miniconda.html>`_.
2. Create a conda enviroment.
::
conda create --name fsl_mrs python=3.7
3. Activate the enviroment.
::
conda activate fsl_mrs
4. Optionally install Jupyter notebooks. This is required to run the example Jupyter notebooks.
::
conda install -c conda-forge notebook
5. Follow the FSL-MRS & spec2nii install instructions on the :ref:`Installation
<install>` page.
See the Conda `documentation <https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ for more information.
\ No newline at end of file
...@@ -37,6 +37,15 @@ rst_epilog = """ ...@@ -37,6 +37,15 @@ rst_epilog = """
.. |fslmrs_gitlab| replace:: FSL-MRS GitLab .. |fslmrs_gitlab| replace:: FSL-MRS GitLab
.. _fslmrs_gitlab: https://git.fmrib.ox.ac.uk/fsl/fsl_mrs .. _fslmrs_gitlab: https://git.fmrib.ox.ac.uk/fsl/fsl_mrs
.. |fslmrs_github_tracker| replace:: FSL-MRS GitHub Issue Tracker
.. _fslmrs_github_tracker: https://github.com/wexeee/fsl_mrs/issues
.. |fslmrs_pkg_data| replace:: FSL-MRS example data
.. _fslmrs_pkg_data: https://users.fmrib.ox.ac.uk/~wclarke/fsl_mrs/example_usage.zip
.. |dev_email| replace:: developers
.. _dev_email: mailto:william.clarke@ndcn.ox.ac.uk,saad@fmrib.ox.ac.uk
""" """
...@@ -67,4 +76,4 @@ html_theme = 'sphinx_rtd_theme' ...@@ -67,4 +76,4 @@ html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here, # Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files, # relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static'] html_static_path = []
\ No newline at end of file \ No newline at end of file
...@@ -80,7 +80,9 @@ FSL-MRS can also be used in an interactive Python environment. The following is ...@@ -80,7 +80,9 @@ FSL-MRS can also be used in an interactive Python environment. The following is
In an IPython or Jupyter Notebook environment, run the follwing (the example data resides in the main :code:`fsl_mrs` package folder): In an IPython or Jupyter Notebook environment, run the follwing (the example data resides in the main :code:`fsl_mrs` package folder):
Loading and preparing the data: Loading and preparing the data:
:: ::
from fsl_mrs import MRS from fsl_mrs import MRS
FID_file = 'example_usage/example_data/metab.nii' FID_file = 'example_usage/example_data/metab.nii'
...@@ -91,12 +93,16 @@ Loading and preparing the data: ...@@ -91,12 +93,16 @@ Loading and preparing the data:
mrs.processForFitting() mrs.processForFitting()
Fitting the model to the data: Fitting the model to the data:
:: ::
from fsl_mrs.utils import fitting from fsl_mrs.utils import fitting
results = fitting.fit_FSLModel(mrs) results = fitting.fit_FSLModel(mrs)
Visualising the fit: Visualising the fit:
:: ::
from fsl_mrs.utils import plotting from fsl_mrs.utils import plotting
plotting.plotly_fit(mrs,results) plotting.plotly_fit(mrs,results)
......
.. _install:
Installation Instructions Installation Instructions
========================= =========================
FSL-MRS can currently be installed using two methods. FSL-MRS can currently be installed using one of two methods.
1. From GitLab Option 1: From GitLab
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
Download or clone from |fslmrs_gitlab|_. To get FSL-MRS with example data and example Jupyter notebooks, download the full package from gitlab. `Git LFS <https://git-lfs.github.com/>`_ must be installed to download package data. Download or clone from |fslmrs_gitlab|_. To get FSL-MRS with example data and example Jupyter notebooks, download the full package from gitlab. `Git LFS <https://git-lfs.github.com/>`_ must be installed to download package data.
:: ::
...@@ -13,10 +15,11 @@ Download or clone from |fslmrs_gitlab|_. To get FSL-MRS with example data and ex ...@@ -13,10 +15,11 @@ Download or clone from |fslmrs_gitlab|_. To get FSL-MRS with example data and ex
cd fsl_mrs cd fsl_mrs
pip install . pip install .
2. From Conda Option 2: From Conda
~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
The primary installation method is via *conda*. After installing conda and creating or activating a suitable `enviroment <https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_ you can install FSL-MRS from the FSL conda channel. The primary installation method is via *conda*. After installing conda and creating or activating a suitable you can install FSL-MRS from the FSL conda channel. See our page on setting up a :ref:`conda enviroment
<conda>` for a step by step guide.
:: ::
...@@ -24,6 +27,11 @@ The primary installation method is via *conda*. After installing conda and creat ...@@ -24,6 +27,11 @@ The primary installation method is via *conda*. After installing conda and creat
-c https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/channel/ \ -c https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/channel/ \
fsl_mrs fsl_mrs
Example data with conda
-----------------------
Installation with conda is easy, but you won't get the packaged example data and notebooks. This can be downloaded separately here: |fslmrs_pkg_data|_.
spec2nii spec2nii
~~~~~~~~ ~~~~~~~~
To convert data to NIfTI install the spec2nii program from conda. To convert data to NIfTI install the spec2nii program from conda.
......
.. _seq_file_params: .. _seq_file_params:
:orphan:
Sequence description parameters Sequence description parameters
=============================== ===============================
......
Troubleshooting =============================
=============== Troubleshooting & Bug Reports
=============================
Troubleshooting hints and tips will be added here. If you are having a problem which cannot be solved by anything on this page, either try searching the `FSL Troubleshooting hints and tips will be added here. If you are having a problem which cannot be solved by anything on this page, either try searching the `FSL
mailing list <https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=FSL>`_ archives to see if somebody else has had the same problem, or send a email to the mailing list. mailing list <https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=FSL>`_ archives to see if somebody else has had the same problem, or send a email to the mailing list.
MRS specific questions may be better answered on the `MRSHub forums <https://forum.mrshub.org/>`_. MRS specific questions may be better answered on the `MRSHub forums <https://forum.mrshub.org/>`_.
Bug Reporting
=============
Please report bugs on the public |fslmrs_github_tracker|_ or via email to the |dev_email|_.
Troubleshooting hints
=====================
1. Unable to find example data 1. Unable to find example data
If you installed FSL-MRS through conda the example data can be downloaded directly from the GitLab repository `folder <https://git.fmrib.ox.ac.uk/fsl/fsl_mrs/-/tree/master/example_usage>`_. If you installed FSL-MRS through conda the example data can be downloaded directly from the GitLab repository `folder <https://git.fmrib.ox.ac.uk/fsl/fsl_mrs/-/tree/master/example_usage>`_.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment