Author: bugman Date: Tue Jan 15 13:35:16 2008 New Revision: 4735 URL: http://svn.gna.org/viewcvs/relax?rev=4735&view=rev Log: Created a list of all the reduced alignment tensor elements (for the chi-squared function). Modified: branches/N_state_model/specific_fns/n_state_model.py Modified: branches/N_state_model/specific_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/branches/N_state_model/specific_fns/n_state_model.py?rev=4735&r1=4734&r2=4735&view=diff ============================================================================== --- branches/N_state_model/specific_fns/n_state_model.py (original) +++ branches/N_state_model/specific_fns/n_state_model.py Tue Jan 15 13:35:16 2008 @@ -191,6 +191,23 @@ if constraints: A, b = self.linear_constraints() + # Create a list of all the reduced alignment tensor elements (for the chi-squared function). + red_tensor_elem = [] + for tensor in cdp.align_tensor: + # Ignore the full tensors. + if not tensor.red: + continue + + # Append the 5 unique elements. + red_tensor_elem.append(tensor.Sxx) + red_tensor_elem.append(tensor.Syy) + red_tensor_elem.append(tensor.Sxy) + red_tensor_elem.append(tensor.Sxz) + red_tensor_elem.append(tensor.Syz) + + # Convert the reduced alignment tensor element list to a numpy array (for the chi-squared function maths). + red_tensor_elem = array(red_tensor_elem, float64) + # The aligment tensor errors, if they exist. tensor_err = None if hasattr(cdp, 'align_tensor_errors'):