# pointpats.random.cluster_poisson

pointpats.random.cluster_poisson(hull, intensity=None, size=None, n_seeds=2, cluster_radius=None, rng=None)

  Simulate a cluster poisson random point process with a specified intensity & number of seeds. A cluster poisson process is a poisson process where the center of each “cluster” is itself distributed according to a spatial poisson process.

  Parameters:
    hull A geometry-like object

      This encodes the “space” in which to simulate the normal pattern. All points will lie within this hull. Supported values are: - a bounding box encoded in a numpy array as numpy.array([xmin, ymin, xmax, ymax]) - an (N,2) array of points for which the bounding box will be computed & used - a shapely polygon/multipolygon - a scipy convexh hull

    intensity float

      the number of observations per unit area in the hull to use. If provided, then size must be an integer describing the number of replications to use.

    size tuple or int

      a tuple of (n_observations, n_replications), where the first number is the number of points to simulate in each replication and the second number is the number of total replications. So, (10, 4) indicates 10 points, 4 times. If an integer is provided and intensity is None, n_replications is assumed to be 1. If size is an integer and intensity is also provided, then size indicates n_replications, and the number of observations is computed from the intensity.

    n_seeds int

      the number of sub-clusters to use.

    cluster_radius float or iterable

      the radius of each cluster. If a float, the same radius is used for all clusters. If an array, then there must be the same number of radii as clusters. If None, 50% of the minimum inter-point distance is used, which may fluctuate across replications.

    rng int, numpy.random.Generator, or None, optional

      A source of randomness. This can be:

      - A numpy.random.Generator instance (recommended)

      - An int seed, used to initialize a new Generator

      - None (default), which uses a new numpy.random.default_rng() instance

      This interface follows Scientific Python SPEC 7, ensuring consistent and reproducible random number generation across libraries.

  Returns:
    : numpy.ndarray
    either an (n_replications, n_observations, 2) or (n_observations,2) array containing
    the simulated realizations.