From 56e99432b284cf1df11f7056a4d421374e576e01 Mon Sep 17 00:00:00 2001 From: Ankit Raj Date: Wed, 6 Dec 2023 18:07:08 +0900 Subject: [PATCH] added new function for black body emission --- general/spectroscopy.ipf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/general/spectroscopy.ipf b/general/spectroscopy.ipf index 59d2f30..367396b 100644 --- a/general/spectroscopy.ipf +++ b/general/spectroscopy.ipf @@ -199,3 +199,24 @@ function absWavenum_to_freqGHz ( wavenum ) return frequency / 1e9 end /////////////////////////////////////////////////////////////////////////////////////////// + + +// spectral output of a black-body heated to a temperature +// wavelength in nanometers +// temperature in Kelvin + +function blackBody_spectral_output (wavelength, T) + variable wavelength // nm + variable T // Kelvin + + variable wv = wavelength * 1e-9 + + variable factorA = (const_h * const_c * 8 * Pi ) / (wv ^ 5) + variable factorB = 1/ (( exp (const_h * const_c / (wv * const_k * T )) ) - 1 ) + return factorA * factorB + +end + + +/////////////////////////////////////////////////////////////////////////////////////////// +