finesse.analysis.actions.sensing.OptimiseRFReadoutPhaseDC
¶
Overview
- class finesse.analysis.actions.sensing.OptimiseRFReadoutPhaseDC(*args, d_dof=1e-10, name='optimise_demod_phases_dc')[source]¶
Bases:
Action
This optimises the demodulation phase of
ReadoutRF
elements relative to someDegreeOfFreedom
or drivenParameter
in the model. The phases are optimised by calculating the DC response of the readouts. ThisAction
changes the state of the model by varying the readout demodulation phases. If no arguments are given it will try to automatically optimise any lock element in the model that is using an RF readout with respect to the lock feedback parameter.- Parameters
- args
Pairs of
DegreeOfFreedom
orParameter
andReadoutRF
elements, or pairs of their names. If none are provided OptimiseRFReadoutPhaseDC will automatically search forLock
elements which haveReadoutRF
error signal and optimise them.- d_doffloat, optional
A small offset applied to the DOFs to compute the gradients of the error signals
Examples
Take a typicaly Pound-Drever-Hall lock of a cavity. Here is some KatScript to setup such a model:
>>> import finesse >>> from finesse.analysis.actions import OptimiseRFReadoutPhaseDC >>> >>> model = finesse.Model() >>> model.parse(''' >>> l l1 >>> mod mod1 10M 0.1 mod_type=pm >>> readout_rf PD f=mod1.f phase=33 output_detectors=True optical_node=m1.p1.o >>> m m1 R=0.99 T=0.01 >>> m m2 R=1 T=0 >>> link(l1, mod1, m1, 1, m2) >>> lock cav_lock PD_I m2.phi 0.01 1e-3 >>> ''')
We have defined a lock above using the I quadrature RF demodulation and feeding back to the m2 mirror position. We can optimise this demodulation phase by running. Here we manually provied which drives and readouts to use:
>>> sol = model.run(OptimiseRFReadoutPhaseDC("m2.phi", 'PD_I')) >>> print(sol.phases) {'PD': 181.3535303754581} >>> print(model.PD.phase) 181.3535303754581
Alternatively, PD_Q could also be optimised for above. You can also just optimise all locks that are using RF readouts by providing no arguments:
>>> sol = model.run(OptimiseRFReadoutPhaseDC()) >>> print(sol.phases) {'PD': 181.3535303754581}
To tell what was optimised, see the sol.phases dictionary.