mailRe: [task #7793] Speed-up of dispersion models


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

Header


Content

Posted by Troels Emtekær Linnet on May 28, 2014 - 12:24:
Hi Edward.

The NS CPMG 2site extended is a good case.

It will make a underflow for kex as low as 1e4.

  File 
"/Users/tlinnet/software/disp_speed/test_suite/unit_tests/_lib/_dispersion/test_ns_cpmg_2site_expanded.py",
line 180, in test_ns_cpmg_2site_expanded_no_rex8
    self.calc_r2eff()
  File 
"/Users/tlinnet/software/disp_speed/test_suite/unit_tests/_lib/_dispersion/test_ns_cpmg_2site_expanded.py",
line 58, in calc_r2eff
    R2eff = r2eff_ns_cpmg_2site_expanded(r20=self.r20, pA=self.pA,
dw=dw_frq, k_AB=k_AB, k_BA=k_BA, relax_time=0.3, inv_relax_time=1/0.3,
tcp=self.tcp, num_points=self.num_points, num_cpmg=self.num_cpmg)
  File 
"/Users/tlinnet/software/disp_speed/lib/dispersion/ns_cpmg_2site_expanded.py",
line 298, in r2eff_ns_cpmg_2site_expanded
    t28 = exp(-(t17 + k_AB_plus_k_BA_minus_t4) * half_tcp)
FloatingPointError: underflow encountered in exp

And, the test is extremely fast. So I would rather keep it, as a last
line of defence.

Best
Troels

2014-05-28 12:10 GMT+02:00 Edward d'Auvergne <edward@xxxxxxxxxxxxx>:
Hi,

Do you have an example where infinite or NaN values appear?  I think
that with the 'No Rex' checks, we now 100% avoid these.  So I believe
that all Inf and NaN values came from the parameter values dw == 0.0
or pA == 1.0 or kex == 0.0 or phi_ex = 0.0 causing a failure in the
original dispersion equations.  That is what this patch demonstrates -
for all cases in the test suite, there is no longer any Inf or NaN
values :)  At least for the models we check for no exchange
conditions.

Regards,

Edward





On 28 May 2014 12:01, Troels Emtekær Linnet <tlinnet@xxxxxxxxxxxxx> wrote:
Hi Edward.

I cannot accept the patch.

It removes all the isfinite(sum(R1rho)) tests I have put in.

Best
Troels


2014-05-28 11:53 GMT+02:00 Edward d  Auvergne
<NO-REPLY.INVALID-ADDRESS@xxxxxxx>:
Follow-up Comment #86, task #7793 (project relax):

I have modified the patch for the latest version of the disp_speed branch
(r23503).

(file #20827)
    _______________________________________________________

Additional Item Attachment:

File name: patch_check_removal2           Size:10 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/task/?7793>

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




Related Messages


Powered by MHonArc, Updated Wed May 28 13:20:16 2014