Skip to content

Commit

Permalink
Merge pull request GazzolaLab#29 from GazzolaLab/update-0.0.3
Browse files Browse the repository at this point in the history
Merging 0.0.3 into main. Update mostly includes bugfix, test cases, and documentation.

- Spike cutout visualization
- PCA+GMM clustering
- Wavelet decomposition
- Spike sorting documentation
- Data and DataManger module
- Signal to noise utility
- FFT plotting
  • Loading branch information
skim0119 authored May 19, 2022
2 parents 7962a86 + 584eb4f commit fd75a1f
Show file tree
Hide file tree
Showing 60 changed files with 2,302 additions and 716 deletions.
11 changes: 8 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Thanks for your interest in contributing MiV-OS project.

The following is a set of guidelines how to contributes. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

#### Table Of Contents
**Table Of Contents**

[TLTR! I need three-line summary!!](#three-line-summary)

Expand Down Expand Up @@ -36,10 +36,15 @@ The following is a set of guidelines how to contributes. These are mostly guidel
### Installation and packages

First **create the fork repository and clone** to your local machine.
We provide [requirements.txt](requirements.txt) to include all the dependencies.
We provide [requirements.txt](https://github.com/GazzolaLab/MiV-OS/blob/main/requirements.txt) to include all the dependencies that is required to develop. You can either install using `pip install -r requirements.txt` or
```bash
$ pip install -r requirements.txt
$ pip install miv-os[dev]
```
If you are more interested in working for documentation, use
```bash
$ pip install miv-os[docs]
```
More details are included [here](https://github.com/GazzolaLab/MiV-OS/blob/main/docs/README.md).

### Pre-Commit

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ mypy:
coverage:
@pytest --cov=miv tests/

all:test mypy
all:test mypy coverage
ci: test mypy
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![codecov][badge-codecov]][link-codecov]

[//]: # (Remove this line for the first release)
_The package is under pre-alpha development. First Alpha release target mid-April 2022._
_The package is under pre-alpha development. First Alpha release target mid-May 2022._

</div>

Expand Down
Binary file added docs/_static/assets/spike_cutout_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
miv.signal.spike.PCADecomposition
=================================

.. currentmodule:: miv.signal.spike

.. autoclass:: PCADecomposition

.. rubric:: Methods

.. autosummary::

~PCADecomposition.__init__
~PCADecomposition.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
miv.signal.spike.SpikeFeatureExtractionProtocol
===============================================

.. currentmodule:: miv.signal.spike

.. autoclass:: SpikeFeatureExtractionProtocol


.. rubric:: Methods

.. autosummary::

~SpikeFeatureExtractionProtocol.__init__
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
miv.signal.spike.SuperParamagneticClustering
============================================

.. currentmodule:: miv.signal.spike

.. autoclass:: SuperParamagneticClustering


.. rubric:: Methods

.. autosummary::

~SuperParamagneticClustering.__init__
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
miv.signal.spike.UnsupervisedFeatureClusteringProtocol
======================================================

.. currentmodule:: miv.signal.spike

.. autoclass:: UnsupervisedFeatureClusteringProtocol

.. rubric:: Methods

.. autosummary::

~UnsupervisedFeatureClusteringProtocol.__init__
~UnsupervisedFeatureClusteringProtocol.fit
~UnsupervisedFeatureClusteringProtocol.predict
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
miv.signal.spike.WaveletDecomposition
=====================================

.. currentmodule:: miv.signal.spike

.. autoclass:: WaveletDecomposition

.. rubric:: Methods

.. autosummary::

~WaveletDecomposition.__init__
~WaveletDecomposition.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
miv.statistics.spikestamps\_statistics
======================================

.. currentmodule:: miv.statistics

.. autofunction:: spikestamps_statistics

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
miv.visualization.fft\_domain.plot\_frequency\_domain
=====================================================

.. currentmodule:: miv.visualization.fft_domain

.. autofunction:: plot_frequency_domain
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
miv.visualization.waveform.extract\_waveforms
=============================================

.. currentmodule:: miv.visualization.waveform

.. autofunction:: extract_waveforms
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
miv.visualization.waveform.plot\_waveforms
==========================================

.. currentmodule:: miv.visualization.waveform

.. autofunction:: plot_waveforms
8 changes: 5 additions & 3 deletions docs/api/io.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
*********************
Input / Output Module
*********************
********************
Data Managing Module
********************

.. automodule:: miv.io.data

.. automodule:: miv.io.binary
:members:
37 changes: 5 additions & 32 deletions docs/api/signal.rst
Original file line number Diff line number Diff line change
@@ -1,34 +1,7 @@
*************************
Signal Processing Modules
*************************
*********************
Signal Pre-Processing
*********************

.. automodule:: miv.signal.filter.filter_collection

Filter
######

.. currentmodule:: miv.signal.filter

.. automodule:: miv.signal.filter

.. autosummary::
:nosignatures:
:toctree: _toctree/FilterAPI

FilterProtocol
ButterBandpass
FilterCollection

Spike Detection
###############

.. automodule:: miv.signal.spike

.. autosummary::
:nosignatures:
:toctree: _toctree/DetectionAPI

SpikeDetectionProtocol
ThresholdCutoff

Spike Sorting
#############
.. automodule:: miv.signal.spike.detection
5 changes: 5 additions & 0 deletions docs/api/sorting.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
********************
Spike Sorting Module
********************

.. automodule:: miv.signal.spike.sorting
36 changes: 0 additions & 36 deletions docs/api/statistics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,4 @@
Statistics Modules
******************

Statistics Tools
================

Spikestamps
-----------

.. currentmodule:: miv.statistics

.. automodule:: miv.statistics.summarizer

.. autosummary::
:nosignatures:
:toctree: _toctree/StatisticsAPI

StatisticsSummary

Useful External Packages
########################

scipy statistics
================

`scipy <https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.describe.html>`_

.. autosummary::

scipy.stats.describe

elephant.statistics
===================

`elephant documentation: <https://elephant.readthedocs.io/en/latest/reference/statistics.html>`_

.. autosummary::

elephant.statistics.mean_firing_rate
elephant.statistics.instantaneous_rate
48 changes: 48 additions & 0 deletions docs/api/visualization.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
*******************
Visualization Tools
*******************

Plotting Tools
==============

DFT Plot
--------

.. currentmodule:: miv.visualization

.. automodule:: miv.visualization.fft_domain

.. autosummary::
:nosignatures:
:toctree: _toctree/VisualizationAPI

plot_frequency_domain

Spike Waveform Overlap
----------------------

.. currentmodule:: miv.visualization

.. automodule:: miv.visualization.waveform

.. autosummary::
:nosignatures:
:toctree: _toctree/VisualizationAPI

extract_waveforms
plot_waveforms

Useful External Packages
========================

Here are few external `python` packages that can also be used for visualization.

Viziphant
---------

`viziphant (elephant) documentation: <https://viziphant.readthedocs.io/en/latest/modules.html>`_

.. autosummary::

viziphant.rasterplot.rasterplot
viziphant.rasterplot.rasterplot_rates
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
# 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,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_static_path = ["_static", "_static/assets"]
html_css_files = ["css/*", "css/logo.css"]

# -- Options for numpydoc ---------------------------------------------------
Expand Down
Loading

0 comments on commit fd75a1f

Please sign in to comment.