Author: bugman Date: Tue May 8 23:48:05 2007 New Revision: 3288 URL: http://svn.gna.org/viewcvs/relax?rev=3288&view=rev Log: Fix for bug #9101 (https://gna.org/bugs/?9101). The relax_data.read() user function was failing when the data or error column contained the text 'None' which is the default output for deselected spin systems in the exponential curve fitting component of relax. This is now fixed. Modified: 1.2/errors.py 1.2/specific_fns/model_free.py 1.2/specific_fns/relax_data.py Modified: 1.2/errors.py URL: http://svn.gna.org/viewcvs/relax/1.2/errors.py?rev=3288&r1=3287&r2=3288&view=diff ============================================================================== --- 1.2/errors.py (original) +++ 1.2/errors.py Tue May 8 23:48:05 2007 @@ -42,7 +42,7 @@ object = getattr(self, name) # Skip over all non error class objects. - if not (isinstance(object, ClassType) or isinstance(object, type(type))) or not match('Relax', name): + if type(object) != ClassType or not match('Relax', name): continue # Add the top level relax class: @@ -676,7 +676,7 @@ object = getattr(self, name) # Skip over all non-warning class objects. - if not (isinstance(object, ClassType) or isinstance(object, type(type))) or not match('Relax', name): + if type(object) != ClassType or not match('Relax', name): continue # Place the warnings into __builtin__ Modified: 1.2/specific_fns/model_free.py URL: http://svn.gna.org/viewcvs/relax/1.2/specific_fns/model_free.py?rev=3288&r1=3287&r2=3288&view=diff ============================================================================== --- 1.2/specific_fns/model_free.py (original) +++ 1.2/specific_fns/model_free.py Tue May 8 23:48:05 2007 @@ -4977,7 +4977,7 @@ xh_vect = replace(`data.xh_vect.tolist()`, ' ', '') # Write the line. - self.write_columnar_line(file=file, num=data.num, name=data.name, select=data.select, data_set='error', nucleus=nucleus, model=model, equation=equation, params=params, param_set=self.param_set, s2=s2, s2f=s2f, s2s=s2s, local_tm=local_tm, te=te, tf=tf, ts=ts, rex=rex, r=r, csa=csa, diff_type=diff_type, diff_params=diff_params, pdb=pdb, pdb_model=pdb_model, pdb_heteronuc=pdb_heteronuc, pdb_proton=pdb_proton, xh_vect=xh_vect, ri_labels=ri_labels, remap_table=remap_table, frq_labels=frq_labels, frq=frq, ri=ri, ri_error=ri_error) + self.write_columnar_line(file=file, num=data.num, name=data.name, select=data.select, data_set='error', nucleus=nucleus, model=model, equation=equation, params=params, param_set=self.param_set, s2=s2, s2f=s2f, s2s=s2s, local_tm=local_tm, te=te, tf=tf, ts=ts, rex=rex, r=r, csa=csa, diff_type=diff_type, diff_params=diff_params, pdb=pdb, pdb_model=pdb_model, pdb_heteronuc=data.heteronuc, pdb_proton=data.proton, xh_vect=xh_vect, ri_labels=ri_labels, remap_table=remap_table, frq_labels=frq_labels, frq=frq, ri=ri, ri_error=ri_error) # Simulation values. @@ -5141,10 +5141,6 @@ ri = [] ri_error = [] for k in xrange(self.relax.data.num_ri[self.run]): - # No relaxation data. - if not hasattr(data, 'num_ri'): - break - # Find the residue specific data corresponding to k. index = None for l in xrange(data.num_ri): @@ -5165,7 +5161,7 @@ xh_vect = replace(`data.xh_vect.tolist()`, ' ', '') # Write the line. - self.write_columnar_line(file=file, num=data.num, name=data.name, select=data.select, select_sim=select_sim, data_set='sim_'+`i`, nucleus=nucleus, model=model, equation=equation, params=params, param_set=self.param_set, s2=s2, s2f=s2f, s2s=s2s, local_tm=local_tm, te=te, tf=tf, ts=ts, rex=rex, r=r, csa=csa, chi2=chi2, i=iter, f=f, g=g, h=h, warn=warn, diff_type=diff_type, diff_params=diff_params, pdb=pdb, pdb_model=pdb_model, pdb_heteronuc=pdb_heteronuc, pdb_proton=pdb_proton, xh_vect=xh_vect, ri_labels=ri_labels, remap_table=remap_table, frq_labels=frq_labels, frq=frq, ri=ri, ri_error=ri_error) + self.write_columnar_line(file=file, num=data.num, name=data.name, select=data.select, select_sim=select_sim, data_set='sim_'+`i`, nucleus=nucleus, model=model, equation=equation, params=params, param_set=self.param_set, s2=s2, s2f=s2f, s2s=s2s, local_tm=local_tm, te=te, tf=tf, ts=ts, rex=rex, r=r, csa=csa, chi2=chi2, i=iter, f=f, g=g, h=h, warn=warn, diff_type=diff_type, diff_params=diff_params, pdb=pdb, pdb_model=pdb_model, pdb_heteronuc=data.heteronuc, pdb_proton=data.proton, xh_vect=xh_vect, ri_labels=ri_labels, remap_table=remap_table, frq_labels=frq_labels, frq=frq, ri=ri, ri_error=ri_error) Modified: 1.2/specific_fns/relax_data.py URL: http://svn.gna.org/viewcvs/relax/1.2/specific_fns/relax_data.py?rev=3288&r1=3287&r2=3288&view=diff ============================================================================== --- 1.2/specific_fns/relax_data.py (original) +++ 1.2/specific_fns/relax_data.py Tue May 8 23:48:05 2007 @@ -578,6 +578,8 @@ # Skip missing data. if len(file_data[i]) <= min_col_num: continue + elif file_data[i][data_col] == 'None' or file_data[i][error_col] == 'None': + continue # Test that the data are numbers. try: