- size_to_satn(size, im=None, bins=None)#
Converts an image of invasion size values into saturations.
This is meant to accept the output of the
size (ndarray) – The image containing invasion size values in each voxel.
im (ndarray, optional) – A binary image of the porous media, with
Trueindicating the void space and
Falseindicating the solid phase. If not given then it is assumed that the solid is identified as
size == 0.
bins (array_like or int (optional)) – The bins to use when converting sizes to saturation. The default is to create 1 bin for each unique value in
size. If an int is supplied it is interpreted as the number of bins between 0 and the maximum value in
size. If an array is supplied it is used as the bins directly.
satn – An ndarray the same size as
seqbut 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.