Skip to main content

Pade-Partial Fraction Approximation

This package is an implementation of the Pade-partial fraction approximation for the inversion of the Laplace transform as proposed in Computation of the Distribution of the Absorption Time of the Drifted Diffusion with Stochastic Resetting and Mixed Boundary Conditions by Turin, Magalang, Aguilar, Colombani, Sanchez-Taltavull, and Gatto1

Installation

Install the package from PyPI:

pip install ppf_approx

Usage

The main function of this package is the ppf function, with the following syntax:

ppf(m_ord, n_ord, v, D, x0, r, tval, correction = True)

Here is a description of each argument:

  • m_ord : Integer. Numerator order of the Pade approximation.
  • n_ord : Integer. Denominator order of the Pade approximation.
  • v : Float. Drift constant.
  • D : Float. Diffusion constant. Must be positive.
  • x0 : Float. Initial position. Must be from $0 \leq x_0 < 1$
  • r : Float. Resetting constant. Must be non-negative.
  • tval : Array. Range of time values at which the PPF will be performed. Single values are accepted.
  • correction : Boolean, optional. Determines whether the PPF will perform the correction steps or not. The default is True.

The function can be used to generate whole distributions $t \in [0, \infty]$, segments $t \in [t_1, t_2]$, or single values of time $t$. The outputs will always be in arrays. This is an example of the usage of the ppf function:

import numpy as np
import ppf_approx

v = -0.01
D = 0.0001
x0 = 0.8
r = (1/3)*(1/365)
tvals = np.linspace(0,200, 10)

app_fptvals = ppf(2, 3, v, D, x0, r, tvals)

Sample output:

>>> app_fptvals
array([0., 0., 0.01115898, 0.01866108, 0.01345554, 0.00637309, 0.00200653, 0.00027748, 0., 0.])

Auxiliary Functions

This package also contains auxiliary functions which are expressions for the bounded and biased Brownian motion with stochastic resetting that were derived in the reference1:

  1. lt_fptd computes for the Laplace-transformed FPT distribution.
  2. mfpt computes for the analytical mean FPT from the Laplace-transformed FPT distribution.

Written with StackEdit.

  1. Turin, R., Magalang, J., Aguilar, J., Colombani, L., Sanchez-Taltavull, D., & Gatto, R. (2024). Computation of the distribution of the absorption time of the drifted diffusion with stochastic resetting and mixed boundary conditions (arXiv:2311.03939). arXiv. https://doi.org/10.48550/arXiv.2311.03939 ↩ ↩2

Metadata

Release files for ppf-approx 0.1.2

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

Source distribution (sdist)

Source distribution for ppf-approx 0.1.2
File Size Uploaded
ppf_approx-0.1.2.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ppf-approx 0.1.2
File Interpreter ABI Platform
ppf_approx-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / ppf_approx-0.1.2.tar.gz

Download URL ppf_approx-0.1.2.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
04eeb3fd1396e2079d377dd9af805ca1ee562cf7810c69e9e0f63ba7dbd3ba44
BLAKE2b-256 checksum
How to use checksums
0c5beef7f06054cf5d9dba79238993ff5530e2b4d706c1ed3237b37016cc09cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / ppf_approx-0.1.2-py3-none-any.whl

Download URL ppf_approx-0.1.2-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0878122e62e09e887b7b74f8426cca5c9f27a00a64829f758315cddefba3eb74
BLAKE2b-256 checksum
How to use checksums
42c06087a026c7a46ef70f794e6225121e1e0f00745624304362338fdedf43af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.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