Author: bugman Date: Wed Mar 2 17:19:37 2011 New Revision: 12731 URL: http://svn.gna.org/viewcvs/relax?rev=12731&view=rev Log: Fix for the model-free _load_relax_data() method. The method now generates the relaxation data structures itself rather than calling a function which was deleted from generic_fns.relax_data. Modified: branches/relax_data/specific_fns/model_free/results.py Modified: branches/relax_data/specific_fns/model_free/results.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_data/specific_fns/model_free/results.py?rev=12731&r1=12730&r2=12731&view=diff ============================================================================== --- branches/relax_data/specific_fns/model_free/results.py (original) +++ branches/relax_data/specific_fns/model_free/results.py Wed Mar 2 17:19:37 2011 @@ -571,8 +571,45 @@ if data_set == 'value' or data_set == 'error': sim = False - # Add the relaxation data. - add_data_to_spin(spin=spin, ri_labels=ri_labels, remap_table=remap_table, frq_labels=frq_labels, frq=frq, values=values, errors=errors, sim=sim) + # Loop over the relaxation data sets. + for i in range(len(ri_labels)): + # The ID string. + ri_id = "%s_%s" % (ri_labels[i], frq_labels[remap_table[i]]) + + # Initialise the global structures if necessary. + if not hasattr(cdp, 'ri_ids'): + cdp.ri_ids = [] + if not hasattr(cdp, 'ri_type'): + cdp.ri_type = {} + if not hasattr(cdp, 'frq'): + cdp.frq = {} + + # Update the global structures if necessary. + if ri_id not in cdp.ri_ids: + cdp.ri_ids.append(ri_id) + cdp.ri_type[ri_id] = ri_labels[i] + cdp.frq[ri_id] = frq[remap_table[i]] + + # Simulation data. + if sim: + # Initialise. + if not hasattr(spin, 'ri_data_sim'): + spin.ri_data_sim = {} + + # Set the value. + spin.ri_data_sim[ri_id] = values[i] + + # Normal data. + else: + # Initialise. + if not hasattr(spin, 'ri_data'): + spin.ri_data = {} + if not hasattr(spin, 'ri_data_err'): + spin.ri_data_err = {} + + # Set the value. + spin.ri_data[ri_id] = values[i] + spin.ri_data_err[ri_id] = errors[i] def _load_structure(self, spin_line, col, verbosity=1):