- class 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
- echostr, optional
The echo type. Options = [‘Hahn”,”Refocused”], by default “Hahn”
- ps_lengthint, optional
The length of the pi/2 pulse, by default 16
- d0int, optional
- The approximate position of d0, this should be lower than ideal,
by default 680
- api¶
- hardware_wait = '5'¶
- ps_length¶
- d0¶
- srt¶
- _setup_echo(echo, tau1=400, tau2=400)¶
- 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:
- channelstr
The chosen MPFU channel. Options: [‘+<x>’, ‘-<x>’, ‘+<y>’, ‘-<y>’]
- targetstr
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-‘]
- tolfloat, optional
The tolerance in phase parameter, by default 0.1
- maxiterint, optional
The maximum number of iterations in the optimisation, by default 30
- Returns:
- float
The optimal value of the phase parameter
- 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:
- channelstr
The chosen MPFU channel. Options: [‘+<x>’, ‘-<x>’, ‘+<y>’, ‘-<y>’]
- tolfloat, optional
The tolerance in attenuator parameter, by default 0.1
- maxiterint, optional
The maximum number of iterations in the optimisation, by default 30
- Returns:
- float
The optimal value of the attenuator parameter
- tune(channels, tol=0.1, bounds=[0, 100])¶
Tunes both the power and attenuation for a collection of channels.
- Parameters:
- channelsdict
A dictionary of MPFU channels to be tunned and the associated phase target.Channel options = [‘+<x>’, ‘-<x>’, ‘+<y>’, ‘-<y>’]Phase target options = [‘R+’, ‘R-’, ‘I+’, ‘I-‘]E.g. {‘+<x>’: ‘R+’,’-<x>’: ‘R-‘}
- tolfloat, optional
The tolerance for all optimisations, by default 0.1
- calc_d0()¶