文档库 最新最全的文档下载
当前位置:文档库 › Topology_UserManual

Topology_UserManual

Topology_UserManual
Topology_UserManual

NEST Topology User Manual

Hans Ekkehard Plesser

H?kon Enger

Department of Mathematical Sciences and Technology Norwegian University of Life Sciences

1432?s,Norway

NEST2.2,2.4,and2.6(r9977or later)

About the Topology Module

This user manual gives a short introduction to the use of the Topology Module for the NEST Neural Simulation Tool.

Rüdiger Kupper wrote a?rst topology library for NEST many years ago entirly in SLI(actually,it pre-dates the NEST kernel).Kittel Austvoll and Hans Ekkehard Plesser designed and wrote a completely new Topology library in2007/8.That library has been available with the NEST1.9.x pre-releases since.

For NEST2.0,H?kon Enger and Hans Ekkehard Plesser re-factored parts of the Topology library code,improved and extended the PyNEST interface for the Topology library,?xed bugs and added tests.

For NEST2.2,H?kon Enger rewrote most of the Topology library code,thereby improving performance considerably.

This User Manual describes the NEST2.2and2.4versions of the NEST Topology Library.Please see Chapter6for a summary of changes to2.2.There are no changes in Topology from2.2to2.4.In NEST2.6,Topology functions check their arguments more carefully.

We plan further improvements to the Topology Module in the future,which may include changes to the API to remove some of the remaining inconsistencies and pro-vide a cleaner user interface.

Copyright c 2004The NEST Initiative

Contents

1Introduction3

1.1Limitations and Disclaimer (3)

2Layers4

2.1Grid-based Layers (4)

2.1.1A very simple layer (4)

2.1.2Setting the extent (6)

2.1.3Setting the center (6)

2.1.4Constructing a layer:an example (6)

2.2Free layers (7)

2.33D layers (9)

2.4Periodic boundary conditions (10)

2.4.1Topology layer as NEST subnet (11)

2.5Layers with composite elements (11)

2.5.1Designing layers (13)

3Connections14

3.1Basic principles (14)

3.1.1Terminology (14)

3.1.2A minimal ConnectLayers call (15)

3.2Mapping source and target layers (16)

3.3Masks (17)

3.3.1Masks for2D layers (17)

3.3.2Masks for3D layers (18)

3.3.3Masks for grid-based layers (19)

3.4Kernels (20)

3.5Weights and delays (22)

3.6Periodic boundary conditions (25)

3.7Prescribed number of connections (26)

3.8Connecting composite layers (27)

3.9Synapse models and properties (28)

4Inspecting Layers30

4.1Query functions (30)

4.2Visualization functions (31)

5Adding topology kernels and masks33

5.1Adding kernel functions (34)

5.2Adding masks (35)

CONTENTS2

6Changes from Topology2.0to2.238 7Changes from Topology1.9to2.039 Bibliography40 List of Figures41 List of Tables42 Index43

Chapter1

Introduction

The Topology Module provides the NEST simulator1(Gewaltig and Diesmann,2007) with a convenient interface for creating layers of neurons placed in space and connect-ing neurons in such layers with probabilities and properties depending on the relative placement of neurons.This permits the creation of complex networks with spatial structure.

This user manual provides an introdcution to the functionality provided by the Topology Module.It is based exclusively on the PyNEST,the Python interface to NEST (Eppler et al.,2008).NEST users using the SLI interface should be able to map instruc-tions to corresponding SLI code.This manual is not meant as a comprehensive refer-ence manual.Please consult the online documentation in PyNEST for details;where appropriate,that documentation also points to relevant SLI documentation.

This manual describes the Topology Module included with NEST2.2and2.4,code revision9977or later.This version differs from older ones in some important aspects as detailed in Section6.In our experience,though,most scripts using the Topology Module can be ported to the new version with minimal changes.

In the next chapter of this manual,we introduce Topology layers,which place neu-rons in space.In Chapter3we then describe how to connect layers with each other, before discussing in Chapter4how you can inspect and visualize Topology networks. Chapter5deals with the more advanced topic of extending the Topology module with custom kernel functions and masks provided by C++classes in an extension module.

You will?nd the Python scripts used in the examples in this manual in the NEST source code directory under topology/doc/user_manual_scripts.

1.1Limitations and Disclaimer

Undocumented features The Topology Module provides a number of undocumented features,which you may discover by browsing the code.These features are highly experimental and should not be used for simulations,as they have not been validated.

