rectangular#
- class brainpy.state.spatial.rectangular(lower_left, upper_right, azimuth_angle=0.0)[source]#
Rectangular mask (2-D): target displacement within
[lower_left, upper_right].- Parameters:
lower_left (
sequenceoffloatorQuantity) – The two corners of the (axis-aligned) rectangle on the source-anchored displacement.upper_right (
sequenceoffloatorQuantity) – The two corners of the (axis-aligned) rectangle on the source-anchored displacement.azimuth_angle (
float, optional) – Rotation of the rectangle about its center, in degrees (NEST parity). Default0.
- Returns:
A hard-cutoff mask (the 2-D analogue of
box()).- Return type:
_RectangularMask
Examples
>>> from brainpy import state as bp >>> mask = bp.spatial.rectangular([-0.5, -0.5], [0.5, 0.5], azimuth_angle=30.0)