Author: bugman Date: Sun Jul 6 02:05:53 2008 New Revision: 6776 URL: http://svn.gna.org/viewcvs/relax?rev=6776&view=rev Log: Modified the convergence tests in the full_analysis.py script to print the IEEE-754 byte array. This representation is platform and float type (float vs. numpy.float64 vs. Numeric.Float64, etc.) independent. Even if the values evaluate to being equal, the python print out can be different. The IEEE-754 float byte array representation is independent of this insanity. Modified: 1.3/sample_scripts/full_analysis.py Modified: 1.3/sample_scripts/full_analysis.py URL: http://svn.gna.org/viewcvs/relax/1.3/sample_scripts/full_analysis.py?rev=6776&r1=6775&r2=6776&view=diff ============================================================================== --- 1.3/sample_scripts/full_analysis.py (original) +++ 1.3/sample_scripts/full_analysis.py Sun Jul 6 02:05:53 2008 @@ -380,7 +380,10 @@ print "Chi-squared test:" print " chi2 (k-1): " + `prev_pipe.chi2` + print " (as an IEEE-754 byte array: " + `floatAsByteArray(prev_pipe.chi2)` + ')' print " chi2 (k): " + `cdp.chi2` + print " (as an IEEE-754 byte array: " + `floatAsByteArray(cdp.chi2)` + ')' + print " chi2 (difference): " + `prev_pipe.chi2 - cdp.chi2` if prev_pipe.chi2 == cdp.chi2: print " The chi-squared value has converged.\n" else: @@ -440,7 +443,9 @@ if prev_val != curr_val: print " Parameter: " + param print " Value (k-1): " + `prev_val` + print " (as an IEEE-754 byte array: " + `floatAsByteArray(prev_val)` + ')' print " Value (k): " + `curr_val` + print " (as an IEEE-754 byte array: " + `floatAsByteArray(curr_val)` + ')' print " The diffusion parameters have not converged.\n" params_converged = False @@ -471,7 +476,9 @@ print " Spin system: " + `curr_spin.num` + ' ' + curr_spin.name print " Parameter: " + curr_spin.params[j] print " Value (k-1): " + `prev_val` + print " (as an IEEE-754 byte array: " + `floatAsByteArray(prev_val)` + ')' print " Value (k): " + `curr_val` + print " (as an IEEE-754 byte array: " + `floatAsByteArray(prev_val)` + ')' print " The model-free parameters have not converged.\n" params_converged = False break