GeoscienceAustralia / eqrm

Automatically exported from code.google.com/p/eqrm
Other
5 stars 4 forks source link

low Mw gives RuntimeWarning: invalid value encountered in sqrt #95

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Mw less than 1.055

What do you see instead?
RuntimeWarning: invalid value encountered in sqrt

In conversions.py Johnston_01_ML formula is 
 C1=0.473
    C2=0.145
    C3=3.45
    return (C1+(C1**2-4*C2*(C3-Mw))**0.5)/(2*C2)

If Mw is less than 1.055 the results are imaginary numbers.

Original issue reported on code.google.com by duncan.g...@gmail.com on 11 Oct 2012 at 8:30

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
actually it's less than 3.05.

Original comment by duncan.g...@gmail.com on 11 Oct 2012 at 8:53