locan.simulation.simulate_locdata#

Simulate localization data.

This module provides functions to simulate localization data and return LocData objects. Localizations are often distributed either by a spatial process of complete-spatial randomness or following a Neyman-Scott process [1]. For a Neyman-Scott process parent events (representing single emitters) yield a random number of cluster_mu events (representing localizations due to repeated blinking). Related spatial point processes include Matérn and Thomas processes.

Functions that are named as make_* provide point data arrays. Functions that are named as simulate_* provide locdata.

Parts of this code is adapted from scikit-learn/sklearn/datasets/_samples_generator.py . (BSD 3-Clause License, Copyright (c) 2007-2020 The scikit-learn developers.)

References

Functions

make_Matern([parent_intensity, region, ...])

Generate clustered point data following a Matern cluster random point process.

make_NeymanScott([parent_intensity, region, ...])

Generate clustered point data following a Neyman-Scott random point process.

make_Poisson(intensity[, region, seed])

Provide points that are distributed by a uniform Poisson point process within the boundaries given by region.

make_Thomas([parent_intensity, region, ...])

Generate clustered point data following a Thomas random point process.

make_cluster([centers, region, ...])

Parent positions are taken from centers or are distributed according to a homogeneous Poisson process with exactly centers within the boundaries given by region expanded by the expansion_distance.

make_dstorm([parent_intensity, region, ...])

Generate clustered point data following a Thomas-like random point process.

make_uniform(n_samples[, region, seed])

Provide points that are distributed by a uniform (complete spatial randomness) point process within the boundaries given by region.

randomize(locdata[, hull_region, seed])

Transform locdata coordinates into randomized coordinates that follow complete spatial randomness on the same region as the input locdata.

resample(locdata[, n_samples, seed])

Resample locdata according to localization uncertainty.

simulate_Matern([parent_intensity, region, ...])

Generate clustered point data following a Matern cluster random point process.

simulate_NeymanScott([parent_intensity, ...])

Generate clustered point data following a Neyman-Scott random point process.

simulate_Poisson(intensity[, region, seed])

Provide points that are distributed by a uniform Poisson point process within the boundaries given by region.

simulate_Thomas([parent_intensity, region, ...])

Generate clustered point data following a Thomas random point process.

simulate_cluster([centers, region, ...])

Generate clustered point data.

simulate_dstorm([parent_intensity, region, ...])

Generate clustered point data following a Thomas-like random point process.

simulate_frame_numbers(n_samples, lam[, seed])

Simulate Poisson-distributed frame numbers for a list of localizations.

simulate_tracks([n_walks, n_steps, ranges, ...])

Provide a dataset of localizations representing random walks with starting points being spatially-distributed on a rectangular shape or cubic volume by complete spatial randomness.

simulate_uniform(n_samples[, region, seed])

Provide points that are distributed by a uniform Poisson point process within the boundaries given by region.