1NEST is available under an open source license at https://www.wendangku.net/doc/4117528466.html,.

Chapter2

Layers

The Topology Module(just Topology for short in the remainder of this document) organizes neuronal networks in layers.We will?rst illustrate how Topology places elements in simple layers,where each element is a single model https://www.wendangku.net/doc/4117528466.html,yers with composite elements are discussed in the following section.

We will illustrate the de?nition and use of layers using examples.

Topology distinguishes between two classes of layers:

grid-based layers in which each element is placed at a location in a regular grid; free layers in which elements can be placed arbitrarily in the plane.

Grid-based layers allow for more ef?cient connection-generation under certain cir-cumstances.

2.1Grid-based Layers

2.1.1A very simple layer

We create a?rst,grid-based simple layer with the following commands:

import nest.topology as tp

l=tp.CreateLayer({’rows’:5,

’columns’:5,

’elements’:’iaf_neuron’})

The layer is shown in Fig.2.1.Note the following properties:

?The layer has?ve rows and?ve columns.

?The’elements’entry of the dictionary passed to CreateLayer determines the ele-ments of the layer.In this case,the layer contains iaf_neuron s.

?The center of the layer is at the origin of the coordinate system,(0,0).

?The extent or size of the layer is1×1.This is the default size for layers.The extent is marked by the thin square in Fig.2.1.

Figure2.1:Simple grid-based layer centered about the origin.Blue circles mark layer elements,the thin square the extent of the layer.Row and column indices are shown in the right and top margins,respectively.

?The grid spacing of the layer is

dx=

x-extent number of columns

dy=

y-extent

number of rows

(2.1)

In the layer shown,we have dx=dy=0.2,but the grid spacing may differ in x-and y-direction.

?Layer elements are spaced by the grid spacing and are arranged symmetrically about the center.

?The outermost layer elements are placed dx/2and dy/2from the borders of the extent.

?Element positions in the coordinate system are given by(x,y)pairs.The coordi-nate system follows that standard mathematical convention that the x-axis runs from left to right and the y-axis from bottom to top.

?Each element of a grid-based layer has a row-and column-index in addition to its(x,y)-coordinates.Indices are shown in the top and right margin of Fig.2.1.

Note that row-indices follow matrix convention,i.e.,run from top to bottom.

Following pythonic conventions,indices run from0.

Note:The de?nition of the extent has changed from NEST1.9to NEST2.0.In NEST1.9,the outermost elements of the layer were placed on the limits of the ex-tent.When working with periodic boundary conditions(see Sec.2.4),Topology then silently padded the layer with half a grid spacing on all sides,to ensure that nodes at opposite edges did not coincide.

Figure2.2:Same layer as in Fig.2.1,but with different extent.

2.1.2Setting the extent

Layers have a default extent of1×1.You can specify a different extent of a layer,i.e.,

its size in x-and y-direction by adding and’extent’entry to the dictionary passed to CreateLayer:

l=tp.CreateLayer({’rows’:5,

’columns’:5,

’e x t e n t’:[2.0,0.5],

’elements’:’iaf_neuron’})

The resulting layer is shown in Fig.2.2.The extent is always a two-element tuple of

?oats.In this example,we have grid spacings dx=0.4and dy=0.1.Changing the extent does not affect grid indices.

2.1.3Setting the center

Layers are centered about the origin(0,0)by default.This can be changed through the

’center’entry in the dictionary specifying the layer.The following code creates layers centered about(0,0),(?1,1),and(1.5,0.5),respectively:

l1=tp.CreateLayer({’rows’:5,’columns’:5,’elements’:’iaf_neuron’}) l2=tp.CreateLayer({’rows’:5,’columns’:5,’elements’:’iaf_neuron’,

’c e n t e r’:[?1.,1.]})

l3=tp.CreateLayer({’rows’:5,’columns’:5,’elements’:’iaf_neuron’,

’c e n t e r’:[1.5,0.5]})

The center is given as a two-element tuple of?oats.Changing the center does not affect grid indices:For each of the three layers in Fig.2.3,grid indices run from0to

4through columns and rows,respectively,even though elements in these three layers have different positions in the gobal coordinate system.

2.1.4Constructing a layer:an example

To see how to construct a layer,consider the following example:

?a layer with n r rows and n c columns;

?spacing between nodes is d in x-and y-directions;

