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

Class Frame_order

source code


Class containing the specific methods of the Frame Order theories.

Instance Methods [hide private]
 
__init__(self)
Initialise the class by placing API_common methods into the API.
source code
numpy rank-1 array, numpy rank-1 array
_assemble_limit_arrays(self)
Assemble and return the limit vectors.
source code
numpy rank-1 array
_assemble_param_vector(self, sim_index=None)
Assemble and return the parameter vector.
source code
numpy rank-2 array
_assemble_scaling_matrix(self, data_types=None, scaling=True)
Create and return the scaling matrix.
source code
 
_average_position(self, pivot='com', translation=True)
Set up the mechanics of the average domain position.
source code
list of str
_base_data_types(self)
Determine all the base data types.
source code
 
_check_rdcs(self, interatom, spin1, spin2)
Check if the RDCs for the given interatomic data container should be used.
source code
str
_domain_moving(self)
Return the spin ID string corresponding to the moving domain.
source code
list of float
_grid_row(self, incs, lower, upper, dist_type=None, end_point=True)
Set up a row of the grid search for a given parameter.
source code
numpy rank-3 array, numpy rank-1 array.
_minimise_setup_atomic_pos(self, sim_index=None)
Set up the atomic position data structures for optimisation using PCSs and PREs as base data sets.
source code
tuple of (numpy rank-2 array, numpy rank-2 array, numpy rank-2 array, numpy rank-1 array, numpy rank-1 array)
_minimise_setup_pcs(self, sim_index=None)
Set up the data structures for optimisation using PCSs as base data sets.
source code
tuple of (numpy rank-2 array, numpy rank-2 array, numpy rank-2 array, numpy rank-3 array, numpy rank-2 array, numpy rank-2 array)
_minimise_setup_rdcs(self, sim_index=None)
Set up the data structures for optimisation using RDCs as base data sets.
source code
tuple of 3 numpy nx5D, rank-1 arrays
_minimise_setup_tensors(self, sim_index=None)
Set up the data structures for optimisation using alignment tensors as base data sets.
source code
 
_num_int_pts(self, num=200000)
Set the number of integration points to use in the quasi-random Sobol' sequence.
source code
bool
_opt_uses_align_data(self, align_id=None)
Determine if the PCS or RDC data for the given alignment ID is needed for optimisation.
source code
bool
_opt_uses_pcs(self, align_id)
Determine if the PCS data for the given alignment ID is needed for optimisation.
source code
bool
_opt_uses_rdc(self, align_id)
Determine if the RDC data for the given alignment ID is needed for optimisation.
source code
int
_param_num(self)
Determine the number of parameters in the model.
source code
 
_pdb_ave_pos(self, file=None, dir=None, force=False)
Create a PDB file of the molecule with the moving domains shifted to the average position.
source code
 
_pdb_distribution(self, file=None, dir=None, force=False)
Create a PDB file of a distribution of positions coving the full dynamics of the moving domain.
source code
 
_pdb_geometric_rep(self, file=None, dir=None, size=30.0, inc=36, force=False, neg_cone=True)
Create a PDB file containing a geometric object representing the frame order dynamics.
source code
 
_pdb_model(self, ave_pos_file='ave_pos.pdb', rep_file='frame_order.pdb', dist_file='domain_distribution.pdb', dir=None, size=30.0, inc=36, force=False, neg_cone=True)
Create 3 different PDB files for representing the frame order dynamics of the system.
source code
 
_pivot(self, pivot=None, fix=None)
Set the pivot point for the 2 body motion.
source code
bool
_pivot_fixed(self)
Determine if the pivot is fixed or not.
source code
 
_quad_int(self, flag=False)
Turn the high precision Scipy quadratic numerical integration on or off.
source code
 
_ref_domain(self, ref=None)
Set the reference domain for the frame order, multi-domain models.
source code
 
_select_model(self, model=None)
Select the Frame Order model.
source code
 
