density
- variable_vs_density(x, y, dx, x_param, y_param, param, box_size[, z=None, z_param=None, mode='2D', get_density=False])
Finds the relationship between a variable and the density of points.
- Parameters:
x (array) – Cartesian coordinates.
y (array) – Cartesian coordinates.
z (array) – Cartesian coordinates.
x_param (array) – The positions associated with the measured parameter.
y_param (array) – The positions associated with the measured parameter.
z_param (array) – The positions associated with the measured parameter.
param (array) – An array of the input parameter.
dx (float) – The size of each cell in each axis.
box_size (float) – The size of the box along one axis.
mode (str) – ‘2D’ or ‘3D’.
get_density (bool) – If true will output the density of particles.
- Returns:
Returns a tuple of the following:
mean_param (array) – The mean of the parameter in each cell.
density (array) – The density of points in each cell.