From 931207754d63bdc0a2929cf8dd6c798db8f7061b Mon Sep 17 00:00:00 2001 From: maestroque Date: Thu, 8 Aug 2024 21:47:56 +0300 Subject: [PATCH] Add basic installation, README.rst in index page and minor fixes --- README.rst | 22 ++++++++++++++++++++++ docs/index.rst | 1 + docs/installation.rst | 11 +++++++++++ docs/user_guide/exporting.rst | 3 ++- docs/user_guide/metrics.rst | 4 ++-- 5 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 README.rst diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..d247555 --- /dev/null +++ b/README.rst @@ -0,0 +1,22 @@ +phys2denoise: A toolbox for physiological metrics calculation +============================================================= + +This package is designed for use in the metrics calculation of physiological data, more specifically of cardiac and respiratory signals, to be used in fMRI denoising. + + +.. image:: https://readthedocs.org/projects/phys2denoise/badge/?version=latest + :target: http://phys2denoise.readthedocs.io/en/latest +.. image:: https://img.shields.io/badge/license-Apache%202-blue.svg + :target: http://www.apache.org/licenses/LICENSE-2.0 +.. image:: https://img.shields.io/badge/python-3.6+-blue.svg + :target: https://www.python.org/downloads/ + + +.. _licensing: + +License Information +------------------- + +This codebase is licensed under the Apache License, Version 2.0. The full +license can be found in the `LICENSE `_ file in the ``phys2denoise`` distribution. You may also +obtain a copy of the license at: http://www.apache.org/licenses/LICENSE-2.0. diff --git a/docs/index.rst b/docs/index.rst index 0651d73..590f394 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,3 +1,4 @@ +.. include:: ../README.rst Contents -------- diff --git a/docs/installation.rst b/docs/installation.rst index 709983c..a647649 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -5,6 +5,17 @@ Installation and setup .. _basic_installation: +Basic installation +------------------ + +The easiest way to install ``phys2denoise`` is to use ``pip``. Assuming you have +Python >= 3.6 installed, you can install ``phys2denoise`` by opening a terminal +and running the following: + +.. code-block:: bash + + pip install phys2denoise + Developer installation -------------------- diff --git a/docs/user_guide/exporting.rst b/docs/user_guide/exporting.rst index 1a9421f..5674a34 100644 --- a/docs/user_guide/exporting.rst +++ b/docs/user_guide/exporting.rst @@ -10,7 +10,8 @@ This can be done using the :py:func:`export_metric` function, which provides the - Defining the output file extension and file prefix. - Defining the number of timepoints to be considered. -The following example shows how to export the computed respiratory variance time using a Physio object. +The following example shows how to export the computed respiratory variance time using a Physio object. In the following example, +we consider that the Physio object is ``resp``, containing the respiratory data, peaks and troughs. .. code-block:: python diff --git a/docs/user_guide/metrics.rst b/docs/user_guide/metrics.rst index 402fe0c..7b1c5dc 100644 --- a/docs/user_guide/metrics.rst +++ b/docs/user_guide/metrics.rst @@ -64,7 +64,7 @@ For further information refer to the :py:mod:`physutils` documentation. Without using a Physio object ############################# -However, if the use of :py:mod:`physutils` is not preferred, the metrics can be also computed without it. The following +However, if the use of the ``Physio`` object of the :py:mod:`physutils` module is not preferred, the metrics can be also computed without it. The following example shows how to compute the heart rate and the heart rate variability using the :py:mod:`phys2denoise` package. .. code-block:: python @@ -73,4 +73,4 @@ example shows how to compute the heart rate and the heart rate variability using # Given that the respiratory signal is stored in `data`, the peaks in `peaks`, the troughs in `troughs` # and the sample rate in `sample_rate` - _, rvt = respiratory_variance_time(physio, peaks, troughs, sample_rate) + _, rvt = respiratory_variance_time(data, peaks, troughs, sample_rate)