stitch#

stitch(network, donor, P_network, P_donor, method='nearest', len_max=inf, label_suffix='', label_stitches='stitched')[source]#

Stitches a second a network to the current network.

Parameters:
  • network (Network) – The Network to which to donor Network will be attached

  • donor (Network) – The Network to stitch on to the current Network

  • P_network (array_like) – The pores on the current Network

  • P_donor (array_like) – The pores on the donor Network

  • label_suffix (str or None) – Some text to append to each label in the donor Network before inserting them into the recipient. The default is to append no text, but a common option would be to append the donor Network’s name. To insert none of the donor labels, use None.

  • label_stitches (str or list[str]) – The label to apply to the newly created ‘stitch’ throats. The defaul is ‘stitched’. If performing multiple stitches in a row it might be helpful to the throats created during each step uniquely for later identification.

  • len_max (float) – Set a length limit on length of new throats

  • method (str (default = 'nearest')) –

    The method to use when making pore to pore connections. Options are:

    mode

    description

    ’radius’

    Connects each pore on the recipient network to the nearest pores on the donor network, within len_max

    ’nearest’

    Connects each pore on the recipienet network to the nearest pore on the donor network.

Notes

Before stitching it is necessary to translate the pore coordinates of one of the Networks so that it is positioned correctly relative to the other. This is illustrated in the example below.