finesse.gaussian.BeamParam.mismatch

static BeamParam.mismatch(q1, q2)[source]

Computes the mode mismatch via an alternate form of \(1 - \mathcal{O}\), where \(\mathcal{O}\) is the overlap (see BeamParam.overlap()).

This method is less susceptible to floating point errors than simply \(1 - \mathcal{O}\) for very small mismatches. The exact form of the quantity computed is,

\[\mathcal{M} = \frac{|q_1 - q_2|^2}{|q_1 - q_2^*|^2}. \]

The return value is \(\mathcal{M} \in [0, 1]\), where 0 implies full mode matching and 1 indicates complete mode mismatch.

Parameters
q1BeamParam

First beam parameter. Note that this can be a numeric or symbolic beam parameter, a complex number or an array of complex values.

q2BeamParam

Second beam parameter. Note that this can be a numeric or symbolic beam parameter, a complex number or an array of complex values.

Returns
mismatchfloat, array-like, Symbol

The mismatch between q1 and q2 as defined above.