## Overview¶

A MaskedMappingProjection is a subclass of MappingProjection that applies a specified mask array (either additively, multiplicatively, or exponentially) to the MappingProjection’s matrix each time the MappingProjection is executed. The mask is assigned a ParameterPort and can thus be modulated by a ControlMechanism.

A MaskedMappingProjection is created in the same way as a MappingProjection, with the exception that its constructor includes mask and mask_operation arguments that can be used to configure the mask and how it is applied to the Projection’s matrix. The mask attribute must be an array that has the same shape as the matrix attribute, and the mask_operation argument must be the keyword ADD, MULTIPLY, or EXPONENTIATE (see Execution below).

## Structure¶

A MaskedMappingProjection is identical to a MappingProjection, with the addition of mask and mask_operation attributes.

## Execution¶

A MaskedMappingProjection executes in the same manner as a MappingProjection, with the exception that, each time the Projection is executed, its mask is applied to its matrix parameter as specified by its mask_operation attribute, before generating the Projection’s value.

## Class Reference¶

class psyneulink.library.components.projections.pathway.maskedmappingprojection.MaskedMappingProjection(mask=None, mask_operation=MULTIPLY)

Subclass of MappingProjection, the matrix of which can be masked on each execution. See MappingProjection for additional arguments and attributes.

Parameters: mask (int, float, list, np.ndarray or np.matrix : default None) – specifies a mask to be applied to the matrix each time the Projection is executed, in a manner specified by the mask_operation argument. mask_operation (ADD, MULTIPLY, or EXPONENTIATE : default MULTIPLY) – specifies the manner in which the mask is applied to the matrix each time the Projection is executed.
mask

int, float, list, np.ndarray or np.matrix : default None – mask applied to the matrix each time the Projection is executed, in a manner specified by mask_operation.

mask_operation : ADD, MULTIPLY, or EXPONENTIATE : default MULTIPLY determines the manner in which the mask is applied to the matrix when the Projection is executed.