finesse.gaussian.BeamParam.overlap_contour

static BeamParam.overlap_contour(q1, M, t)[source]

This function returns a set of beam parameters that are mismatched to q1 by an overlap M. There are multiple beam parameters that can be X% overlapped with one particular q value. This function is parameterised with t from 0 to 2pi, which can provide all the possible beam parameters that are M% mismatched.

Parameters
q1BeamParam or tuple

reference beam parameter, can be a tuple of (qx,qy) beam parameters

Mfloat

Mismatch factor (1-overlap) [0 -> 1]

tfloat

Selection parameter [0 -> 2pi]

Examples

Plots the contours of mismatch for 0.1% and 1% from some initial q value:

>>>   import numpy as np
>>>   import matplotlib.pyplot as plt
>>>   import finesse
>>>
>>>   qin = finesse.BeamParam(w0=1e-3, z=20)
>>>   t = np.linspace(0, 2*np.pi, 100)
>>>
>>>   # use vectorised functions to select a cerain property of the beam paramters
>>>   vx  = np.vectorize(lambda q: q.z)
>>>   vy  = np.vectorize(lambda q: q.w/1e-3)
>>>
>>>   for mm in [1e-3, 2e-2]:
>>>       mmc = finesse.BeamParam.overlap_contour(qin, mm, t)
>>>       plt.text(vx(mmc[20]), vy(mmc[20]), "%1.1f%%" % ((mm*100)),alpha=0.5, fontsize=8)
>>>       l, = plt.plot(vx(mmc),     vy(mmc),     ls='--', alpha=0.2, zorder=-10, c='k')
>>>
>>>   plt.show()