Metadata-Version: 2.1
Name: opeth
Version: 0.1a1
Summary: Online Peri-Event Histogram for Open Ephys ZMQ plugin
Home-page: https://github.com/hangyabalazs/opeth
Author: Andras Szell
Author-email: szell.andris@gmail.com
License: UNKNOWN
Project-URL: Documentation, https://opeth.readthedocs.io/en/latest
Project-URL: Source, https://github.com/hangyabalazs/opeth
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Description-Content-Type: text/x-rst
Requires-Dist: pyqtgraph
Requires-Dist: pyzmq
Requires-Dist: enum ; python_version < "3"
Requires-Dist: python-qt5 ; python_version < "3"
Requires-Dist: pyqt5 ; python_version >= "3"

OPETH
=====

More detailed documentation: https://opeth.readthedocs.io/

.. rtd-inclusion-marker-do-not-remove

Online Peri-Event Time Histogram for `Open Ephys <http://www.open-ephys.org/gui>`_.

Performs spike detection based on raw Open Ephys data exported via `ZeroMQ <https://zeromq.org>`_. 
Requires triggers from Open Ephys for histogram display as spikes are detected around them.

Usage
-----

- Needs `ZMQInterface plugin <https://github.com/bandita137/ZMQInterface>`_ (e.g. in the Open Ephys plugin folder). 
  For Windows a `precompiled dll <https://github.com/bandita137/ZMQInterface/releases/download/v0.2-pre/ZMQInterface.dll>`_ is present. 
- Set up Open Ephys with ZMQInterface plugin. Plugin is recommended to be put after bandpass 
  filter and/or common average reference filter, but spike detector is not required.
- Start with the ``opeth`` command if using the pip package or start with ``python opeth/gui.py`` if running from sources.

Installation
------------

Install the opeth package for Python 2.7 or Python <=3.7 with pip::

    pip install opeth

Python 3.8 support is partially broken as of February 2020.

Dependencies
^^^^^^^^^^^^

Required non-default packages: pyzmq, pyqtgraph plus one of the qt versions for pyqtgraph, preferably PyQt5,
and also their dependencies (e.g. numpy).

Running from sources
--------------------

After cloning the git repository or extracting a source zip file, multiple methods could work.

Setting up python environment with conda
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Conda builds are not available yet.

Using conda/miniconda, create an ``opeth`` environment issuing the following command in the root dir of opeth::

    conda env create --file environment.yml 

which will install all necessary prerequisites for Python 3.7.

Using python 3.8 is not recommended (Feb 2020) as some bugs are need to be addressed (most probably residing in pyqtgraph),
but possible using the conda-forge version of pyqtgraph::

    conda env create --file env38.yml

Activate the new environment with the command

::

    conda activate opeth

and once activated you may start OPETH with

::

    python opeth/gui.py

Setting up python environment with pip
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Python 3.7 dependencies can be installed with the command

::

    pip install -r requirements.txt


Contributors
------------

Developed by Andras Szell (szell.andris@gmail.com) and other Hangyalab members (http://hangyalab.koki.hu/).

Open Ephys ZMQ plugin connection is based on 
`sample python scripts <https://github.com/MemDynLab/ZMQInterface/tree/master/python_clients>`_ created by Francesco Battaglia.

License
-------

GNU General Public License v3.0 or later.

See `LICENSE <https://github.com/hangyabalazs/opeth/blob/master/LICENSE>`_ for the full text.


