porespy.generators.conical_capillary#

porespy.generators.conical_capillary(shape, r, axis=0)#

Generates a single conical hole with specified start and stop radii

Parameters:
  • shape (list) – The shape of the image to create

  • r (list of ints or int) – The radii of the beginning and end of the tube. If an int is given the a cylindrical capillary of radius r is created, which is the same as r = [r, r].

  • axis (int) – The axis along with the tube should be oriented

Returns:

im – An image of the specified shape with the conical capillary indicated by True values.

Return type:

ndarray

Notes

It may be useful to stack multiple images together to make converging/diverging cones. This can be done with:

fig, ax = plt.subplots()
c1 = cone([31, 31, 31], r=[15, 3], axis=2)
c2 = cone([31, 31, 31], r=[3, 8], axis=2)
c = np.vstack((c1, c2))
plt.imshow(ps.visualization.xray(c, axis=2))

Examples

Click here to view online example.