sem#

sem(im, axis=0)[source]#

Simulates an SEM image looking into the porous material.

Features are colored according to their depth into the image, so darker features are further away.

Parameters:
  • im (array_like) – ndarray of the porous material with the solid phase marked as 1 or True

  • axis (int) – Specifes the axis along which the camera will point.

Returns:

image – A 2D greyscale image suitable for use in matplotlib’s imshow function.

Return type:

ndarray

Examples

Click here to view online example.