mail[bug #22021] Model B14 shows bad fitting to data.


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

Header


Content

Posted by Troels E. Linnet on May 19, 2014 - 13:34:
Follow-up Comment #10, bug #22021 (project relax):

Andrew Baldwin has sent these following lines of code, which shows that I have
implemented the function wrong.

######
    optA='y'
    if(optA=='y'):
        sqrt_zeta2_Psi2 = numpy.sqrt(zeta**2 + Psi**2)
        g3 = g_fact * numpy.sqrt( Psi + sqrt_zeta2_Psi2)
        g4 = g_fact * numpy.sqrt(-Psi + sqrt_zeta2_Psi2)
    else:
        quad_zeta2_Psi2 = (zeta**2 + Psi**2)**0.25
        g3=cos(0.5*atan2(-zeta,Psi))*quad_zeta2_Psi2   #trig faster than
square roots
        g4=sin(0.5*atan2(-zeta,Psi))*quad_zeta2_Psi2   #trig faster than
square roots
#######

with the following comments:

####
    #R2eff = R2eff - 1/Trelax * numpy.log(Tog.real)  #NOT CORRECT
    # Fastest calculation.
    R2eff = (R2g + R2e + kex) / 2.0  - 1/(Trelax) * ( ncyc * 
numpy.arccosh(v1c.real) + numpy.log(Tog.real) )  #NOT CORRECT  - error equal
to previous
####

I base from these comments, that Andrew explicit suggest the trigometric
implementations.

This will be corrected, after testing the 

    _______________________________________________________

Reply to this item at:

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

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




Related Messages


Powered by MHonArc, Updated Mon May 19 13:40:15 2014