Hi Edward.
This part is in systemtest: Relax_disp.test_sod1wt_t25_to_cr72
# Copy over values.
self.interpreter.relax_disp.parameter_copy(pipe_from=pipe_name_MODEL,
pipe_to=pipe_name_MODEL_CLUSTER)
# Test the median values is correct
for spin, mol_name, resi, resn, spin_id in
spin_loop(full_info=True, return_id=True, skip_desel=True):
print(pA_values)
# The the median pA value returned.
self.assertEqual(median(pA_values), spin.pA)
# The the median kex value returned.
self.assertEqual(median(kex_values), spin.kex)
2014-04-30 10:53 GMT+02:00 Edward d'Auvergne <[email protected]>:
> Hi Troels,
>
> I would recommend creating a new system test for this code. This part
> is not tested in the test suite, hence it is a weak point in relax
> that will probably fail again with future code changes. So having a
> system test where hardcoded values are checked will ensure that this
> part of relax is rock solid.
>
> Cheers,
>
> Edward
>
>
>
> On 30 April 2014 10:19, Edward d'Auvergne <[email protected]> wrote:
>> Ah, that was a remnant of the parameter averaging to parameter median
>> change for the clustering
>> (http://thread.gmane.org/gmane.science.nmr.relax.devel/4647/focus=4648).
>> Could you retroactively create a bug report for this? That would be
>> useful for the release notes.
>>
>> Cheers,
>>
>> Edward
>>
>>
>>
>> On 29 April 2014 19:56, <[email protected]> wrote:
>>> Author: tlinnet
>>> Date: Tue Apr 29 19:56:12 2014
>>> New Revision: 22883
>>>
>>> URL: http://svn.gna.org/viewcvs/relax?rev=22883&view=rev
>>> Log:
>>> Fix for the relax_disp.parameter_copy function.
>>>
>>> The median of the values was not performed properly, since 0.0 was already
>>> in the starting list of values.
>>>
>>> Modified:
>>> trunk/specific_analyses/relax_disp/parameters.py
>>>
>>> Modified: trunk/specific_analyses/relax_disp/parameters.py
>>> URL:
>>> http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/parameters.py?rev=22883&r1=22882&r2=22883&view=diff
>>> ==============================================================================
>>> --- trunk/specific_analyses/relax_disp/parameters.py (original)
>>> +++ trunk/specific_analyses/relax_disp/parameters.py Tue Apr 29 19:56:12
>>> 2014
>>> @@ -162,17 +162,17 @@
>>> for spin_ids in loop_cluster():
>>> # Initialise some variables.
>>> model = None
>>> - pA = [0.0]
>>> - pB = [0.0]
>>> - pC = [0.0]
>>> - kex = [0.0]
>>> - kex_AB = [0.0]
>>> - kex_AC = [0.0]
>>> - kex_BC = [0.0]
>>> - k_AB = [0.0]
>>> - kB = [0.0]
>>> - kC = [0.0]
>>> - tex = [0.0]
>>> + pA = []
>>> + pB = []
>>> + pC = []
>>> + kex = []
>>> + kex_AB = []
>>> + kex_AC = []
>>> + kex_BC = []
>>> + k_AB = []
>>> + kB = []
>>> + kC = []
>>> + tex = []
>>> count = 0
>>> spins_from = []
>>> spins_to = []
>>> @@ -240,38 +240,38 @@
>>>
>>> # Take median of parameters.
>>> if len(pA) > 1:
>>> - pA = [median(pA)]
>>> - print("Median pA value: %.15f" % pA[0])
>>> + pA = median(pA)
>>> + print("Median pA value: %.15f" % pA)
>>> if len(pB) > 1:
>>> - pB = [median(pB)]
>>> - print("Median pA value: %.15f" % pA[0])
>>> + pB = median(pB)
>>> + print("Median pB value: %.15f" % pB)
>>> if len(pC) > 1:
>>> - pC = [median(pC)]
>>> - print("Median pC value: %.15f" % pC[0])
>>> + pC = median(pC)
>>> + print("Median pC value: %.15f" % pC)
>>> if len(kex) > 1:
>>> - kex = [median(kex)]
>>> - print("Median kex value: %.15f" % kex[0])
>>> + kex = median(kex)
>>> + print("Median kex value: %.15f" % kex)
>>> if len(kex_AB) > 1:
>>> - kex_AB = [median(kex_AB)]
>>> - print("Median k_AB value: %.15f" % kex_AB[0])
>>> + kex_AB = median(kex_AB)
>>> + print("Median k_AB value: %.15f" % kex_AB)
>>> if len(kex_AC) > 1:
>>> - kex_AC = [median(kex_AC)]
>>> - print("Median k_AC value: %.15f" % kex_AC[0])
>>> + kex_AC = median(kex_AC)
>>> + print("Median k_AC value: %.15f" % kex_AC)
>>> if len(kex_BC) > 1:
>>> - kex_BC = [median(kex_BC)]
>>> - print("Median k_BC value: %.15f" % kex_BC[0])
>>> + kex_BC = median(kex_BC)
>>> + print("Median k_BC value: %.15f" % kex_BC)
>>> if len(k_AB) > 1:
>>> - k_AB = [median(k_AB)]
>>> - print("Median k_AB value: %.15f" % k_AB[0])
>>> + k_AB = median(k_AB)
>>> + print("Median k_AB value: %.15f" % k_AB)
>>> if len(kB) > 1:
>>> - kB = [median(kB)]
>>> - print("Median kB value: %.15f" % kB[0])
>>> + kB = median(kB)
>>> + print("Median kB value: %.15f" % kB)
>>> if len(kC) > 1:
>>> - kC = [median(kC)]
>>> - print("Median kC value: %.15f" % kC[0])
>>> + kC = median(kC)
>>> + print("Median kC value: %.15f" % kC)
>>> if len(tex) > 1:
>>> - tex = [median(tex)]
>>> - print("Median tex value: %.15f" % tex[0])
>>> + tex = median(tex)
>>> + print("Median tex value: %.15f" % tex)
>>>
>>> # Loop over the spins, this time copying the parameters.
>>> for i in range(len(spin_ids)):
>>> @@ -293,28 +293,28 @@
>>>
>>> # The median parameters.
>>> if 'pB' in spin_from.params and 'pC' not in spin_from.params:
>>> - spin_to.pA = pA[0]
>>> - spin_to.pB = pB[0]
>>> - spin_to.pC = 1.0 - pA[0] - pB[0]
>>> + spin_to.pA = pA
>>> + spin_to.pB = pB
>>> + spin_to.pC = 1.0 - pA - pB
>>> elif 'pA' in spin_from.params:
>>> - spin_to.pA = pA[0]
>>> - spin_to.pB = 1.0 - pA[0]
>>> + spin_to.pA = pA
>>> + spin_to.pB = 1.0 - pA
>>> if 'kex' in spin_from.params:
>>> - spin_to.kex = kex[0]
>>> + spin_to.kex = kex
>>> if 'kex_AB' in spin_from.params:
>>> - spin_to.kex_AB = kex_AB[0]
>>> + spin_to.kex_AB = kex_AB
>>> if 'kex_AC' in spin_from.params:
>>> - spin_to.kex_AC = kex_AC[0]
>>> + spin_to.kex_AC = kex_AC
>>> if 'kex_BC' in spin_from.params:
>>> - spin_to.kex_BC = kex_BC[0]
>>> + spin_to.kex_BC = kex_BC
>>> if 'k_AB' in spin_from.params:
>>> - spin_to.k_AB = k_AB[0]
>>> + spin_to.k_AB = k_AB
>>> if 'kB' in spin_from.params:
>>> - spin_to.kB = kB[0]
>>> + spin_to.kB = kB
>>> if 'kC' in spin_from.params:
>>> - spin_to.kC = kC[0]
>>> + spin_to.kC = kC
>>> if 'tex' in spin_from.params:
>>> - spin_to.tex = tex[0]
>>> + spin_to.tex = tex
>>>
>>> # All other spin specific parameters.
>>> for param in spin_from.params:
>>>
>>>
>>> _______________________________________________
>>> relax (http://www.nmr-relax.com)
>>>
>>> This is the relax-commits mailing list
>>> [email protected]
>>>
>>> To unsubscribe from this list, get a password
>>> reminder, or change your subscription options,
>>> visit the list information page at
>>> https://mail.gna.org/listinfo/relax-commits
>
> _______________________________________________
> relax (http://www.nmr-relax.com)
>
> This is the relax-devel mailing list
> [email protected]
>
> To unsubscribe from this list, get a password
> reminder, or change your subscription options,
> visit the list information page at
> https://mail.gna.org/listinfo/relax-devel
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-devel mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel