simulation {AIUQ}R Documentation

Simulate 2D particle movement

Description

Simulate 2D particle movement from a user selected stochastic process, and output intensity profiles.

Usage

simulation(
  sz = c(200, 200),
  len_t = 200,
  M = 50,
  model_name = "BM",
  noise = "gaussian",
  I0 = 20,
  Imax = 255,
  pos0 = matrix(NaN, nrow = M, ncol = 2),
  rho = 0.95,
  H = 0.3,
  sigma_p = 2,
  sigma_bm = 1,
  sigma_ou = 2,
  sigma_fbm = 2
)

Arguments

sz

frame size of simulated image with default c(200,200).

len_t

number of time steps with default 200.

M

number of particles with default 50.

model_name

stochastic process simulated, options from ('BM','OU','FBM','OU+FBM'), with default 'BM'.

noise

background noise, options from ('uniform','gaussian'), with default 'gaussian'.

I0

background intensity, value between 0 and 255, with default 20.

Imax

maximum intensity at the center of the particle, value between 0 and 255, with default 255.

pos0

initial position for M particles, matrix with dimension M by 2.

rho

correlation between successive step and previous step in O-U process, value between 0 and 1, with default 0.95.

H

Hurst parameter of fractional Brownian Motion, value between 0 and 1, with default 0.3.

sigma_p

radius of the spherical particle (3sigma_p), with default 2.

sigma_bm

distance moved per time step in Brownian Motion, with default 1.

sigma_ou

distance moved per time step in Ornstein–Uhlenbeck process, with default 2.

sigma_fbm

distance moved per time step in fractional Brownian Motion, with default 2.

Value

Returns an S4 object of class simulation.

Author(s)

Yue He [aut], Xubo Liu [aut], Mengyang Gu [aut, cre]

References

Gu, M., He, Y., Liu, X., & Luo, Y. (2023). Ab initio uncertainty quantification in scattering analysis of microscopy. arXiv preprint arXiv:2309.02468.

Gu, M., Luo, Y., He, Y., Helgeson, M. E., & Valentine, M. T. (2021). Uncertainty quantification and estimation in differential dynamic microscopy. Physical Review E, 104(3), 034610.

Cerbino, R., & Trappe, V. (2008). Differential dynamic microscopy: probing wave vector dependent dynamics with a microscope. Physical review letters, 100(18), 188102.

Examples

library(AIUQ)
# -------------------------------------------------
# Example 1: Simple diffusion for 200 images with
#            200 by 200 pixels and 50 particles
# -------------------------------------------------
sim_bm = simulation()
show(sim_bm)

# -------------------------------------------------
# Example 2: Simple diffusion for 100 images with
#            100 by 100 pixels and slower speed
# -------------------------------------------------
sim_bm = simulation(sz=100,len_t=100,sigma_bm=0.5)
show(sim_bm)

# -------------------------------------------------
# Example 3: Ornstein-Uhlenbeck process
# -------------------------------------------------
sim_ou = simulation(model_name="OU")
show(sim_ou)

[Package AIUQ version 0.5.1 Index]