_store_bc_data(self, target_fn)
Store the back-calculated data.
source code
 
_target_fn_setup(self, sim_index=None, scaling=True)
Initialise the target function for optimisation or direct calculation.
source code
(int, AlignTensorData instance)
_tensor_loop(self, red=False)
Generator method for looping over the full or reduced tensors.
source code
bool
_translation_fixed(self)
Is the translation of the average domain position fixed?
source code
 
_update_model(self)
Update the model parameters as necessary.
source code
 
_unpack_opt_results(self, results, scaling=False, scaling_matrix=None, sim_index=None)
Unpack and store the Frame Order optimisation results.
source code
list of str
base_data_loop(self)
Generator method for looping over the base data - alignment tensors, RDCs, PCSs.
source code
 
calculate(self, spin_id=None, verbosity=1, sim_index=None)
Calculate the chi-squared value for the current parameter values.
source code
list of floats
create_mc_data(self, data_id=None)
Create the Monte Carlo data by back calculating the reduced tensor data.
source code
 
deselect(self, model_info, sim_index=None)
Deselect models or simulations.
source code
 
duplicate_data(self, pipe_from=None, pipe_to=None, model_info=None, global_stats=False, verbose=True)
Duplicate the data specific to a single frame order data pipe.
source code
bool
eliminate(self, name, value, model_info, args, sim=None)
Model elimination method.
source code
list of str
get_param_names(self, model_info=None)
Return a vector of parameter names.
source code
list of str
get_param_values(self, model_info=None, sim_index=None)
Return a vector of parameter values.
source code
 
grid_search(self, lower=None, upper=None, inc=None, constraints=False, verbosity=0, sim_index=None)
Perform a grid search.
source code
bool
is_spin_param(self, name)
State that the parameter is not spin specific.
source code
list of float
map_bounds(self, param, spin_id=None)
Create bounds for the OpenDX mapping function.
source code
 
minimise(self, min_algor=None, min_options=None, func_tol=None, grad_tol=None, max_iterations=None, constraints=False, scaling=True, verbosity=0, sim_index=None, lower=None, upper=None, inc=None)
Minimisation function.
source code
str
model_desc(self, model_info)
Return a description of the model.
source code
SpinContainer instance
model_loop(self)
Dummy generator method.
source code
tuple of (int, int, float)
model_statistics(self, model_info=None, spin_id=None, global_stats=None)
Return the k, n, and chi2 model statistics.
source code
str
model_type(self)
Return the type of the model, either being 'local' or 'global'.
source code
list of float
return_error(self, data_id)
Return the alignment tensor error structure.
source code
str
return_units(self, param)
Return a string representing the parameters units.
source code
 
set_error(self, model_info, index, error)
Set the parameter errors.
source code
 
set_selected_sim(self, model_info, select_sim)
Set the simulation selection flag for the spin.
source code
 
sim_init_values(self)
Initialise the Monte Carlo parameter values.
source code
 
sim_pack_data(self, data_id, sim_data)
Pack the Monte Carlo simulation data.
source code
list of float
sim_return_param(self, model_info, index)
Return the array of simulation parameter values.
source code
list of int
sim_return_selected(self, model_info)
Return the array of selected simulation flags for the spin.
source code

Inherited from api_base.API_base: back_calc_ri, bmrb_read, bmrb_write, constraint_algorithm, data_init, data_names, data_type, default_value, has_errors, molmol_macro, num_instances, overfit_deselect, pymol_macro, read_columnar_results, return_conversion_factor, return_data, return_data_desc, return_data_name, return_grace_string, return_value, set_param_values, set_update, sim_return_chi2, skip_function, test_grid_ops

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from api_base.API_base: default_value_doc, eliminate_doc, return_data_name_doc, set_doc, write_doc

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initialise the class by placing API_common methods into the API.

Overrides: object.__init__

_assemble_limit_arrays(self)

