bbm_simulate_img: Simulate an image series of particles undergoing bounded...

Description Usage Arguments Details Value See Also Examples

Description

Simulate an image series in the style of an ijtiff_img where each frame represents a time-point in bounded Brownian motion. There is the option for the pixel values to be counts of the number of molecules in that pixel, or Poisson photon counts where each particle has a user-defined brightness.

Usage

1
2
bbm_simulate_img(n_particles, D, dim, time_interval = 1, end_time, pixel_size,
  method = c("count", "poisson"), brightness = NULL, init_pos = NULL)

Arguments

n_particles

A natural number. The number of particles to use in the simulation.

D

The diffusivity constant.

dim

A vector giving the dimensions of the simulation space.

time_interval

The time interval between observations.

end_time

The time at which the simulation should end. The last timpoint in the simulation will be before or at this time.

pixel_size

The pixel size for the image. A grid of pixels is filled out over the simulation space, starting at the bottom-left (the origin). Any pixels crossing the boundary of the simulation are discarded.

method

How shall the pixel values be calculated? method = "count" results in each pixel value being a count of the number of particles therein. method = "poisson" results in each particle being treated as a Poisson-emmitter of photons with rate specified in the brightness parameter.

brightness

Required only if method = poisson. The poisson photon emmission rate of the diffusing particles in units of per frame. This is the brightness 'epsilon' referred to in the field of number and brightness, a method in fluorescence fluctuation spectroscopy.

init_pos

An n x d matrix giving the initial positions of the n particles. If this is not set, then a random configuration is generated.

Details

The function bbm_simulation_to_img() converts an existing simulation into an image series. This function does the simulation and creation of image series simultaneously. This is more memory-efficient (but maybe not more time-efficient). This means for some simulations which were impossible to run via bbm_simulate (due to memory constraints), you may still be able to get their associated image series with this function.

Value

An ijtiff_img.

See Also

bbm_simulation_to_img()

Examples

1
2
bbm_simulate_img(n_particles = 2, D = 1.5, dim = c(3, 5), end_time = 2,
                 pixel_size = 1, method = "p", brightness = 9)

rorynolan/brownded documentation built on May 5, 2019, 9:20 a.m.