; NAME: ; PLANCKFUNC ; ; PURPOSE: ; This function calculates the Planck function ; ; CALLING SEQUENCE: ; Result = PLANCKFUNC(wavel, temp) ; ; INPUTS: ; Wavel = The wavelength at which to evaluate (can be array) (m) ; Temp = The temperature of the object (can be array) (K) ; ; OUTPUT: ; The intensity of the object in J * s-1 * m-3 ; ; PROCEDURE: ; Evaluate the Planck function at wavl and temp ; ; RESTRICTION: ; Arrays must be of the same size ; ; MODIFICATION HISTORY: ; created April 19 2003 by John Dermody function PLANCKFUNC, wavel, temp ; evaluate h = 6.626 * 10.^(-34) ; Js c = 2.998 * 10.^8 ; m/s k = 1.381 * 10.^(-23) ; J/K pbrightness = ((double(2.) * h * c ^ 2) / (wavel^5) $ / (exp(h * c / (wavel * k * temp)) - 1)) > 0 return, pbrightness end