source code 

Assemble and return the limit vectors.

Returns: numpy rank-1 array, numpy rank-1 array
The lower and upper limit vectors.

_assemble_param_vector(self, sim_index=None)

source code 

Assemble and return the parameter vector.

Parameters:
  • sim_index (int) - The Monte Carlo simulation index.
Returns: numpy rank-1 array
The parameter vector.

_assemble_scaling_matrix(self, data_types=None, scaling=True)

source code 

Create and return the scaling matrix.

Parameters:
  • data_types (list of str) - The base data types used in the optimisation. This list can contain the elements 'rdc', 'pcs' or 'tensor'.
  • scaling (bool) - If False, then the identity matrix will be returned.
Returns: numpy rank-2 array
The square and diagonal scaling matrix.

_average_position(self, pivot='com', translation=True)

source code 

Set up the mechanics of the average domain position.

Parameters:
  • pivot (str) - What to use as the motional pivot. This can be 'com' for the centre of mass of the moving domain, or 'motional' to link the pivot of the motion to the rotation of the average domain position.
  • translation (bool) - If True, translation to the average domain position will be allowed. If False, then translation will not occur.

_base_data_types(self)

source code 

Determine all the base data types.

The base data types can include:

   - 'rdc', residual dipolar couplings.
   - 'pcs', pseudo-contact shifts.
   - 'noesy', NOE restraints.
   - 'tensor', alignment tensors.
Returns: list of str
A list of all the base data types.

_check_rdcs(self, interatom, spin1, spin2)

source code 

Check if the RDCs for the given interatomic data container should be used.

Parameters:
  • interatom (InteratomContainer instance) - The interatomic data container.
  • spin1 (SpinContainer instance) - The first spin container.
  • spin2 (SpinContainer instance) - The second spin container.
Returns:
True if the RDCs should be used, False otherwise.

_domain_moving(self)

source code 

Return the spin ID string corresponding to the moving domain.

Returns: str
The spin ID string defining the moving domain.

_grid_row(self, incs, lower, upper, dist_type=None, end_point=True)

source code 

Set up a row of the grid search for a given parameter.

Parameters:
  • incs (int) - The number of increments.
  • lower (float) - The lower bounds.
  • upper (float) - The upper bounds.
  • dist_type (None or str) - The spacing or distribution type between grid nodes. If None, then a linear grid row is returned. If 'acos', then an inverse cos distribution of points is returned (e.g. for uniform sampling in angular space).
  • end_point (bool) - A flag which if False will cause the end point to be removed.
Returns: list of float
The row of the grid.

_minimise_setup_atomic_pos(self, sim_index=None)

source code 

Set up the atomic position data structures for optimisation using PCSs and PREs as base data sets.

Parameters:
  • sim_index (None or int) - The index of the simulation to optimise. This should be None if normal optimisation is desired.
Returns: numpy rank-3 array, numpy rank-1 array.
The atomic positions (the first index is the spins, the second is the structures, and the third is the atomic coordinates) and the paramagnetic centre.

_minimise_setup_pcs(self, sim_index=None)

source code 

Set up the data structures for optimisation using PCSs as base data sets.

Parameters:
  • sim_index (None or int) - The index of the simulation to optimise. This should be None if normal optimisation is desired.
Returns: tuple of (numpy rank-2 array, numpy rank-2 array, numpy rank-2 array, numpy rank-1 array, numpy rank-1 array)
The assembled data structures for using PCSs as the base data for optimisation. These include:
  • the PCS values.
  • the unit vectors connecting the paramagnetic centre (the electron spin) to
  • the PCS weight.
  • the nuclear spin.
  • the pseudocontact shift constants.

_minimise_setup_rdcs(self, sim_index=None)

source code 

Set up the data structures for optimisation using RDCs as base data sets.

Parameters:
  • sim_index (None or int) - The index of the simulation to optimise. This should be None if normal optimisation is desired.
