pyepr.hardware.xepr_experiments.MPFUtune ======================================== .. py:class:: pyepr.hardware.xepr_experiments.MPFUtune(api, echo='Hahn', ps_length=16, d0=680, srt=6000000.0) Tuning MPFU channels for optimal attenuation and phase :Parameters: **api** : _type_ The spectrometr API object **echo** : str, optional The echo type. Options = ['Hahn","Refocused"], by default "Hahn" **ps_length** : int, optional The length of the pi/2 pulse, by default 16 **d0** : int, optional The approximate position of d0, this should be lower than ideal, by default 680 .. !! processed by numpydoc !! .. py:attribute:: api .. py:attribute:: hardware_wait :value: 5 .. py:attribute:: ps_length .. py:attribute:: d0 .. py:attribute:: srt .. py:method:: _setup_echo(echo, tau1=400, tau2=400) .. py:method:: tune_phase(channel, target, tol=0.1, maxiter=30) Tunes the phase of a given channel to a given target using the standard scipy optimisation scripts. :Parameters: **channel** : str The chosen MPFU channel. Options: ['+', '-', '+', '-'] **target** : str The target echo position, this can either be maximising (+) or minimising (-) either the real (R) or imaginary (I) of the echo. Options: ['R+', 'R-', 'I+', 'I-'] **tol** : float, optional The tolerance in phase parameter, by default 0.1 **maxiter** : int, optional The maximum number of iterations in the optimisation, by default 30 :Returns: float The optimal value of the phase parameter .. !! processed by numpydoc !! .. py:method:: tune_power(channel, tol=0.1, maxiter=30, bounds = [0, 100]) Tunes the attenuator of a given channel to a given target using the standard scipy optimisation scripts. :Parameters: **channel** : str The chosen MPFU channel. Options: ['+', '-', '+', '-'] **tol** : float, optional The tolerance in attenuator parameter, by default 0.1 **maxiter** : int, optional The maximum number of iterations in the optimisation, by default 30 :Returns: float The optimal value of the attenuator parameter .. !! processed by numpydoc !! .. py:method:: tune(channels, tol = 0.1, bounds=[0, 100]) Tunes both the power and attenuation for a collection of channels. :Parameters: **channels** : dict A dictionary of MPFU channels to be tunned and the associated phase target.\ Channel options = ['+', '-', '+', '-']\ Phase target options = ['R+', 'R-', 'I+', 'I-']\ E.g. {'+': 'R+','-': 'R-'} **tol** : float, optional The tolerance for all optimisations, by default 0.1 .. !! processed by numpydoc !! .. py:method:: calc_d0()