comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: about the blackbody radiation curve
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: about the blackbody radiation curve [message #72373] Fri, 03 September 2010 06:52 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Wox wrote:
>
> Do something like
>
> y=a/(exp((h*c)/(k*x*t))-1)
> ind=where(x eq 0,ct)
> if ct ne 0 then y[ind]=0

I would recommend checking stuff before the calculation is done:

; Check values
loc = WHERE(x LT Tolerance OR FINITE(x) EQ 0, count)
IF ( count GT 0 ) THEN $
MESSAGE, 'Input X-values < or = 0.0, NaN, or Inf found.'

where "Tolerance" is the eps output from MACHAR. One should avoid floating point equality tests.

cheers,

paulv
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: how to change button names on the dialog_message
Next Topic: Re: split array

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 21:01:21 PDT 2025

Total time taken to generate the page: 2.31457 seconds