Figure2.3:Three layers centered,respectively,about(0,0)(blue),(?1,?1)(green), and(1.5,0.5)(red).

?the left edge of the extent shall be at x=0;

?the extent shall be centered about y=0.

From Eq.2.1,we see that the extent of the layer must be(n c d,n r d).We now need to

?nd the coordinates(c x,c y)of the center of the layer.To place the left edge of the extent at x=0,we must place the center of the layer at c x=n c d/2along the x-axis, i.e.,half the extent width to the right of x=0.Since the layer is to be centered about

y=0,we have c y=0.Thus,the center coordinates are(n c d/2,0).The layer is created with the following code and shown in Fig.2.4:

nc,nr=5,3

d=0.1

l=tp.CreateLayer({’columns’:nc,’rows’:nr,’elements’:’iaf_neuron’,

’e x t e n t’:[nc?d,nr?d],’c e n t e r’:[nc?d/2.,0.]})

2.2Free layers

Free layers do not restrict node positions to a grid,but allow free placement within the extent.To this end,the user needs to specify the positions of all nodes explicitly.The following code creates a layer of50iaf_neurons uniformly distributed in a layer with extent1×1,i.e.,spanning the square[?0.5,0.5]×[?0.5,0.5]:

import numpy as np

pos=[[np.random.uniform(?0.5,0.5),np.random.uniform(?0.5,0.5)] for j in range(50)]

l=tp.CreateLayer({’p o s i t i o n s’:pos,

’elements’:’iaf_neuron’})

Figure2.4:Layer with n c=5rows and n r=3columns,spacing d=0.1and the left edge of the extent at x=0,centered about the y-axis.The cross marks the point on the extent placed at the origin(0,0),the circle the center of the layer.

Figure2.5:A free layer with50elements uniformly distributed in an extent of size 1×1.

2.33D layers9

Figure2.6:A free3D layer with200elements uniformly distributed in an extent of size

1×1×1.

Note the following points:

?For free layers,element positions are speci?ed by the’positions’entry in the dic-

tionary passed to CreateLayer.’positions’is mutually exclusive with’rows’/’columns’entries in the dictionary.

?The’positions’entry must be a Python list(or tuple)of element coordinates,i.e.,

of two-element tuples of?oats giving the(x,y)-coordinates of the elements.One

layer element is created per element in the’positions’entry.

?All layer element positions must be within the layer’s extent.Elements may be

place on the perimeter of the extent as long as no periodic boundary conditions

are used;see Sec.2.4.

?Element positions in free layers are not shifted when specifying the’center’of

the layer.The user must make sure that the positions given lie within the extent

when centered about the given center.

2.33D layers

Although the term“layer”suggests a2-dimensional structure,the layers in NEST may in fact be3-dimensional.The example from the previous section may be easily extended with another component in the coordinates for the positions:

import numpy as np

pos=[[np.random.uniform(?0.5,0.5),np.random.uniform(?0.5,0.5), np.random.uniform(?0.5,0.5)]for j in range(200)]

l=tp.CreateLayer({’p o s i t i o n s’:pos,

’elements’:’iaf_neuron’})

2.4Periodic boundary conditions

10

Figure2.7:Top left:Layer with single row and?ve columns without periodic bound-ary conditions.Numbers above elements show element coordinates.Colors shifting from blue to magenta mark increasing distance from the element at(?2,0).Bottom left:Same layer,but with periodic boundary conditions.Note that the element at (2,0)now is a nearest neighbor to the element at(?2,0).Right:Layer with periodic boundary condition arranged on a circle to illustrate neighborhood relationsships. 2.4Periodic boundary conditions

Simulations usually model systems much smaller than the biological networks we want to study.One problem this entails is that a signi?cant proportion of neurons in a model network is close to the edges of the network with fewer neighbors than nodes properly inside the network.In the5×5-layer in Fig.2.1,e.g.,16out of25nodes form the border of the layer.

One common approach to reducing the effect of boundaries on simulations is to introduce periodic boundary conditions,so that the rightmost elements on a grid are considered nearest neighbors to the leftmost elements,and the topmost to the bot-tommost.The?at layer becomes the surface of a torus.Fig.2.7illustrates this for a one-dimensional layer,which turns from a line to a ring upon introduction of periodic boundary conditions.

You specify periodic boundary conditions for a layer using the dictionary entry edge_wrap:

lp=tp.CreateLayer({’rows’:1,’columns’:5,’e x t e n t’:[5., 1.],

’elements’:’iaf_neuron’,

’edge_wrap’:True})