Returns: tuple of (numpy rank-2 array, numpy rank-2 array, numpy rank-2 array, numpy rank-3 array, numpy rank-2 array, numpy rank-2 array)
The assembled data structures for using RDCs as the base data for optimisation. These include:
  • rdc, the RDC values.
  • rdc_err, the RDC errors.
  • rdc_weight, the RDC weights.
  • vectors, the interatomic vectors.
  • rdc_const, the dipolar constants.
  • absolute, the absolute value flags (as 1's and 0's).

_minimise_setup_tensors(self, sim_index=None)

source code 

Set up the data structures for optimisation using alignment tensors as base data sets.

Parameters:
  • sim_index (None or int) - The simulation index. This should be None if normal optimisation is desired.
Returns: tuple of 3 numpy nx5D, rank-1 arrays
The assembled data structures for using alignment tensors as the base data for optimisation. These include:
  • full_tensors, the full tensors as concatenated arrays.
  • full_err, the full tensor errors as concatenated arrays.
  • full_in_ref_frame, the flags specifying if the tensor is the full or reduced tensor in the non-moving reference domain.

_num_int_pts(self, num=200000)

source code 

Set the number of integration points to use in the quasi-random Sobol' sequence.

Parameters:
  • num (int) - The number of integration points.

_opt_uses_align_data(self, align_id=None)

source code 

Determine if the PCS or RDC data for the given alignment ID is needed for optimisation.

Parameters:
  • align_id (str) - The optional alignment ID string.
Returns: bool
True if alignment data is to be used for optimisation, False otherwise.

_opt_uses_pcs(self, align_id)

source code 

Determine if the PCS data for the given alignment ID is needed for optimisation.

Parameters:
  • align_id (str) - The alignment ID string.
Returns: bool
True if the PCS data is to be used for optimisation, False otherwise.

_opt_uses_rdc(self, align_id)

source code 

Determine if the RDC data for the given alignment ID is needed for optimisation.

Parameters:
  • align_id (str) - The alignment ID string.
Returns: bool
True if the RDC data is to be used for optimisation, False otherwise.

_param_num(self)

source code 

Determine the number of parameters in the model.

Returns: int
The number of model parameters.

_pdb_ave_pos(self, file=None, dir=None, force=False)

source code 

Create a PDB file of the molecule with the moving domains shifted to the average position.

Parameters:
  • file (str) - The name of the file for the average molecule structure.
  • dir (str) - The name of the directory to place the PDB file into.
  • force (bool) - Flag which if set to True will cause any pre-existing file to be overwritten.

_pdb_distribution(self, file=None, dir=None, force=False)

source code 

Create a PDB file of a distribution of positions coving the full dynamics of the moving domain.

Parameters:
  • file (str) - The name of the file which will contain multiple models spanning the full dynamics distribution of the frame order model.
  • dir (str) - The name of the directory to place the PDB file into.
  • force (bool) - Flag which if set to True will cause any pre-existing file to be overwritten.

_pdb_geometric_rep(self, file=None, dir=None, size=30.0, inc=36, force=False, neg_cone=True)

source code 

Create a PDB file containing a geometric object representing the frame order dynamics.

Parameters:
  • file (str) - The name of the file of the PDB representation of the frame order dynamics to create.
  • dir (str) - The name of the directory to place the PDB file into.
  • size (float) - The size of the geometric object in Angstroms.
  • inc (int) - The number of increments for the filling of the cone objects.
  • force (bool) - Flag which if set to True will cause any pre-existing file to be overwritten.
  • neg_cone (bool) - A flag which if True will cause the negative cone to be added to the representation.

_pdb_model(self, ave_pos_file='ave_pos.pdb', rep_file='frame_order.pdb', dist_file='domain_distribution.pdb', dir=None, size=30.0, inc=36, force=False, neg_cone=True)

source code 

