Package maths_fns :: Module frame_order :: Class Frame_order
[hide private]
[frames] | no frames]

Class Frame_order

source code

Class containing the target function of the optimisation of Frame Order matrix components.

Instance Methods [hide private]
 
__init__(self, model=None, init_params=None, full_tensors=None, red_tensors=None, red_errors=None, full_in_ref_frame=None, frame_order_2nd=None)
Set up the target functions for the Frame Order theories.
source code
 
__init_tensors(self)
Set up isotropic cone optimisation against the alignment tensor data.
source code
 
__init_iso_cone_elements(self, frame_order_2nd)
Set up isotropic cone optimisation against the 2nd degree Frame Order matrix elements.
source code
float
func_free_rotor(self, params)
Target function for free rotor model optimisation.
source code
float
func_iso_cone_elements(self, params)
Target function for isotropic cone model optimisation using the Frame Order matrix.
source code
float
func_iso_cone(self, params)
Target function for isotropic cone model optimisation.
source code
float
func_iso_cone_free_rotor(self, params)
Target function for free rotor isotropic cone model optimisation.
source code
float
func_iso_cone_torsionless(self, params)
Target function for torsionless isotropic cone model optimisation.
source code
float
func_pseudo_ellipse(self, params)
Target function for pseudo-elliptic cone model optimisation.
source code
float
func_pseudo_ellipse_free_rotor(self, params)
Target function for free_rotor pseudo-elliptic cone model optimisation.
source code
float
func_pseudo_ellipse_torsionless(self, params)
Target function for torsionless pseudo-elliptic cone model optimisation.
source code
float
func_rigid(self, params)
Target function for rigid model optimisation.
source code
float
func_rotor(self, params)
Target function for rotor model optimisation.
source code
 
reduce_and_rot(self, ave_pos_alpha=None, ave_pos_beta=None, ave_pos_gamma=None, daeg=None)
Reduce and rotate the alignments tensors using the frame order matrix and Euler angles.
source code
Method Details [hide private]

__init__(self, model=None, init_params=None, full_tensors=None, red_tensors=None, red_errors=None, full_in_ref_frame=None, frame_order_2nd=None)
(Constructor)

source code 

Set up the target functions for the Frame Order theories.

Parameters:
  • model (str) - The name of the Frame Order model.
  • init_params (numpy float64 array) - The initial parameter values.
  • full_tensors (numpy nx5D, rank-1 float64 array) - An array of the {Sxx, Syy, Sxy, Sxz, Syz} values for all full alignment tensors. The format is [Sxx1, Syy1, Sxy1, Sxz1, Syz1, Sxx2, Syy2, Sxy2, Sxz2, Syz2, ..., Sxxn, Syyn, Sxyn, Sxzn, Syzn].
  • red_tensors (numpy nx5D, rank-1 float64 array) - An array of the {Sxx, Syy, Sxy, Sxz, Syz} values for all reduced tensors. The array format is the same as for full_tensors.
  • red_errors (numpy nx5D, rank-1 float64 array) - An array of the {Sxx, Syy, Sxy, Sxz, Syz} errors for all reduced tensors. The array format is the same as for full_tensors.
  • full_in_ref_frame (numpy rank-1 array) - An array of flags specifying if the tensor in the reference frame is the full or reduced tensor.
  • frame_order_2nd (None or numpy 9D, rank-2 array) - The numerical values of the 2nd degree Frame Order matrix. If supplied, the target functions will optimise directly to these values.

__init_iso_cone_elements(self, frame_order_2nd)

source code 

Set up isotropic cone optimisation against the 2nd degree Frame Order matrix elements.

Parameters:
  • frame_order_2nd (numpy 9D, rank-2 array) - The numerical values of the 2nd degree Frame Order matrix. If supplied, the target functions will optimise directly to these values.

func_free_rotor(self, params)

source code 

Target function for free rotor model optimisation.

This function optimises against alignment tensors. The Euler angles for the tensor rotation are the first 3 parameters optimised in this model, followed by the polar and azimuthal angles of the cone axis.

Parameters:
  • params (list of float) - The vector of parameter values. These are the tensor rotation angles {alpha, beta, gamma, theta, phi}.
Returns: float
The chi-squared or SSE value.

func_iso_cone_elements(self, params)

source code 

Target function for isotropic cone model optimisation using the Frame Order matrix.

This function optimises by directly matching the elements of the 2nd degree Frame Order super matrix. The cone axis spherical angles theta and phi and the cone angle theta are the 3 parameters optimised in this model.