Note that the longest possible distance between two elements in a layer without periodic boundary conditions is

x2ext+y2ext

but only

x2ext+y2ext

2

for a layer with periodic boundary conditions;x ext and y ext are the components of the extent size.

We will discuss the consequences of periodic boundary conditions more in Chap-ter3.

2.4.1Topology layer as NEST subnet

From the perspective of NEST,a Topology layer is a special type of subnet.From the user perspective,the following points may be of interest:

?Grid-based layers have the NEST model type topology_layer_grid,free layers the model type topology_layer_free.

?The status dictionary of a layer has a’topology’entry describing the layer prop-erties(l is the layer created above):

p r i n t(nest.GetStatus(l)[0][’topology’])

{u’rows’:5,u’c e n t e r’:(0.0,0.0),u’edge_wrap’:False, u’depth’:1,u’e x t e n t’:(1.0, 1.0),u’columns’:5} The’topology’entry is read-only.

?The NEST kernel sees the elements of the layer in the same way as the elements of any subnet.You will notice this when printing a network with a Topology layer:

nest.PrintNetwork(depth=2)

+?[0]root dim=[125]

|

+?[1]topology_layer_grid dim=[25]

|

+?[1]...[25]iaf_neuron

The5×5layer created above appears here as a topology_layer_grid subnet of 25iaf_neuron s.Only Topology connection and visualization functions heed the spatial structure of the layer.

2.5Layers with composite elements

So far,we have considered layers in which each element was a single model neuron. Topology can also create layers with composite elements,i.e.,layers in which each ele-ment is a collection of model neurons,or,in general NEST network nodes.

Construction of layers with composite elements proceeds exactly as for layers with simple elements,except that the’elements’entry of the dictionary passed to CreateLayer is a Python list or tuple.The following code creates a1×2layer(to keep the output from PrintNetwork()compact)in which each element consists of one’iaf_cond_alpha’and one’poisson_generator’node

l=tp.CreateLayer({’rows’:1,’columns’:2,

’elements’:[’iaf_cond_alpha’,’poisson_generator’]}) +?[0]root dim=[14]

|

+?[1]topology_layer_grid dim=[4]

|

+?[1]...[2]iaf_cond_alpha

+?[3]...[4]poisson_generator

The network consist of one topology_layer_grid with four elements:two iaf_cond_alpha

and two poisson_generator nodes.The identical nodes are grouped,so that the sub-

net contains?rst one full layer of iaf_cond_alpha nodes followed by one full layer of poisson_generator nodes.

You can create network elements with several nodes of each type by following a model name with the number of nodes to be created:

l=tp.CreateLayer({’rows’:1,’columns’:2,

’elements’:[’iaf_cond_alpha’,10,’poisson_generator’,

’n o i s e_g en e r a t o r’,2]})

+?[0]root dim=[126]

|

+?[1]topology_layer_grid dim=[26]

|

+?[1]...[20]iaf_cond_alpha

+?[21]...[22]poisson_generator

+?[23]...[26]noi s e_ge n er a t o r

In this case,each layer element consists of10iaf_cond_alpha neurons,one poisson_generator, and two noise_generator s.

Note the following points:

?Each element of a layer has identical components.

?All nodes within a composite element have identical positions,namely the posi-

tion of the layer element.

?When inspecting a layer as a subnet,the different nodes will appear in groups of

identical nodes.

?For grid-based layers,the function GetElement returns a list of nodes at a given

grid position.See Chapter4for more on inspecting layers.

?In a previous version of the topology module it was possible to create layers with

nested,composite elements,but such nested networks gobble up a lot of memory

for subnet constructs and provide no practical advantages,so this is no longer

supported.See the next section for design recommendations for more complex

layers.

2.5.1Designing layers

A paper on a neural network model might describe the network as follows1:

The network consists of20x20microcolumns placed on a regular grid span-

ning0.5?×0.5?of visual space.Neurons within each microcolumn are

organized into L2/3,L4,and L56subpopulations.Each subpopulation

consists of three pyramidal cells and one interneuron.All pyramidal cells

are modeled as NEST iaf_neuron s with default parameter values,while in-

terneurons are iaf_neuron s with threshold voltage V th=?52mV.

How should you implement such a network using the Topology module?The recom-mended approach is to create different models for the neurons in each layer and then de?ne the microcolumn as one composite element:

