mail[bug #22554] The distribution of intensity with errors in Monte-Carlo simulations are markedly more narrow than expected.


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Troels E. Linnet on August 31, 2014 - 23:02:
Follow-up Comment #8, bug #22554 (project relax):

SIGH.

It just take one line of code to ruin it all.
This is a else if statement going wrong.

# Loop over the replicates.
for i in range(len(int_keys)):
    # Simulation intensity data.
    if sim_index != None:
        # Error checking.
        if not int_keys[i] in spin.peak_intensity_sim:
            raise RelaxError("The peak intensity simulation data is missing
the key '%s'." % int_keys[i])

        # Sum.
        intensity += spin.peak_intensity_sim[int_keys[i]][sim_index]
        print spin.peak_intensity_sim[int_keys[i]][sim_index]

    # Error intensity data.
    if error:
        # Error checking.
        if not hasattr(spin, 'peak_intensity_err') or not int_keys[i] in
spin.peak_intensity_err:
            raise RelaxError("The peak intensity errors are missing the key
'%s'." % int_keys[i])

        # Sum.
        intensity += spin.peak_intensity_err[int_keys[i]]**2

    # Normal intensity data.
    else:
        # Error checking.
        if not int_keys[i] in spin.peak_intensity:
            raise RelaxError("The peak intensity data is missing the key
'%s'." % int_keys[i])

        # Sum.
        intensity += spin.peak_intensity[int_keys[i]]
        print spin.peak_intensity[int_keys[i]]

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?22554>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/




Related Messages


Powered by MHonArc, Updated Mon Sep 01 00:00:38 2014