Parameters:
  • params (list of float) - The vector of parameter values {theta, phi, theta_cone} where the first two are the polar and azimuthal angles of the cone axis theta_cone is the isotropic cone angle.
Returns: float
The chi-squared or SSE value.

func_iso_cone(self, params)

source code 

Target function for isotropic cone model optimisation.

This function optimises against alignment tensors.

Parameters:
  • params (list of float) - The vector of parameter values {beta, gamma, theta, phi, s1} where the first 2 are the tensor rotation Euler angles, the next two are the polar and azimuthal angles of the cone axis, and s1 is the isotropic cone order parameter.
Returns: float
The chi-squared or SSE value.

func_iso_cone_free_rotor(self, params)

source code 

Target function for free rotor isotropic cone model optimisation.

This function optimises against alignment tensors.

Parameters:
  • params (list of float) - The vector of parameter values {beta, gamma, theta, phi, s1} where the first 2 are the tensor rotation Euler angles, the next two are the polar and azimuthal angles of the cone axis, and s1 is the isotropic cone order parameter.
Returns: float
The chi-squared or SSE value.

func_iso_cone_torsionless(self, params)

source code 

Target function for torsionless isotropic cone model optimisation.

This function optimises against alignment tensors.

Parameters:
  • params (list of float) - The vector of parameter values {beta, gamma, theta, phi, cone_theta} where the first 2 are the tensor rotation Euler angles, the next two are the polar and azimuthal angles of the cone axis, and cone_theta is cone opening angle.
Returns: float
The chi-squared or SSE value.

func_pseudo_ellipse(self, params)

source code 

Target function for pseudo-elliptic cone model optimisation.

Parameters:
  • params (list of float) - The vector of parameter values {alpha, beta, gamma, eigen_alpha, eigen_beta, eigen_gamma, cone_theta_x, cone_theta_y, cone_sigma_max} where the first 3 are the average position rotation Euler angles, the next 3 are the Euler angles defining the eigenframe, and the last 3 are the pseudo-elliptic cone geometric parameters.
Returns: float
The chi-squared or SSE value.

func_pseudo_ellipse_free_rotor(self, params)

source code 

Target function for free_rotor pseudo-elliptic cone model optimisation.

Parameters:
  • params (list of float) - The vector of parameter values {alpha, beta, gamma, eigen_alpha, eigen_beta, eigen_gamma, cone_theta_x, cone_theta_y} where the first 3 are the average position rotation Euler angles, the next 3 are the Euler angles defining the eigenframe, and the last 2 are the free_rotor pseudo-elliptic cone geometric parameters.
Returns: float
The chi-squared or SSE value.

func_pseudo_ellipse_torsionless(self, params)

source code 

Target function for torsionless pseudo-elliptic cone model optimisation.

Parameters:
  • params (list of float) - The vector of parameter values {alpha, beta, gamma, eigen_alpha, eigen_beta, eigen_gamma, cone_theta_x, cone_theta_y} where the first 3 are the average position rotation Euler angles, the next 3 are the Euler angles defining the eigenframe, and the last 2 are the torsionless pseudo-elliptic cone geometric parameters.
Returns: float
The chi-squared or SSE value.

func_rigid(self, params)

source code 

Target function for rigid model optimisation.

This function optimises against alignment tensors. The Euler angles for the tensor rotation are the 3 parameters optimised in this model.

Parameters:
  • params (list of float) - The vector of parameter values. These are the tensor rotation angles {alpha, beta, gamma}.
Returns: float
The chi-squared or SSE value.

func_rotor(self, params)

source code 

Target function for rotor model optimisation.

This function optimises against alignment tensors. The Euler angles for the tensor rotation are the first 3 parameters optimised in this model, followed by the polar and azimuthal angles of the cone axis and the torsion angle restriction.

Parameters:
  • params (list of float) - The vector of parameter values. These are the tensor rotation angles {alpha, beta, gamma, theta, phi, sigma_max}.
Returns: float
The chi-squared or SSE value.

reduce_and_rot(self, ave_pos_alpha=None, ave_pos_beta=None, ave_pos_gamma=None, daeg=None)

source code 

Reduce and rotate the alignments tensors using the frame order matrix and Euler angles.

Parameters:
  • ave_pos_alpha (float) - The alpha Euler angle describing the average domain position, the tensor rotation.
  • ave_pos_beta (float) - The beta Euler angle describing the average domain position, the tensor rotation.
  • ave_pos_gamma (float) - The gamma Euler angle describing the average domain position, the tensor rotation.
  • daeg (rank-2, 9D array) - The 2nd degree frame order matrix.