SMS_BP
Single Molecule Simulations -BP
Loading...
Searching...
No Matches
SMS_BP.fbm_utility Namespace Reference

Functions

 get_fbm_sample (l=1, h=0.5, d=1, n=1)
 

Detailed Description

This module contains functions for generating fractional brownian motion samples and computing the mean squared displacement

Functions:
----------
get_fbm_sample(l=1,h=0.5,d=1,n=1)
    Generates a sample of fractional brownian motion
compute_msd_np(xy, t, t_step)
    Computes the mean squared displacement for a given sample

Author: Baljyot Singh Parmar

Function Documentation

◆ get_fbm_sample()

SMS_BP.fbm_utility.get_fbm_sample ( l = 1,
h = 0.5,
d = 1,
n = 1 )
Generates a sample of fractional brownian motion
Theory: https://en.wikipedia.org/wiki/Fractional_Brownian_motion
Implementation is using the fbm package: https://pypi.org/project/fbm/
Default values are for testing purposes only


Parameters:
-----------
l : float,int
    end time (from 0)
h : float,int  (0 < h < 1)
    hurst parameter, must be between 0 and 1
d : int 
    dimensions (x,y,z .... ) for one realization, must be greater than 0
n : int
    even intervals from 0,l, must be greater than 0

Returns:
--------
list of lists of numpy arrays, where the first list is the time values for each sample, and the second list is the samples themselves

Raises:
-------
TypeError
    If any of the parameters are not of the correct type
ValueError
    If any of the parameters are not of the correct value

Notes:
------
1. The number of samples is equal to the number of dimensions