finesse.knm.matrix.KnmMatrix.get

KnmMatrix.get(self, key, default=None)

Retrieves the coupling coefficient corresponding to the key, returning default if this key is invalid.

Parameters

key : str or integer sequence

A string of the format:

  • “nm->n’m’” or,

  • “nmn’m’”,

where n, m, n’ and m’ are all convertible to integers

Or an integer sequence of:

  • length 2 – i.e. an i, j pair corresponding to the field indices.

  • or length 4 – i.e. a n1, m1, n2, m2 coupling.

default : Any, optional

The default value returned if the key is invalid.

Returns

out : complex

The value of the coupling coefficient associated with key.