Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,36 @@ wraps the ``NO_RHINO=1`` invocation, and CI always runs with
``NO_RHINO=1`` set.


Building the documentation
--------------------------

The Sphinx site lives under ``docs/``; the rendered HTML committed to
``docs/html/`` is the artifact published to GitHub Pages. To rebuild it,
use the same dev env you tested with (PTSA must be importable for
autodoc) plus ``pandoc`` (needed by ``nbsphinx`` to render the example
notebooks). With conda:

.. code-block:: shell-session

conda install -y -c conda-forge sphinx sphinx_rtd_theme nbsphinx pandoc

Then from the repo root:

.. code-block:: shell-session

PYTHONPATH=$PWD PTSA_DOCS_BUILD_NOTEBOOKS=1 python maint/build_docs.py

``maint/build_docs.py`` removes the old ``docs/html/`` and runs
``make html`` (which writes back into ``docs/html/`` since
``docs/Makefile`` sets ``BUILDDIR = .``). ``PYTHONPATH=$PWD`` ensures
``docs/conf.py``'s ``from ptsa import __version__`` resolves when
sphinx-build runs from the ``docs/`` cwd. Set
``PTSA_DOCS_BUILD_NOTEBOOKS=1`` to include the example notebooks
(needs ``pandoc``); omit it for a faster docs-only build.

Open ``docs/html/index.html`` in a browser to preview before committing.


Building conda packages
-----------------------

Expand Down
Binary file added docs/html/_images/examples_eeg_13_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/_images/examples_eeg_15_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/_images/examples_eeg_17_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/_images/examples_eeg_22_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/_images/examples_eeg_9_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
656 changes: 656 additions & 0 deletions docs/html/_sources/examples/eeg.ipynb.txt

Large diffs are not rendered by default.

23 changes: 7 additions & 16 deletions docs/html/_sources/morlet.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ Formula
-------

PTSA's Morlet wavelet is the standard complex Morlet (Gabor) wavelet
parameterized by the number of cycles under the Gaussian envelope
(the *Tallon-Baudry parameterization*; see [TallonBaudry1999]_).
parameterized by the number of cycles under the Gaussian envelope.
For a target frequency :math:`f` and a width :math:`w` (number of
cycles):

Expand Down Expand Up @@ -83,8 +82,8 @@ When to flip ``complete`` to ``False``:
:math:`\sim 4 \times 10^{-6}`).
- Setting ``complete=False`` is mainly useful for reproducing
analyses that explicitly used the uncorrected wavelet, or for
cross-checking against another tool that does not apply the
Tallon-Baudry zero-mean correction.
cross-checking against another tool that does not apply a
zero-mean correction.

Parameters
----------
Expand All @@ -97,8 +96,8 @@ Parameters

``width`` : int, default ``5``
Number of cycles of the carrier sinusoid under one standard
deviation of the Gaussian envelope (the **Tallon-Baudry**
convention). This is *not* a SciPy-style scale factor. The
deviation of the Gaussian envelope (the same convention as MNE's
``n_cycles``). This is *not* a SciPy-style scale factor. The
trade-off is the usual time-frequency uncertainty:

- Higher ``width`` → narrower bandwidth (tighter frequency
Expand All @@ -119,7 +118,7 @@ Parameters
with the other two on the same call.

``complete`` : bool, default ``True``
Apply the Tallon-Baudry zero-mean correction described above.
Apply the zero-mean correction described above.

``cpus`` : int, default ``1``
Number of worker threads used by the C++ kernel.
Expand Down Expand Up @@ -196,8 +195,7 @@ summarizes the three conventions you are most likely to encounter.
* - PTSA (this package)
- ``width`` = number of cycles under the Gaussian envelope
(one :math:`\sigma_t`).
- Tallon-Baudry convention. ``complete=True`` by default
applies the zero-mean correction.
- ``complete=True`` by default applies the zero-mean correction.
* - ``mne.time_frequency.morlet``
- ``n_cycles`` = number of cycles, same convention as PTSA's
``width``.
Expand All @@ -218,10 +216,3 @@ summarizes the three conventions you are most likely to encounter.
vice versa). The two parameterizations differ by both definition
and scale, and using the wrong one silently produces a
well-formed but incorrect time-frequency map.

References
----------

.. [TallonBaudry1999] Tallon-Baudry, C., & Bertrand, O. (1999).
Oscillatory gamma activity in humans and its role in object
representation. *Trends in Cognitive Sciences*, 3(4), 151-162.
123 changes: 0 additions & 123 deletions docs/html/_static/_sphinx_javascript_frameworks_compat.js

This file was deleted.

2 changes: 0 additions & 2 deletions docs/html/_static/jquery.js

This file was deleted.

4 changes: 1 addition & 3 deletions docs/html/api/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=9edc463e" />


<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=c3365b21"></script>
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
Expand Down Expand Up @@ -92,7 +90,7 @@
<div itemprop="articleBody">

<section id="ptsa-data">
<h1>ptsa.data<a class="headerlink" href="#ptsa-data" title="Link to this heading"></a></h1>
<h1>ptsa.data<a class="headerlink" href="#ptsa-data" title="Link to this heading"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="data/timeseriesx.html">TimeSeries</a></li>
Expand Down
Loading
Loading