Skip to main content

Irreversibility Tests Library

The assessment of time irreversibility is the assessment of the lack of invariance of the statistical properties of a system under the operation of time reversal. As a simple example, suppose a movie of an ice cube melting in a glass, and one with the ice cube forming from liquid water: an observer can easily decide which one is the original and which the time-reversed one; in this case, the creation (or destruction) of entropy is what makes the process irreversible. On the other hand, the movement of a pendulum and its time-reversed version are undistinguishable, and hence the dynamics is reversible.

Irreversible dynamics have been found in many real-world systems, with alterations being connected to, for instance, pathologies in the human brain, heart and gait, or to inefficiencies in financial markets. Assessing irreversibility in time series is not an easy task, due to its many aetiologies and to the different ways it manifests in data.

This is a library that will (hopefully) make your life easier when it comes to the analysis of the irreversibility of real-world time series. It comprises a large number of tests (not all existing ones, but we are quite close to that); and utilities to simply the whole process.

This library (v1.1) is described in the paper:

M. Zanin irreversibility: A Python Package for Assessing and Manipulating the Time Irreversibility of Real-World Time Series. Entropy, 27(11), 1146. https://doi.org/10.3390/e27111146

If you are interested in the concept of irreversibility, you may start from our papers:

M. Zanin, D. Papo. Tests for assessing irreversibility in time series: review and comparison. Entropy 2021, 23(11), 1474. https://www.mdpi.com/1099-4300/23/11/1474

Zanin, M., & Papo, D. (2025). Algorithmic Approaches for Assessing Multiscale Irreversibility in Time Series: Review and Comparison. Entropy, 27(2), 126. https://www.mdpi.com/1099-4300/27/2/126

Setup

This package can be installed from PyPI using pip:

pip install irreversibility

This will automatically install all the necessary dependencies as specified in the pyproject.toml file.

Getting started

Check the files Example_*.py for examples on how to use each test, and also here.

Information about all methods, parameters, and other relevant issues can be found both in the previous papers, and in the wiki: Go to the wiki. You can also check our take on the question: why there are so many tests?

Note that all implementations have been developed in-house, and as such may contain errors or inefficient code; we welcome readers to send us comments, suggestions and corrections, using the "Issues" feature.

Full documentation

Additional topics:

Change log

See the Version History section of the Wiki for details.

Acknowledgements

This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 851255).

This work was partially supported by the María de Maeztu project CEX2021-001164-M funded by the MICIU/AEI/10.13039/501100011033 and FEDER, EU.

This work was partially supported by grant CNS2023-144775 funded by MICIU/AEI/10.13039/501100011033 by "European Union NextGenerationEU/PRTR".

Metadata

Release files for irreversibility 1.4.0

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

Source distribution (sdist)

Source distribution for irreversibility 1.4.0
File Size Uploaded
irreversibility-1.4.0.tar.gz 58.6 kB Details

Built distribution (wheel)

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

Total release size: 148.9 kB

Release files / irreversibility-1.4.0.tar.gz

Download URL irreversibility-1.4.0.tar.gz
Size 58.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e3f16ad3713712b17526ab185d0848ba5808c6fbfdace03531bb242ed62b7ffc
BLAKE2b-256 checksum
How to use checksums
7b49cf11444c8fbb22198d0ee119304caa0c4e848f221907e37dc14c685ab9c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / irreversibility-1.4.0-py3-none-any.whl

Download URL irreversibility-1.4.0-py3-none-any.whl
Size 90.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4ef01d77c80d611d7660783d130ef113de4c715db9452c97224344e1432735c
BLAKE2b-256 checksum
How to use checksums
a8af7151f9b8ac47d731d943f236584b43d3eecc74c2a9fef556654748952bc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.3

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

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