Module optimisation
source code
The N-state model or structural ensemble analysis optimisation 
  functions.
    |  |  | 
    | numpy rank-3 array, numpy rank-1 array. |  | 
    | tuple of (list, numpy rank-1 array, numpy rank-1 array, numpy rank-1 
      array) |  | 
    | numpy rank-1 array. |  | 
    |  | 
        
          | target_fn_setup(sim_index=None,
        scaling_matrix=None,
        verbosity=0) Initialise the target function for optimisation or direct 
      calculation.
 | source code |  | 
    |  | __package__ = 'specific_analyses.n_state_model' | 
Imports:
  array,
  dot,
  float64,
  ones,
  zeros,
  inv,
  fix_invalid,
  RelaxError,
  RelaxNoModelError,
  align_tensor,
  opt_uses_align_data,
  opt_uses_tensor,
  interatomic_loop,
  return_spin,
  spin_loop,
  return_pcs_data,
  check_rdcs,
  return_rdc_data,
  base_data_types,
  tensor_loop,
  assemble_param_vector,
  update_model,
  N_state_opt
| Extract and unpack the back calculated data. 
    Parameters:
        model(class instance) - The instantiated class containing the target function.sim_index(None or int) - The optional Monte Carlo simulation index. | 
 
| 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. | 
 
| Set up the data structures for optimisation using alignment tensors 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 (list, numpy rank-1 array, numpy rank-1 array, numpy rank-1 
      array)The assembled data structures for using alignment tensors as the 
          base data for optimisation.  These include:
          
            
              full_tensors, the data of the full alignment tensors.
            
              red_tensor_elem, the tensors as concatenated rank-1 5D 
              arrays.
            
              red_tensor_err, the tensor errors as concatenated rank-1 5D 
              arrays.
            
              full_in_ref_frame, flags specifying if the tensor in the 
              reference frame is the full or reduced tensor.
             | 
 
| Set up the data structures for the fixed alignment tensors. 
    Returns: numpy rank-1 array.The assembled data structures for the fixed alignment tensors. | 
 
| 
  | target_fn_setup(sim_index=None,
        scaling_matrix=None,
        verbosity=0)
   | 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_matrix(numpy rank-2, float64 array or None) - The diagonal and square scaling matrix.verbosity(int) - A flag specifying the amount of information to print.  The higher
          the value, the greater the verbosity. |