Package specific_analyses :: Package relax_disp :: Module optimisation
[hide private]
[frames] | no frames]

Module optimisation

source code

Module for the optimisation of the relaxation dispersion models.

Classes [hide private]
  Disp_memo
The relaxation dispersion memo class.
  Disp_minimise_command
Command class for relaxation dispersion optimisation on the slave processor.
  Disp_result_command
Class for processing the dispersion optimisation results.
Functions [hide private]
numpy rank-1 float array
back_calc_peak_intensities(spin=None, spin_id=None, exp_type=None, frq=None, offset=None, point=None)
Back-calculation of peak intensity for the given relaxation time.
source code
numpy rank-1 float array
back_calc_r2eff(spins=None, spin_ids=None, cpmg_frqs=None, spin_lock_offset=None, spin_lock_nu1=None, relax_times_new=None, store_chi2=False)
Back-calculation of R2eff/R1rho values for the given spin.
source code
 
calculate_r2eff()
Calculate the R2eff values for fixed relaxation time period data.
source code
 
minimise_r2eff(spins=None, spin_ids=None, min_algor=None, min_options=None, func_tol=None, grad_tol=None, max_iterations=None, constraints=False, scaling_matrix=None, verbosity=0, sim_index=None, lower=None, upper=None, inc=None)
Optimise the R2eff model by fitting the 2-parameter exponential curves.
source code
Variables [hide private]
  __package__ = 'specific_analyses.relax_disp'

Imports: generic_minimise, grid, dot, float64, int32, ones, zeros, inv, mul, match, search, sys, warn, C_module_exp_fn, calc_two_point_r2eff, calc_two_point_r2eff_err, EXP_TYPE_LIST_CPMG, MODEL_CR72, MODEL_CR72_FULL, MODEL_LM63, MODEL_M61, MODEL_MP05, MODEL_TAP03, MODEL_TP02, RelaxError, subsection, RelaxWarning, Memo, Result_command, Slave_command, generate_spin_string, spin_loop, check_disp_points, check_exp_type, check_exp_type_fixed_time, average_intensity, count_spins, find_intensity_keys, has_exponential_exp_type, has_proton_mmq_cpmg, is_r1_optimised, loop_exp, loop_exp_frq_offset_point, loop_exp_frq_offset_point_time, loop_frq, loop_offset, loop_time, pack_back_calc_r2eff, return_cpmg_frqs, return_offset_data, return_param_key_from_data, return_r1_data, return_r2eff_arrays, return_spin_lock_nu1, assemble_param_vector, disassemble_param_vector, linear_constraints, param_conversion, param_num, r1_setup, Dispersion, Relax_fit_opt


Function Details [hide private]

back_calc_peak_intensities(spin=None, spin_id=None, exp_type=None, frq=None, offset=None, point=None)

source code 

Back-calculation of peak intensity for the given relaxation time.

Parameters:
  • spin (SpinContainer instance) - The specific spin data container.
  • spin_id (str or None) - The optional spin ID string for use in warning messages.
  • exp_type (str) - The experiment type.
  • frq (float) - The spectrometer frequency.
  • offset (None or float) - For R1rho-type data, the spin-lock offset value in ppm.
  • point (float) - The dispersion point data (either the spin-lock field strength in Hz or the nu_CPMG frequency in Hz).
Returns: numpy rank-1 float array
The back-calculated peak intensities for the given exponential curve.

back_calc_r2eff(spins=None, spin_ids=None, cpmg_frqs=None, spin_lock_offset=None, spin_lock_nu1=None, relax_times_new=None, store_chi2=False)

source code 

Back-calculation of R2eff/R1rho values for the given spin.

Parameters:
  • spins (List of SpinContainer instances) - The list of specific spin data container for cluster.
  • spin_ids (list of str) - The list of spin ID strings for the spin containers in cluster.
  • cpmg_frqs (list of lists of numpy rank-1 float arrays) - The CPMG frequencies to use instead of the user loaded values - to enable interpolation.
  • spin_lock_offset (list of lists of numpy rank-1 float arrays) - The spin-lock offsets to use instead of the user loaded values - to enable interpolation.
  • spin_lock_nu1 (list of lists of numpy rank-1 float arrays) - The spin-lock field strengths to use instead of the user loaded values - to enable interpolation.
  • relax_times_new (rank-4 list of floats) - The interpolated experiment specific fixed time period for relaxation (in seconds). The dimensions are {Ei, Mi, Oi, Di, Ti}.
  • store_chi2 (bool) - A flag which if True will cause the spin specific chi-squared value to be stored in the spin container.
Returns: numpy rank-1 float array
The back-calculated R2eff/R1rho value for the given spin.

minimise_r2eff(spins=None, spin_ids=None, min_algor=None, min_options=None, func_tol=None, grad_tol=None, max_iterations=None, constraints=False, scaling_matrix=None, verbosity=0, sim_index=None, lower=None, upper=None, inc=None)

source code 

Optimise the R2eff model by fitting the 2-parameter exponential curves.

This mimics the R1 and R2 relax_fit analysis.

Parameters:
  • spins (list of SpinContainer instances) - The list of spins for the cluster.
  • spin_ids (list of str) - The list of spin IDs for the cluster.
  • min_algor (str) - The minimisation algorithm to use.
  • min_options (array of str) - An array of options to be used by the minimisation algorithm.
  • func_tol (None or float) - The function tolerance which, when reached, terminates optimisation. Setting this to None turns of the check.
  • grad_tol (None or float) - The gradient tolerance which, when reached, terminates optimisation. Setting this to None turns of the check.
  • max_iterations (int) - The maximum number of iterations for the algorithm.
  • constraints (bool) - If True, constraints are used during optimisation.
  • scaling_matrix (numpy rank-2, float64 array or None) - The diagonal and square scaling matrix.
  • verbosity (int) - The amount of information to print. The higher the value, the greater the verbosity.
  • sim_index (None or int) - The index of the simulation to optimise. This should be None if normal optimisation is desired.
  • lower (list of numbers) - The model specific lower bounds of the grid search which must be equal to the number of parameters in the model. This optional argument is only used when doing a grid search.
  • upper (list of numbers) - The model specific upper bounds of the grid search which must be equal to the number of parameters in the model. This optional argument is only used when doing a grid search.
  • inc (list of int) - The model specific increments for each dimension of the space for the grid search. The number of elements in the array must equal to the number of parameters in the model. This argument is only used when doing a grid search.