Create 3 different PDB files for representing the frame order dynamics of the system.

Parameters:
  • ave_pos_file (str) - The name of the file for the average molecule structure.
  • rep_file (str) - The name of the file of the PDB representation of the frame order dynamics to create.
  • dist_file (str) - The name of the file which will contain multiple models spanning the full dynamics distribution of the frame order model.
  • dir (str) - The name of the directory to place the PDB file into.
  • size (float) - The size of the geometric object in Angstroms.
  • inc (int) - The number of increments for the filling of the cone objects.
  • force (bool) - Flag which if set to True will cause any pre-existing file to be overwritten.
  • neg_cone (bool) - A flag which if True will cause the negative cone to be added to the representation.

_pivot(self, pivot=None, fix=None)

source code 

Set the pivot point for the 2 body motion.

Parameters:
  • pivot (list of num) - The pivot point of the two bodies (domains, etc.) in the structural coordinate system.
  • fix (bool) - A flag specifying if the pivot point should be fixed during optimisation.

_pivot_fixed(self)

source code 

Determine if the pivot is fixed or not.

Returns: bool
The answer to the question.

_quad_int(self, flag=False)

source code 

Turn the high precision Scipy quadratic numerical integration on or off.

Parameters:
  • flag (bool) - The flag which if True will perform high precision numerical integration via the scipy.integrate quad(), dblquad() and tplquad() integration methods rather than the rough quasi-random numerical integration.

_ref_domain(self, ref=None)

source code 

Set the reference domain for the frame order, multi-domain models.

Parameters:
  • ref (str) - The reference domain.

_select_model(self, model=None)

source code 

Select the Frame Order model.

Parameters:
  • model (str) - The Frame Order model. This can be one of 'pseudo-ellipse', 'pseudo-ellipse, torsionless', 'pseudo-ellipse, free rotor', 'iso cone', 'iso cone, torsionless', 'iso cone, free rotor', 'line', 'line, torsionless', 'line, free rotor', 'rotor', 'rigid', 'free rotor'.

_store_bc_data(self, target_fn)

source code 

Store the back-calculated data.

Parameters:
  • target_fn (class instance) - The frame-order target function class.

_target_fn_setup(self, sim_index=None, scaling=True)

source code 

Initialise the target function for optimisation or direct calculation.

Parameters:
  • sim_index (None or int) - The index of the simulation to optimise. This should be None if normal optimisation is desired.
  • scaling (bool) - If True, diagonal scaling is enabled during optimisation to allow the problem to be better conditioned.

_tensor_loop(self, red=False)

source code 

Generator method for looping over the full or reduced tensors.

Parameters:
  • red (bool) - A flag which if True causes the reduced tensors to be returned, and if False the full tensors are returned.
Returns: (int, AlignTensorData instance)
The tensor index and the tensor.

_translation_fixed(self)

source code 

Is the translation of the average domain position fixed?

Returns: bool
The answer to the question.

_unpack_opt_results(self, results, scaling=False, scaling_matrix=None, sim_index=None)

source code 

Unpack and store the Frame Order optimisation results.

Parameters:
  • results (tuple) - The results tuple returned by the minfx generic_minimise() function.
  • scaling (bool) - If True, diagonal scaling is enabled during optimisation to allow the problem to be better conditioned.
  • scaling_matrix (numpy rank-2 array) - The scaling matrix.
  • sim_index (None or int) - The index of the simulation to optimise. This should be None for normal optimisation.

base_data_loop(self)

source code 

Generator method for looping over the base data - alignment tensors, RDCs, PCSs.

This loop yields the following:

  • The RDC identification data for the interatomic data container and alignment.
  • The PCS identification data for the spin data container and alignment.
Returns: list of str
The base data type ('rdc' or 'pcs'), the spin or interatomic data container information (either one or two spin IDs), and the alignment ID string.
Overrides: api_base.API_base.base_data_loop

