NelisW / pyradi

a Python toolkit to perform optical and infrared computational radiometry
http://nelisw.github.io/pyradi-docs/_build/html/index.html
MIT License
58 stars 34 forks source link

Overflow error in planck.py test #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
run the planck.py __main__ function.

results in:
planck.py:139: RuntimeWarning: overflow encountered in square
  (temperature* wavelength ** 5 * (numpy.exp(xx)-1) **2 )

this is probably due to extreme values of temperature and spectral variable 
that results in overflow.

Original issue reported on code.google.com by neliswil...@gmail.com on 17 May 2012 at 8:20

GoogleCodeExporter commented 9 years ago
Overflow resulted from (numpy.exp(xx)-1)**2.
Refactored the code to prevent overflow.

Original comment by neliswil...@gmail.com on 10 Oct 2012 at 9:18