spherical_contact_distribution#

spherical_contact_distribution(domain, population, include_boundaries=None, exclude_boundaries=None, boundary_exclude_distance=0, remain_within_connected_component=False, as_hardcore=False, hardcore_radius=1, visualise_output=False, visualise_output_fig_kwargs={})#

Calculate the spherical contact distribution for a given population within a domain. Points are randomly sampled within the boundaries of the domain and the distribution of distances between each point and the nearest point in the population is calculated. If as_hardcore is True, the points are placed using a hardcore process such that no two random points are closer than 2 * hardcore_radius.

Parameters:
domainmuspan Domain object

The domain in which the point pattern is observed.

populationquery-like, optional

Query-like specifying the population of objects to analysis. Can be a list or array of object indices, a muspan query, or None to include all objects. Default is None.

include_boundariesquery-like, optional

Query specifying the external boundaries to run computations within. Can be a list or array of object indices, a muspan query, or None to use the entire domain. Default is None.

exclude_boundariesquery-like, optional

Query specifying the internal boundaries (i.e., excluded regions within the shapes defined by include_boundaries) within which to exclude from analyse. Can be a list or array of object indices, a muspan query, or None. Default is None.

boundary_exclude_distancefloat, optional

Buffer to exclude objects located within boundary_exclude_distance from the boundaries. Defaults to 0.

remain_within_connected_componentbool, optional

If True, the nearest neighbour distances are calculated within connected components. Default is False.

as_hardcorebool, optional

If True, randomly sampled points are placed using a hardcore process. Default is False.

hardcore_radiusfloat, optional

The hardcore radius for the hardcore process such that no two random points are closer than 2 * hardcore_radius. Default is 10.

visualise_outputbool, optional

If True, plot the SCD. Defaults to False.

visualise_output_fig_kwargsdict, optional

Dictionary to pass to figure creation if visualise_output is True.

Returns:
observed_nearest_distancesnumpy.ndarray

An array of the nearest neighbour distances from randomly sampled points to the specified population within the prescribed boundaries.