calculate(self, spin_id=None, verbosity=1, sim_index=None)

source code 

Calculate the chi-squared value for the current parameter values.

Parameters:
  • spin_id (None) - The spin identification string (unused).
  • verbosity (int) - The amount of information to print. The higher the value, the greater the verbosity.
  • sim_index (None or int) - The optional MC simulation index (unused).
Overrides: api_base.API_base.calculate

create_mc_data(self, data_id=None)

source code 

Create the Monte Carlo data by back calculating the reduced tensor data.

Parameters:
  • data_id (list of str) - The data set as yielded by the base_data_loop() generator method.
Returns: list of floats
The Monte Carlo simulation data.
Overrides: api_base.API_base.create_mc_data

deselect(self, model_info, sim_index=None)

source code 

Deselect models or simulations.

Parameters:
  • model_info (int) - The model index from model_loop(). This is zero for the global models or equal to the global spin index (which covers the molecule, residue, and spin indices).
  • sim_index (None or int) - The optional Monte Carlo simulation index. If None, then models will be deselected, otherwise the given simulation will.
Overrides: api_base.API_base.deselect

duplicate_data(self, pipe_from=None, pipe_to=None, model_info=None, global_stats=False, verbose=True)

source code 

Duplicate the data specific to a single frame order data pipe.

Parameters:
  • pipe_from (str) - The data pipe to copy the data from.
  • pipe_to (str) - The data pipe to copy the data to.
  • model_info (int) - The model index from model_loop().
  • global_stats (bool) - The global statistics flag.
  • verbose (bool) - Unused.
Overrides: api_base.API_base.duplicate_data

eliminate(self, name, value, model_info, args, sim=None)

source code 

Model elimination method.

Parameters:
  • name (str) - The parameter name.
  • value (float) - The parameter value.
  • model_info (int) - The model index from model_info().
  • args (None or tuple of float) - The elimination constant overrides.
  • sim (int) - The Monte Carlo simulation index.
Returns: bool
True if the model is to be eliminated, False otherwise.
Overrides: api_base.API_base.eliminate

get_param_names(self, model_info=None)

source code 

Return a vector of parameter names.

Parameters:
  • model_info (int) - The model index from model_info().
Returns: list of str
The vector of parameter names.
Overrides: api_base.API_base.get_param_names

get_param_values(self, model_info=None, sim_index=None)

source code 

Return a vector of parameter values.

Parameters:
  • model_info (int) - The model index from model_info(). This is zero for the global models or equal to the global spin index (which covers the molecule, residue, and spin indices).
  • sim_index (int) - The Monte Carlo simulation index.
Returns: list of str
The vector of parameter values.
Overrides: api_base.API_base.get_param_values

grid_search(self, lower=None, upper=None, inc=None, constraints=False, verbosity=0, sim_index=None)

source code 

Perform a grid search.

Parameters:
  • lower (list of float) - The lower bounds of the grid search which must be equal to the number of parameters in the model.
  • upper (list of float) - The upper bounds of the grid search which must be equal to the number of parameters in the model.
  • inc (int or list of int) - The 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.
  • constraints (bool) - If True, constraints are applied during the grid search (eliminating parts of the grid). If False, no constraints are used.
  • verbosity (int) - A flag specifying the amount of information to print. The higher the value, the greater the verbosity.
  • sim_index (None or int) - The Monte Carlo simulation index.
Overrides: api_base.API_base.grid_search

is_spin_param(self, name)

source code 

State that the parameter is not spin specific.

Parameters:
  • name (str) - The name of the parameter.
Returns: bool
False.
Overrides: api_base.API_base.is_spin_param

map_bounds(self, param, spin_id=None)

source code 

Create bounds for the OpenDX mapping function.

Parameters:
  • param (str) - The name of the parameter to return the lower and upper bounds of.
  • spin_id (None) - The spin identification string (unused).
