81 Numeric p1 = p * exp(-(-dh) / (R * T / (M * g)));
99 if (i <= 0)
throw "Non-positive radiance";
100 if (f <= 0)
throw "Non-positive frequency";
104 const Numeric d = b * f * f * f / i;
105 const Numeric binv = a * f / log(d + 1);
107 return binv * binv / (a * f * i * (1 / d + 1));
108 }
catch (
const char* e) {
110 os <<
"Errors raised by *dinvplanckdI* internal function:\n";
111 os <<
"\tError: " << e <<
'\n';
112 throw std::runtime_error(os.str());
141 const Numeric costheta1 = cos(theta1);
142 const Numeric costheta2 = cos(asin(n1.real() * sin(theta1) / n2.real()));
147 Rv = (a - b) / (a + b);
150 Rh = (a - b) / (a + b);
166 if (i <= 0)
throw "Non-positive radiance";
167 if (f < 0)
throw "Non-positive frequency";
172 return (a * f) / log((b * f * f * f) / i + 1.0);
173 }
catch (
const char* e) {
175 os <<
"Errors raised by *invplanck* internal function:\n";
176 os <<
"\tError: " << e <<
'\n';
177 throw std::runtime_error(os.str());
194 if (f <= 0)
throw "Non-positive frequency";
199 return (a * i) / (f * f);
200 }
catch (
const char* e) {
202 os <<
"Errors raised by *invrayjean* internal function:\n";
203 os <<
"\tError: " << e <<
'\n';
204 throw std::runtime_error(os.str());
220 if (p < 0)
throw "Negative pressure";
221 if (t <= 0)
throw "Non-positive temperature";
224 }
catch (
const char* e) {
226 os <<
"Errors raised by *number_density* internal function:\n";
227 os <<
"\tError: " << e <<
'\n';
228 throw std::runtime_error(os.str());
244 if (p < 0)
throw "Negative pressure";
245 if (t <= 0)
throw "Non-positive temperature";
248 }
catch (
const char* e) {
250 os <<
"Errors raised by *dnumber_density_dt* internal function:\n";
251 os <<
"\tError: " << e <<
'\n';
252 throw std::runtime_error(os.str());
270 if (t <= 0)
throw "Non-positive temperature";
271 if (f <= 0)
throw "Non-positive frequency";
276 return (a * f * f * f) / (exp((b * f) / t) - 1.0);
277 }
catch (
const char* e) {
279 os <<
"Errors raised by *planck* internal function:\n";
280 os <<
"\tError: " << e <<
'\n';
281 throw std::runtime_error(os.str());
301 throw "Vector size mismatch: frequency dim is bad";
304 }
catch (
const char* e) {
306 os <<
"Errors raised by *planck* internal function:\n";
307 os <<
"\tError: " << e <<
'\n';
308 throw std::runtime_error(os.str());
309 }
catch (
const std::exception& e) {
311 os <<
"Errors in calls by *planck* internal function:\n";
318 os <<
'\t' <<
"You have " << n
319 <<
" frequency grid points that reports a negative frequency!\n";
321 throw std::runtime_error(os.str());
338 if (t <= 0)
throw "Non-positive temperature";
339 if (f <= 0)
throw "Non-positive frequency";
344 const Numeric exp_t = exp(b * f / t);
345 const Numeric exp_t_m1 = exp_t - 1.0;
348 return a * b * f2 * f2 * exp_t / (t * t * exp_t_m1 * exp_t_m1);
349 }
catch (
const char* e) {
351 os <<
"Errors raised by *dplanck_dt* internal function:\n";
352 os <<
"\tError: " << e <<
'\n';
353 throw std::runtime_error(os.str());
371 throw "Vector size mismatch: frequency dim is bad";
374 }
catch (
const char* e) {
376 os <<
"Errors raised by *planck* internal function:\n";
377 os <<
"\tError: " << e <<
'\n';
378 throw std::runtime_error(os.str());
379 }
catch (
const std::exception& e) {
381 os <<
"Errors in calls by *planck* internal function:\n";
388 os <<
'\t' <<
"You have " << n
389 <<
" frequency grid points that reports a negative frequency!\n";
391 throw std::runtime_error(os.str());
408 if (t <= 0)
throw "Non-positive temperature";
409 if (f <= 0)
throw "Non-positive frequency";
414 const Numeric exp_t = exp(b * f / t);
415 const Numeric exp_t_m1 = exp_t - 1.0;
417 return -(a * f * f * (3.0 * t - 3.0 * t * exp_t + b * f * exp_t)) /
418 (t * exp_t_m1 * exp_t_m1);
419 }
catch (
const char* e) {
421 os <<
"Errors raised by *dplanck_df* internal function:\n";
422 os <<
"\tError: " << e <<
'\n';
423 throw std::runtime_error(os.str());
439 if (tb <= 0)
throw "Non-positive temperature";
440 if (f < 0)
throw "Negative frequency";
445 return (f * f) / (a * tb);
446 }
catch (
const char* e) {
448 os <<
"Errors raised by *rayjean* internal function:\n";
449 os <<
"\tError: " << e <<
'\n';
450 throw std::runtime_error(os.str());
INDEX Index
The type to use for all integer numbers and indices.
Declarations having to do with the four output streams.
Numeric invrayjean(const Numeric &i, const Numeric &f)
invrayjean
Numeric dinvplanckdI(const Numeric &i, const Numeric &f)
dinvplanckdI
void fresnel(Complex &Rv, Complex &Rh, const Complex &n1, const Complex &n2, const Numeric &theta)
fresnel
Numeric number_density(const Numeric &p, const Numeric &t)
number_density
Index nelem() const
Returns the number of elements.
Numeric barometric_heightformula(const Numeric &p, const Numeric &dh)
barometric_heightformula
Numeric dplanck_dt(const Numeric &f, const Numeric &t)
dplanck_dt
std::complex< Numeric > Complex
Numeric dplanck_df(const Numeric &f, const Numeric &t)
dplanck_df
Numeric dnumber_density_dt(const Numeric &p, const Numeric &t)
dnumber_density_dT
NUMERIC Numeric
The type to use for all floating point numbers.
basic_ostringstream< char, string_char_traits< char >, alloc > ostringstream
const Numeric PLANCK_CONST
A constant view of a Vector.
Numeric rayjean(const Numeric &f, const Numeric &tb)
rayjean
Numeric planck(const Numeric &f, const Numeric &t)
planck
Numeric invplanck(const Numeric &i, const Numeric &f)
invplanck
const Numeric BOLTZMAN_CONST
const Numeric SPEED_OF_LIGHT
This file contains declerations of functions of physical character.
This file contains the definition of String, the ARTS string class.