toelis


Nametoelis JSON
Version 2.1.3 PyPI version JSON
download
home_pagehttps://github.com/melizalab/toelis
SummaryTime of Event data and file format
upload_time2024-01-13 22:32:39
maintainerDan Meliza
docs_urlNone
authorDan Meliza
requires_python>=3.7
licenseBSD 3-Clause License
keywords neuroscience point process data format
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            toelis
------

|ProjectStatus|_ |Version|_ |BuildStatus|_ |License|_ |PythonVersions|_

.. |ProjectStatus| image:: https://www.repostatus.org/badges/latest/active.svg
.. _ProjectStatus: https://www.repostatus.org/#active

.. |Version| image:: https://img.shields.io/pypi/v/toelis.svg
.. _Version: https://pypi.python.org/pypi/toelis/

.. |BuildStatus| image:: https://github.com/melizalab/toelis/actions/workflows/tests-python.yml/badge.svg
.. _BuildStatus: https://github.com/melizalab/toelis/actions/workflows/tests-python.yml

.. |License| image:: https://img.shields.io/pypi/l/toelis.svg
.. _License: https://opensource.org/license/bsd-3-clause/

.. |PythonVersions| image:: https://img.shields.io/pypi/pyversions/toelis.svg
.. _PythonVersions: https://pypi.python.org/pypi/toelis/


**Toelis** stands for *Time Of Event LISt* and refers to a type of data
consisting of a series of events occurring at discrete times. Each event
is associated with a specific *channel* (i.e. source), and *trial*
(i.e. presentation of a stimulus or set of experimental conditions), and
is defined by a positive or negative temporal from a defined reference
time. This project (1) defines a file format for storing toelis data in
plain text files (original developed by Amish Dave), and (2) contains a
Python module with data structures for storing toelis data and functions
for reading and writing files in the toelis format.

toelis files
------------

Toelis files must be ISO-8859-1 or UTF-8 text encoding, and must have
the format specified by the following
`ABNF <https://tools.ietf.org/html/rfc5234>`__ grammar:

.. code:: abnf

   toelis-file   = num-channels NL num-trials NL *channel-index *channel
   num-channels  = 1*DIGIT
   num-reps      = 1*DIGIT
   channel-index = 1*DIGIT NL           ; starting line for each channel
                                        ; number of channel-index items must equal num-channels
   channel       = event-counts events
   event-counts  = *(1*DIGIT NL)        ; number of events in each repetition
                                        ; number of event-count lines must equal num-reps
   events        = *(time NL)
   time          = [%x1D] 1*DIGIT [%x1E *DIGIT] ; floating point number
   NL            = CR / CRLF / LF       ; all file encodings accepted

The ``time`` elements indicate a positive or temporal interval from an
externally defined reference time (e.g., the onset of a stimulus), and
should be in units of milliseconds.

Informally, the file consists of a series of integers and floating point
numbers on separate lines. The first two lines give the number of
channels and trials in the file. For each channel, there is a line
giving the offset of the channel in the file. These offsets indicate the
start of a block which begins with a series of integers giving the
number of events in each trial, followed by a series of floating point
numbers giving the time of the events. All channels must have the same
number of trials.

python module
-------------

The toelis module requires Python 2.6+ or 3.2+ and numpy 1.3+. To
install:

.. code:: bash

   pip install toelis

Or to install from source:

.. code:: bash

   python setup.py install

The module contains functions for reading and writing toelis files, as
well as for manipulating toelis data, which are represented as lists of
numpy arrays. The functions are well-documented within Python.

An example of loading two files, concatenating the trials, restricting
the trials to a time window, and writing a new file. The functional
programming style allows for compact, expressive syntax:

.. code:: python

   import toelis as tl

   files = ('file1.toe_lis', 'file2.toe_lis')
   t_merged = tl.merge(tl.read(open(fname, 'rU'))[0] for fname in files)
   with open('merged.toe_lis', 'wt') as fp:
       tl.write(fp, tl.subrange(t_merge, 0, 1000))

