Skip to main content

A package to simulate Fractional Brownian walks on a comb-like structure.

Project description

.. |version| image:: https://img.shields.io/pypi/v/comb-model?style=plastic :alt: PyPI
:target: https://pypi.org/project/comb-model/
:scale: 100%
.. |license| image:: https://img.shields.io/github/license/lgaalves/combmodel?style=plastic :alt: GitHub
:target: https://github.com/lgaalves/CombMolde/blob/master/license.rst
:scale: 100%
.. |downloads| image:: https://img.shields.io/pypi/dm/comb-model?style=plastic :alt: PyPI - Downloads
:target: https://pypi.org/project/comb-model/
:scale: 100%
.. |docs| image:: https://readthedocs.org/projects/comb-model/badge/?version=latest
:target: https://comb-model.readthedocs.io/?badge=latest
:alt: Documentation Status
:scale: 100%


|version| |license| |downloads| |docs|


comb-model: A package to simulate Fractional Brownian walks on a comb-like structure.
==========================================================================================

This package simulate trajectories of the comb model via Langevin equations driven by fractional Gaussian noises (long-range correlated).

If you have used ``comb-model`` in a scientific publication, we would appreciate citations to the following reference [#ribeiro2014]_:

- Haroldo V. Ribeiro, Angel A. Tateishi, Luiz G. A. Alves, Rafael S. Zola, Ervin K Lenzi (2014). `Investigating the interplay between mechanisms of anomalous diffusion via fractional Brownian walks on a comb-like structure <http://dx.doi.org/10.1088/1367-2630/16/9/093050>`_. New Journal of Physics 16, 093050




.. figure:: https://raw.githubusercontent.com/lgaalves/combmodel/main/figures/featured.png
:height: 489px
:width: 633px
:scale: 80 %
:align: center


For more detailed information about the methods functions in ``comb-model``, please
consult its `documentation <https://comb-model.readthedocs.io/en/latest/index.html>`_.


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

The ``comb-model`` package is available on pypi and can be installed using pip

.. code-block:: shell

pip install comb-model

Dependencies
~~~~~~~~~~~~
* ``numpy``
* ``stochastic``
* ``tdqm``

Processes
---------

This package offers functions to simulate Fractional Brownian walks on a plane or Comb-like structures via via Langevin equations.


.. code-block:: python

# Fractional Brownian walks on a plane

import matplotlib.pyplot as plt
from combmodel import langevin_fbn

x,y=langevin_fbn(x0=0,y0=0,betax=1,betay=1,hurstx=0.5,hursty=0.5,tmax=1000,disable_tqdm=True)


f, ax = plt.subplots(nrows=1, ncols=1, figsize=(9.1,7))
ax.plot(x,y,color='#D62728',markersize=0,linewidth=2)
ax.set_xlabel(r'Position, $x(t)$')
ax.set_ylabel(r'Position, $y(t)$')

.. figure:: https://raw.githubusercontent.com/lgaalves/combmodel/main/figures/fbm.png
:height: 489px
:width: 633px
:scale: 80 %
:align: center


.. code-block:: python

# Fractional Brownian walks on a Comb-like structure

import matplotlib.pyplot as plt
from combmodel import comb_model

x, y = comb_model(x0=0,y0=0,betax=1,betay=1,hurstx=0.5,hursty=0.5,tmax=5000,eps=1,disable_tqdm=True)

f, ax = plt.subplots(nrows=1, ncols=1, figsize=(9.1,7))
ax.plot(x,y,color='#D62728',markersize=0,linewidth=2)
ax.set_xlabel(r'Position, $x(t)$')
ax.set_ylabel(r'Position, $y(t)$')

.. figure:: https://raw.githubusercontent.com/lgaalves/combmodel/main/figures/comb.png
:height: 489px
:width: 633px
:scale: 80 %
:align: center


References
==========

.. [#ribeiro2014] Haroldo V. Ribeiro, Angel A. Tateishi, Luiz G. A. Alves, Rafael S. Zola, Ervin K Lenzi (2014). `Investigating the interplay between mechanisms of anomalous diffusion via fractional Brownian walks on a comb-like structure <http://dx.doi.org/10.1088/1367-2630/16/9/093050>`_. New Journal of Physics 16, 093050

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

comb-model-1.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distributions

comb_model-1.0.1-py3.10.egg (7.1 kB view details)

Uploaded Source

comb_model-1.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file comb-model-1.0.1.tar.gz.

File metadata

  • Download URL: comb-model-1.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for comb-model-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4fe56e2c647208a003171ed8e2e508c3b1cc2625c5d3b707ecd4aa99ccb3ae85
MD5 a38221da49c82849fe7931116d869fb1
BLAKE2b-256 3a061dffcd8c331802c8e7d3e7c609ac6184d709f1734a40bf1167fdf0008452

See more details on using hashes here.

File details

Details for the file comb_model-1.0.1-py3.10.egg.

File metadata

  • Download URL: comb_model-1.0.1-py3.10.egg
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for comb_model-1.0.1-py3.10.egg
Algorithm Hash digest
SHA256 7f1ecd867f95dedde67a8021f5c5d547c2e49c04a612860562eebbd9e5a5886c
MD5 571e055358031c83ba08545ed77f380e
BLAKE2b-256 6211a7cb852cfdc4c9975682c8424ab3f89e5e26bd6b957f9f7edd6eb0c1d188

See more details on using hashes here.

File details

Details for the file comb_model-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: comb_model-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for comb_model-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5a652a906d0d0f34190ca38e4e340c3a6456a1c29b0c900aa0b25dd1b41c8029
MD5 f0217268447300247152f57289cd858a
BLAKE2b-256 71ec260b4cc313443ba38b6bbb0264bd99182e161f78f3cf01b510c527871815

See more details on using hashes here.

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