for l y r in[’L23’,’L4’,’L56’]:

nest.CopyModel(’iaf_neuron’,l y r+’pyr’)

nest.CopyModel(’iaf_neuron’,l y r+’in’,{’V_th’:?52.})

l=tp.CreateLayer({’rows’:20,’columns’:20,’e x t e n t’:[0.5,0.5],

’elements’:[’L23pyr’,3,’L23in’,

’L4pyr’,3,’L4in’,

’L56pyr’,3,’L56in’]})

We will discuss in Chapter3.1how to connect selectively to different neuron models.

1See Nordlie et al.(2009)for suggestions on how to describe network models.

Chapter3

Connections

The most important feature of the Topology module is the ability to create connections between layers with quite some?exibility.In this chapter,we will illustrate how to specify and create connections.All connections are created using the ConnectLayers function.

3.1Basic principles

3.1.1Terminology

We begin by introducing important terminology:

Connection In the context of connections between the elements of Topology layers, we often call the set of all connections between pairs of network nodes created

by a single call to ConnectLayers a connection.

Connection dictionary A dictionary specifying the properties of a connection between two layers in a call to CreateLayers.

Source The source of a single connection is the node sending signals(usually spikes).

In a projection,the source layer is the layer from which source node are chosen. Target The target of a single connection is the node receiving signals(usually spikes).

In a projection,the target layer is the layer from which source node are chosen. Connection type The connection type determines how nodes are selected when ConnectLayers creates connections between layers.It is either’convergent’or’divergent’. Convergent connection When creating a convergent connection between layers,Topol-ogy visits each node in the target layer in turn and selects sources for it in the

source layer.Masks and kernels are applied to the source layer,and periodic

boundary conditions are applied in the source layer,provided that the source

layer has periodic boundary conditions.

Divergent connection When creating a divergent connection,Topology visits each node in the source layer and selects target nodes from the target layer.Masks,kernels,

and boundary conditions are applied in the target layer.

3.1Basic principles15 Driver When connecting two layers,the driver layer is the one in which each node is considered in turn.

Pool When connecting two layers,the pool layer is the one from which nodes are cho-sen for each node in the driver layer.I.e.,we have

Connection type Driver Pool

convergent target layer source layer

divergent source layer target layer

Displacement The displacement between a driver and a pool node is the shortest vector connecting the driver to the pool node,taking boundary conditions into accout.

Distance The distance between a driver and a pool node is the length of their displace-ment.

Mask The mask de?nes which pool nodes are at all considered as potential targets for each driver node.See Sec.3.3for details.

Kernel The kernel is a function returning a(possibly distance-or displacment-dependent) probability for creating a connection between a driver and a pool node.The default kernel is1,i.e.,connections are created with certainty.See Sec.3.4for details.

Autapse An autapse is a synapse(connection)from a node onto itself.Autapses are permitted by default,but can be disabled by adding’allow_autapses’:False to the connection dictionary.

Multapse Node A is connected to node B by a multapse if there are synapses(connec-tions)from A to B.Multapses are permitted by default,but can be disabled by adding’allow_multapses’:False to the connection dictionary.

3.1.2A minimal ConnectLayers call

Connections between Topology layers are created by calling ConnectLayers with the following arguments1:

1.The source layer.

2.The target layer(can be identical to source layer).

3.A connection dictionary that contains at least the following entry:

’connection_type’either’convergent’or’divergent’.

I many cases,the connection dictionary will also contain

’mask’a mask speci?cation as described in Sec.3.3.

Only neurons within the mask are considered as potential sources or targets.If no mask is given,the all neurons in the respective layer are consider sources or targets.

Here is a simple example,cf.3.1:

1You can also use standard NEST connection functions to connect nodes in Topology layers.

3.2Mapping source and target layers16

Figure3.1:Left:Minimal connection example from a layer onto itself using a rectangu-lar mask shown as red line for the node at(0,0)(marked light red).The targets of this node are marked with red dots.The targets for the node at(4,5)(marked light orange) are marked with orange dots.This node has fewer targets since it is at the corner and many potential targets are beyond the layer.Right:The effect of periodic boundary conditions is seen here.Source and target layer and connection dictionary were iden-tical,except that periodic boundary conditions were used.The node at(4,5)now has 15targets,too,but they are spread across the corners of the layer.If we wrapped the layer to a torus,they would form a5×3rectangle centered on the node at(4,5).

