finesse.detectors.general.MaskedDetector.select_mask

MaskedDetector.select_mask(modes=None, maxtem=None, exclude=None)[source]

Select the HOM indices to include in the mask.

The mode-selecting examples in Selecting the modes to model may be referred to for typical patterns when using this method, as the same concepts apply equally to making detector masks (equivalent code under-the-hood).

Parameters
modessequence, str, optional; default: None

Identifier for the mode indices to generate. This can be:

  • An iterable of mode indices, where each element in the iterable must unpack to two integer convertible values.

  • A string identifying the type of modes to include, must be one of “even”, “odd”, “x” or “y”.

By default this is None, such that, for example, this method can be used to select a mask of all modes up to a given maxtem.

maxtemint, optional; default: None

Optional maximum mode order. If not specified then the maxtem used internally will be equal to the maximum mode order of the associated model.

Note that this argument is ignored if modes is an iterable of mode indices.

excludesequence, str, optional; default: None

A mode, or iterable of modes, to exclude from the selected pattern. For example, if one calls select_mask("even", exclude="00") then the mask will be an array of all even-order HOM indices excluding the 00 mode.

Examples

See Selecting the modes to model.