acknowledgments and license
---------------------------

The toelis format was originally developed by Amish Dave
(http://amishdave.net) for Dan Margoliash’s lab at the University of
Chicago (http://margoliashlab.uchicago.edu). The formalized ABNF grammar
and python implementation were written by Dan Meliza
(http://meliza.org).

Copyright (c) 2006-2012 C Daniel Meliza. See COPYING for license
information.

This Specification and Implementation are distributed in the hope that
it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, see http://www.gnu.org/licenses.

|Build Status|

.. |Build Status| image:: https://travis-ci.org/melizalab/toelis.png?branch=develop
   :target: https://travis-ci.org/melizalab/toelis

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/melizalab/toelis",
    "name": "toelis",
    "maintainer": "Dan Meliza",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "dan@meliza.org",
    "keywords": "neuroscience,point process,data format",
    "author": "Dan Meliza",
    "author_email": "dan@meliza.org",
    "download_url": "https://files.pythonhosted.org/packages/3a/af/86753b3ec8c74a05a307f54d617e1cb3d4591765ddadcd50241d85ea58a1/toelis-2.1.3.tar.gz",
    "platform": null,
    "description": "toelis\n------\n\n|ProjectStatus|_ |Version|_ |BuildStatus|_ |License|_ |PythonVersions|_\n\n.. |ProjectStatus| image:: https://www.repostatus.org/badges/latest/active.svg\n.. _ProjectStatus: https://www.repostatus.org/#active\n\n.. |Version| image:: https://img.shields.io/pypi/v/toelis.svg\n.. _Version: https://pypi.python.org/pypi/toelis/\n\n.. |BuildStatus| image:: https://github.com/melizalab/toelis/actions/workflows/tests-python.yml/badge.svg\n.. _BuildStatus: https://github.com/melizalab/toelis/actions/workflows/tests-python.yml\n\n.. |License| image:: https://img.shields.io/pypi/l/toelis.svg\n.. _License: https://opensource.org/license/bsd-3-clause/\n\n.. |PythonVersions| image:: https://img.shields.io/pypi/pyversions/toelis.svg\n.. _PythonVersions: https://pypi.python.org/pypi/toelis/\n\n\n**Toelis** stands for *Time Of Event LISt* and refers to a type of data\nconsisting of a series of events occurring at discrete times. Each event\nis associated with a specific *channel* (i.e.\u00a0source), and *trial*\n(i.e.\u00a0presentation of a stimulus or set of experimental conditions), and\nis defined by a positive or negative temporal from a defined reference\ntime. This project (1) defines a file format for storing toelis data in\nplain text files (original developed by Amish Dave), and (2) contains a\nPython module with data structures for storing toelis data and functions\nfor reading and writing files in the toelis format.\n\ntoelis files\n------------\n\nToelis files must be ISO-8859-1 or UTF-8 text encoding, and must have\nthe format specified by the following\n`ABNF <https://tools.ietf.org/html/rfc5234>`__ grammar:\n\n.. code:: abnf\n\n   toelis-file   = num-channels NL num-trials NL *channel-index *channel\n   num-channels  = 1*DIGIT\n   num-reps      = 1*DIGIT\n   channel-index = 1*DIGIT NL           ; starting line for each channel\n                                        ; number of channel-index items must equal num-channels\n   channel       = event-counts events\n   event-counts  = *(1*DIGIT NL)        ; number of events in each repetition\n                                        ; number of event-count lines must equal num-reps\n   events        = *(time NL)\n   time          = [%x1D] 1*DIGIT [%x1E *DIGIT] ; floating point number\n   NL            = CR / CRLF / LF       ; all file encodings accepted\n\nThe ``time`` elements indicate a positive or temporal interval from an\nexternally defined reference time (e.g., the onset of a stimulus), and\nshould be in units of milliseconds.\n\nInformally, the file consists of a series of integers and floating point\nnumbers on separate lines. The first two lines give the number of\nchannels and trials in the file. For each channel, there is a line\ngiving the offset of the channel in the file. These offsets indicate the\nstart of a block which begins with a series of integers giving the\nnumber of events in each trial, followed by a series of floating point\nnumbers giving the time of the events. All channels must have the same\nnumber of trials.\n\npython module\n-------------\n\nThe toelis module requires Python 2.6+ or 3.2+ and numpy 1.3+. To\ninstall:\n\n.. code:: bash\n\n   pip install toelis\n\nOr to install from source:\n\n.. code:: bash\n\n   python setup.py install\n\nThe module contains functions for reading and writing toelis files, as\nwell as for manipulating toelis data, which are represented as lists of\nnumpy arrays. The functions are well-documented within Python.\n\nAn example of loading two files, concatenating the trials, restricting\nthe trials to a time window, and writing a new file. The functional\nprogramming style allows for compact, expressive syntax:\n\n.. code:: python\n\n   import toelis as tl\n\n   files = ('file1.toe_lis', 'file2.toe_lis')\n   t_merged = tl.merge(tl.read(open(fname, 'rU'))[0] for fname in files)\n   with open('merged.toe_lis', 'wt') as fp:\n       tl.write(fp, tl.subrange(t_merge, 0, 1000))\n\nacknowledgments and license\n---------------------------\n\nThe toelis format was originally developed by Amish Dave\n(http://amishdave.net) for Dan Margoliash\u2019s lab at the University of\nChicago (http://margoliashlab.uchicago.edu). The formalized ABNF grammar\nand python implementation were written by Dan Meliza\n(http://meliza.org).\n\nCopyright (c) 2006-2012 C Daniel Meliza. See COPYING for license\ninformation.\n\nThis Specification and Implementation are distributed in the hope that\nit will be useful, but WITHOUT ANY WARRANTY; without even the implied\nwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along\nwith this program; if not, see http://www.gnu.org/licenses.\n\n|Build Status|\n\n.. |Build Status| image:: https://travis-ci.org/melizalab/toelis.png?branch=develop\n   :target: https://travis-ci.org/melizalab/toelis\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License",
    "summary": "Time of Event data and file format",
    "version": "2.1.3",
    "project_urls": {
        "Homepage": "https://github.com/melizalab/toelis"
    },
    "split_keywords": [
        "neuroscience",
        "point process",
        "data format"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "899135ecd951e9e61361ff18133573f7b1507b098c247da863711b2c0ee3734e",
                "md5": "28330756865176ce71eb18a089648967",
                "sha256": "9d8adc082d87709a8fcf1798474167cae113a06bc84cfeff57e7f39ccf34582d"
            },
            "downloads": -1,
            "filename": "toelis-2.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "28330756865176ce71eb18a089648967",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 12788,
            "upload_time": "2024-01-13T22:32:37",
            "upload_time_iso_8601": "2024-01-13T22:32:37.531385Z",
            "url": "https://files.pythonhosted.org/packages/89/91/35ecd951e9e61361ff18133573f7b1507b098c247da863711b2c0ee3734e/toelis-2.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3aaf86753b3ec8c74a05a307f54d617e1cb3d4591765ddadcd50241d85ea58a1",
                "md5": "ea865235d97497940cb19020a21327c6",
                "sha256": "48f3954b91165ce2b905e3d75b5e6bc43c1e11e86947b5aff6c910a3b404de00"
            },
            "downloads": -1,
            "filename": "toelis-2.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ea865235d97497940cb19020a21327c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 14644,
            "upload_time": "2024-01-13T22:32:39",
            "upload_time_iso_8601": "2024-01-13T22:32:39.123899Z",
            "url": "https://files.pythonhosted.org/packages/3a/af/86753b3ec8c74a05a307f54d617e1cb3d4591765ddadcd50241d85ea58a1/toelis-2.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-13 22:32:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "melizalab",
    "github_project": "toelis",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "toelis"
}
        
Elapsed time: 0.17365s