seq_to_satn(seq, im=None)[source]#

Converts an image of invasion sequence values to saturation values.

  • seq (ndarray) – The image containing invasion sequence values in each voxel. Solid should be indicated as 0’s and uninvaded voxels as -1.

  • im (ndarray, optional) – A binary image of the porous media, with True indicating the void space and False indicating the solid phase. If not given then it is assumed that the solid is identified as seq == 0.


satn – An ndarray the same size as seq but with sequence values replaced by the fraction of void space invaded at or below the sequence number. Solid voxels and uninvaded voxels are represented by 0 and -1, respectively.

Return type:



Click here to view online example.