l=tp.CreateLayer({’rows’:11,’columns’:11,’e x t e n t’:[11.,11.],

’elements’:’iaf_neuron’})

conndict={’connection_type’:’divergent’,

’mask’:{’r e c t a n g u l a r’:{’l o w e r_l e f t’:[?2.,?1.],

’upper_right’:[ 2., 1.]}}}

tp.ConnectLayers(l,l,conndict)

In this example,layer l is both source and target layer.Connection type is divergent, i.e.,for each node in the layer we choose targets according to the rectangular mask cen-tered about each source node.Since no connection kernel is speci?ed,we connect to all nodes within the mask.Note the effect of normal and periodic boundary conditions on the connections created for different nodes in the layer,as illustrated in Fig.3.1. 3.2Mapping source and target layers

The application of masks and other functions depending on the distance or even the displacement between nodes in the source and target layers requires a mapping of coordinate systems between source and target layers.Topology applies the following coordinate mapping rules:

1.All layers have two-dimensional Euclidean coordinate systems.

2.No scaling or coordinate transformation can be applied between layers.

3.The displacement d(D,P)from node D in the driver layer to node P in the pool

layer is measured by?rst mapping the position of D in the driver layer to the identical position in the pool layer and then computing the displacement from that position to P.If the pool layer has periodic boundary conditions,they are taken into account.It does not matter for displacement computations whether the driver layer has periodic boundary conditions.

3.3Masks

A mask describes which area of the pool layer shall be searched for nodes to connect for any given node in the driver layer.We will?rst describe geometrical masks de?ned for all layer types and then consider grid-based masks for grid-based layers.If no mask is speci?ed,all nodes in the pool layer will be searched.

Note that the mask size should not exceed the size of the layer when using peri-odic boundary conditions,since the mask would“wrap around”in that case and pool nodes would be considered multiple times as targets.

If none of the mask types provided in the topology library meet your need,you may add more mask types in a NEST extension module.This is covered in Chapter5.

3.3.1Masks for2D layers

Topology currently provides three types of masks usable for2-dimensional free and grid-based layers.They are illustrated in Fig.3.2.The masks are

Rectangular All nodes within a rectangular area are connected.The area is spe?cied by its lower left and upper right corners,measured in the same unit as element coordinates.Example:

conndict={’connection_type’:’divergent’,

’mask’:{’r e c t a n g u l a r’:{’l o w e r_l e f t’:[?2.,?1.],

’upper_right’:[ 2., 1.]}}} Circular All nodes within a circle are connected.The area is speci?ed by its radius.

conndict={’connection_type’:’divergent’,

’mask’:{’c i r c u l a r’:{’radius’: 2.0}}}

Doughnut All nodes between an inner and outer circle are connected.Note that nodes on the inner circle are not connected.The area is speci?ed by the radii of the inner and outer circles.

conndict={’connection_type’:’divergent’,

’mask’:{’doughnut’:{’inner_radius’: 1.5,

’outer_radius’: 3.}}}

By default,the masks are centered about the position of the driver node,mapped into the pool layer.You can change the location of the mask relative to the driver node by specifying an’anchor’entry in the mask dictionary.The anchor is a2D vector spec-ifying the location of the mask center relative to the driver node,as in the following examples(cf.Fig.3.2,bottom row):

Figure3.2:Masks for2D layers.For all mask types,the driver node is marked by a wide light-red circle,the selected pool nodes by red dots and the masks by red lines. Top row from left to right:rectangular,circular and doughnut masks centered about the driver node.Bottom row from left to right:the same masks as in the top row, but centered about(?1.5,?1.5),(?2,0)and(1.5,1.5),respectively,using the’anchor’parameter.

conndict={’connection_type’:’divergent’,

’mask’:{’r e c t a n g u l a r’:{’l o w e r_l e f t’:[?2.,?1.],

’upper_right’:[ 2., 1.]},

’anchor’:[?1.5,?1.5]}}

conndict={’connection_type’:’divergent’,

’mask’:{’c i r c u l a r’:{’radius’: 2.0},

’anchor’:[?2.0,0.0]}}

conndict={’connection_type’:’divergent’,

’mask’:{’doughnut’:{’inner_rad ius’: 1.5,

’outer_radius’: 3.},

’anchor’:[1.5,1.5]}}

3.3.2Masks for3D layers

Similarly,there are two mask types that can be used for3D layers,

Box All nodes within a cuboid volume are connected.The area is spe?cied by its

相关文档