Skip to main content

Generate, manage and analyze anomalous diffusion trajectories.

Project description

The anomalous diffusion library

Generate, manage and analyze anomalous diffusion trajectories

PyPI version PyPI version Python version

Get started \| Documentation \| Tutorials \| Cite us \| License

This library has been created in the framework of the Anomalous Diffusion (AnDi) Challenge and allows to create trajectories and datasets from various anomalous diffusion models. You can install the package using:

pip install andi-datasets

You can then import the package in a Python3 environment using:

import andi_datasets

In Octobre 2022, the library undergone major changes leading to version 2.0.0. You can check the realese notes here.

1st AnDi Challenge (2020)

The first AnDi challenge was held between March and November 2020 and focused on the characterization of trajectories arising from different theoretical diffusion models under various experimental conditions. The results of the challenge are published in this article: Muñoz-Gil et al., Nat Commun 12, 6253 (2021).

If you want to reproduce the datasets used during the challenge, please check this tutorial. You can then test your predictions and compare them with the those of challenge participants in this online interactive tool.

2nd AnDi Challenge (2023)

We are currently preparing the second edition of the AnDi Challenge. Stay tuned, more info will be announced soon in Twitter. If you want to start playing with the new phenomenological diffusion models on which the challenge will be based, you can check this tutorial.

Library organization

The andi_datasets class allows to generate, transform, analyse, save and load diffusion trajectories from a plethora of diffusion models and experimental generated with various diffusion models. The library is structured in two main blocks, containing either theoretical or phenomenological models. Here is a scheme of the library’s content:

Theoretical models

The library allows to generate trajectories from various anomalous diffusion models: continuous-time random walk (CTRW), fractional Brownian motion (FBM), Lévy walks (LW), annealed transit time model (ATTM) and scaled Brownian motion (SBM). You can generate trajectories with the desired anomalous exponent in either one, two or three dimensions.

Examples of their use and properties can be found in this tutorial.

Phenomenological models

We have also included models specifically developed to simulate realistic physical systems, in which random events alter the diffusion behaviour of the particle. The sources of these changes can be very broad, from the presence of heterogeneities either in space or time, the possibility of creating dimers and condensates or the presence of immobile traps in the environment.

Examples of their use and properties can be found in this tutorial.


The AnDi challenge is a community effort, hence any contribution to this library is more than welcome. If you think we should include a new model to the library, you can contact us in this mail: You can also perform pull-requests and open issues with any feedback or comments you may have.

Cite us

If you found this package useful and used it in your projects, you can use the following to directly cite the package:

Muñoz-Gil, G., Requena B., Volpe G., Garcia-March M.A. and Manzo C.
AnDiChallenge/ANDI_datasets: Challenge 2020 release (v.1.0). Zenodo (2021).

Or you can cite the paper this package was developed for:

Muñoz-Gil, G., Volpe, G., Garcia-March, M.A. et al. 
Objective comparison of methods to decode anomalous diffusion. 
Nat Commun 12, 6253 (2021).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

andi_datasets-2.0.4.tar.gz (63.2 kB view hashes)

Uploaded source

Built Distribution

andi_datasets-2.0.4-py3-none-any.whl (64.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page