IO info of dual function
@@ -7,6 +7,27 @@ from porespy.tools import extend_slice
def dual(net=None, solid_dt=None):
+ r"""
+ Extract bond and site information of solid and fluid phase.
+
+ Parameters:
+ -----------
+ net: Dictonary
+ A network dictionay generated by extract_pore_network function with dual
+ value set to True.
+
+ solid_dt: ND-array
+ The distance transform of the solid space. If not given it will be
+ calculated, but it can save time to provide one if available.
+
+ Returns:
+ --------
+ A dictionary containing all the bond and site size data, as well as the
+ network topological information. The dictionary names use the OpenPNM
+ convention (i.e. 'pore.coords', 'throat.conns') so it may be converted
+ directly to an OpenPNM network object using the ``update`` command.
+
+ """
print('_'*60)
print('Extracting bond and site information for dual network')
from skimage.morphology import disk, square, ball, cube
@@ -14,7 +35,6 @@ def dual(net=None, solid_dt=None):
im = net['dual.image']
Np = sp.size(net['pore.label'])
s_im = solid_regions*~im # Shows solid labels on solid region
- solid_on_pore = solid_regions*im # Expose solid labels on pores
s_dt = solid_dt
if s_im.ndim == 2:
@@ -30,8 +50,6 @@ def dual(net=None, solid_dt=None):
# Solid on Pore Slices
s_slice = spim.find_objects(s_im) # Slice of Solid region
- # Slice of Solid on pore regions
- solid_on_pore_slice = spim.find_objects(solid_on_pore)
# Solid Space array initialization
Ss = sp.arange(sp.amin(solid_regions), sp.amax(s_im)+1)
