Skip to main content

toelis

ProjectStatus Version BuildStatus License PythonVersions

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 grammar:

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 numpy 1.19+ and has been tested on CPython 3.11-3.14 and PyPy 3.11. To install:

pip install toelis

Or to install from source:

pip 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:

import toelis as tl

files = ('file1.toe_lis', 'file2.toe_lis')
t_merged = tl.merge(*(tl.read(open(fname))[0] for fname in files))
with open('merged.toe_lis', 'w') as fp:
    tl.write(fp, list(tl.subrange(t_merged, 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-2013 C Daniel Meliza. See COPYING for license information.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

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.

Metadata

Release files for toelis 2.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toelis 2.1.5
File Size Uploaded Provenance
toelis-2.1.5.tar.gz 14.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for toelis 2.1.5
File Interpreter ABI Platform
toelis-2.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 27.2 kB

Release files / toelis-2.1.5.tar.gz

Download URL toelis-2.1.5.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8a569991c98c767fc3ddb099fe9612e219f619c11c18557412b709da5bd4aec6
BLAKE2b-256 checksum
How to use checksums
8dcd414098a26286d070f82bb8ff4850be89d3985fc990cc9ae1cefa84419a1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / toelis-2.1.5-py3-none-any.whl

Download URL toelis-2.1.5-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89ecec8da9df1c07e0745686583f8b99926f8787bf283b9fcb73dd91b93910e9
BLAKE2b-256 checksum
How to use checksums
d22c2222049382697d7264c63ed06bc029b32e0161aa7089f2457c6e6339c74a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for toelis 2.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for toelis-2.1.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page