Density.surface_coordinates#

Density.surface_coordinates(density_boundaries, method='ConvexHull')[source]#

Calculates the surface coordinates of the class instance using different boundary and surface detection methods. This method is relevant for determining coordinates used in non-exhaustive template matching, see tme.matching_optimization.optimize_match.

Parameters:
density_boundariestuple

Lower and upper bound of density values to be considered (can be obtained from Density.density_boundary()).

methodstr, optional

Method to use for surface coordinate computation

ConvexHull

Use the lower bound density convex hull vertices.

Weight

Use all coordinates within density_boundaries.

Sobel

Set densities below the lower bound density to zero apply a sobel filter and return density coordinates larger than 0.5 times the maximum filter value.

Laplace

Like ‘Sobel’, but with a Laplace filter.

Minimum

Like ‘Sobel’ and ‘Laplace’ but with a spherical minimum filter on the lower density bound.

Returns:
NDArray

An array of surface coordinates with shape (points, dimensions).

Raises:
ValueError

If the chosen method is not available.

References

[1]

Cragnolini T, et al. (2021) Acta Crys Sect D Struct Biol