maskMatrix(matrix,
shape='circle',
radius=1.0,
center=(0.0, 0.0))
| source code
|
Make and apply a mask to an input matrix (e.g. a grating)
- Parameters:
matrix, a, square, numpy, array - array to which the mask should be applied
shape, 'circle', 'gauss', 'ramp', (linear, gradient, from, center) - shape of the mask
radius, float - scale factor to be applied to the mask (circle with radius of [1,1] will extend just to the edge of the matrix). Radius can asymmetric, e.g. [1.0,2.0] will be wider than it is tall.
center, 2x1, tuple, or, list, (default=[0.0, 0.0]) - the centre of the mask in the matrix ([1,1] is top-right corner, [-1,-1] is bottom-left)
|