Returns: list of float
The upper and lower bounds of the parameter.
Overrides: api_base.API_base.map_bounds

minimise(self, min_algor=None, min_options=None, func_tol=None, grad_tol=None, max_iterations=None, constraints=False, scaling=True, verbosity=0, sim_index=None, lower=None, upper=None, inc=None)

source code 

Minimisation function.

Parameters:
  • 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 (bool) - If True, diagonal scaling is enabled during optimisation to allow the problem to be better conditioned.
  • verbosity (int) - A flag specifying 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 (array of numbers) - The 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 (array of numbers) - The 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 (array of int) - The 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.
Overrides: api_base.API_base.minimise

model_desc(self, model_info)

source code 

Return a description of the model.

Parameters:
  • model_info (int) - The model index from model_loop().
Returns: str
The model description.
Overrides: api_base.API_base.model_desc

model_loop(self)

source code 

Dummy generator method.

In this case only a single model per spin system is assumed. Hence the yielded data is the spin container object.

Returns: SpinContainer instance
Information about the model which for this analysis is the spin container.
Overrides: api_base.API_base.model_loop

model_statistics(self, model_info=None, spin_id=None, global_stats=None)

source code 

Return the k, n, and chi2 model statistics.

k - number of parameters. n - number of data points. chi2 - the chi-squared value.

Parameters:
  • model_info (None) - Unused.
  • spin_id (None) - The spin identification string (unused).
  • global_stats (None) - Unused.
Returns: tuple of (int, int, float)
The optimisation statistics, in tuple format, of the number of parameters (k), the number of data points (n), and the chi-squared value (chi2).
Overrides: api_base.API_base.model_statistics

model_type(self)

source code 

Return the type of the model, either being 'local' or 'global'.

Returns: str
The model type, one of 'local' or 'global'.
Overrides: api_base.API_base.model_type

return_error(self, data_id)

source code 

Return the alignment tensor error structure.

Parameters:
  • data_id (list of str) - The data set as yielded by the base_data_loop() generator method.
Returns: list of float
The array of tensor error values.
Overrides: api_base.API_base.return_error

return_units(self, param)

source code 

Return a string representing the parameters units.

Parameters:
  • param (str) - The name of the parameter to return the units string for.
Returns: str
The parameter units string.
Overrides: api_base.API_base.return_units

set_error(self, model_info, index, error)

source code 

Set the parameter errors.

Parameters:
  • model_info (None) - The model information originating from model_loop() (unused).
  • index (int) - The index of the parameter to set the errors for.
  • error (float) - The error value.
Overrides: api_base.API_base.set_error

set_selected_sim(self, model_info, select_sim)

source code 

Set the simulation selection flag for the spin.

Parameters:
  • model_info (None) - The model information originating from model_loop() (unused).
  • select_sim (bool) - The selection flag for the simulations.
Overrides: api_base.API_base.set_selected_sim

sim_init_values(self)

source code 

Initialise the Monte Carlo parameter values.

Overrides: api_base.API_base.sim_init_values

sim_pack_data(self, data_id, sim_data)

source code 

Pack the Monte Carlo simulation data.

Parameters:
  • data_id (list of str) - The data set as yielded by the base_data_loop() generator method.
  • sim_data (list of float) - The Monte Carlo simulation data.
Overrides: api_base.API_base.sim_pack_data

sim_return_param(self, model_info, index)

source code 

Return the array of simulation parameter values.

Parameters:
  • model_info (unknown) - The model information originating from model_loop().
  • index (int) - The index of the parameter to return the array of values for.
Returns: list of float
The array of simulation parameter values.
Overrides: api_base.API_base.sim_return_param

sim_return_selected(self, model_info)

source code 

Return the array of selected simulation flags for the spin.

Parameters:
  • model_info (None) - The model information originating from model_loop() (unused).
Returns: list of int
The array of selected simulation flags.
Overrides: api_base.API_base.sim_return_selected