masspcf.point_process#
- masspcf.point_process.sample_poisson(shape, dim=2, rate=1.0, lo=None, hi=None, generator=None, dtype=masspcf.pcloud64)#
Sample a homogeneous spatial Poisson point process.
Each element of the returned tensor is a point cloud of shape \((N_i, \text{dim})\) where \(N_i \sim \text{Poisson}(\lambda V)\) and points are drawn uniformly in the hyperrectangle \([\text{lo}, \text{hi}]\). Here \(V\) is the volume of the region.
- Parameters:
shape (tuple of int) – Shape of the output tensor.
dim (int, optional) – Spatial dimension, by default 2.
rate (float, optional) – Intensity \(\lambda\) of the Poisson process, by default 1.0.
lo (array_like, optional) – Lower bounds per spatial dimension. Default is zeros.
hi (array_like, optional) – Upper bounds per spatial dimension. Default is ones.
generator (Generator, optional) – Random number generator. If
None, the global generator is used.dtype (type, optional) –
pcloud32orpcloud64, by defaultpcloud64.
- Returns:
Tensor of point clouds with the given shape.
- Return type: