Dear Arturo,

Thanks for reporting this! It is indeed a bug. I have created an issue for it: https://github.com/nest/nest-simulator/issues/1946
Further updates can be found there.

Best wishes,
Stine



Fra: Arturo del Cerro Vergara <arturo.delcerro@e-campus.uab.cat>
Sendt: torsdag 25. februar 2021 10:18
Til: users@nest-simulator.org <users@nest-simulator.org>
Emne: [NEST Users] Error when plotting masks with azimuthal angle
 
Hello,
my name is Arturo and I think I found a bug when calling PlotTargets using the mask plot option with an azimuthal angle > 0.

Below I give an example very easy to follow that shows that although the targets are plotted correctly, the mask is not. 

Correct me if I am doing anything wrong please. I attach an image of the results also. 

Thank you, Arturo.

Code: 

l = topo.CreateLayer({'rows': 21, 'columns': 21,
                    'elements': 'iaf_psc_alpha'})

conndict = {'connection_type': 'divergent',
            'mask': {'rectangular': {'lower_left':  [-0.3, -0.12],
                                     'upper_right': [-0.05, 0.12],
                                     'azimuth_angle': 45.}},
            'kernel': 1.0}

topo.ConnectLayers(l, l, conndict)
fig = topo.PlotLayer(l, nodesize=40)
ctr = topo.FindCenterElement(l)
topo.PlotTargets(ctr, l, fig=fig,
               mask=conndict['mask'],
               src_size=250, tgt_color='red', tgt_size=20)

Captura.PNG