69 throw runtime_error(
"The no_shape lineshape is only a placeholder, but you tried\n"
70 "to use it like a real lineshape.");
97 assert( nf==f_grid.
nelem() );
104 Numeric gamma2 = gamma * gamma;
107 for (
Index i=0; i<nf; ++i )
109 ls[i] =
fac / ( (f_grid[i]-f0) * (f_grid[i]-f0) + gamma2 );
136 assert( nf==f_grid.
nelem() );
144 Numeric sigma2 = sigma * sigma;
147 for (
Index i=0; i<nf ; ++i )
149 ls[i] =
fac * exp( - pow( f_grid[i]-f0, 2) / sigma2 );
170 }
else if (s >= 5.5f) {
172 }
else if (y >= fabs(x) * .195f - .176f) {
254 assert( nf==f_grid.
nelem() );
282 long int bmin = 0, lauf[16] = {0} , bmax;
283 long int imin = 0, imax = 0, stack[80] = {0} ;
284 Numeric a1, a2, a3, a4, a5, a6, a8, b8, c8, d8, e8, f8, g8, h8, a7,
285 b7, c7, d7, e7, f7, o8, p8, q8, r8, s8, t8, g7, h7, o7, p7, q7,
286 r7, s7, t7, b6, c6, d6, e6, b5, c5, d5, e5, b4, c4, d4, b3, c3,
288 a1 = a2 = a3 = a4 = a5 = a6 = a8 = b8 = c8 = d8 = e8 = f8 = g8 = h8 = a7
289 = b7 = c7 = d7 = e7 = f7 = o8 = p8 = q8 = r8 = s8 = t8 = g7 = h7 = o7 = p7
290 = q7 = r7 = s7 = t7 = b6 = c6 = d6 = e6 = b5 = c5 = d5 = e5 = b4 = c4 = d4
291 = b3 = c3 = d3 = b1 = y2 = 0;
292 long int i2 = 0, i1 = 0;
293 Numeric x2 = 0, b2 = 0, c1 = 0;
294 long int stackp = 0, imitte = 0;
304 for (i1=0; i1< (int) nf; i1++)
306 x[i1] = (f_grid[i1] - f0) / sigma;
317 if (y >= 15.0 || x[0] >= 15.0 || x[nf-1] <= -15.0) {
324 for (i2 = 1; i2 <= 4; ++i2) {
325 for (i1 = 1; i1 <= 4; ++i1) {
326 lauf[i1 + (i2 << 2) - 5] = i2 % 2 * (nf + 1);
331 stack[stackp - 1] = 1;
332 stack[stackp + 19] = nf;
333 stack[stackp + 39] =
bfun6_(y, x[0]);
334 stack[stackp + 59] =
bfun6_(y, x[nf-1]);
336 imin = stack[stackp - 1];
337 imax = stack[stackp + 19];
338 bmin = stack[stackp + 39];
339 bmax = stack[stackp + 59];
341 if (x[imax-1] < 0.f) {
343 i__1 = imin, i__2 = lauf[bmin - 1];
344 lauf[bmin - 1] =
min(i__1,i__2);
346 i__1 = imax, i__2 = lauf[bmax + 3];
347 lauf[bmax + 3] =
max(i__1,i__2);
350 }
else if (x[imin-1] >= 0.f) {
352 i__1 = imin, i__2 = lauf[bmin + 7];
353 lauf[bmin + 7] =
min(i__1,i__2);
355 i__1 = imax, i__2 = lauf[bmax + 11];
356 lauf[bmax + 11] =
max(i__1,i__2);
361 imitte = (imax + imin) / 2;
362 stack[stackp - 1] = imitte + 1;
363 stack[stackp + 19] = imax;
364 stack[stackp + 39] =
bfun6_(y, x[imitte]);
365 stack[stackp + 59] = bmax;
367 stack[stackp - 1] = imin;
368 stack[stackp + 19] = imitte;
369 stack[stackp + 39] = bmin;
370 stack[stackp + 59] =
bfun6_(y, x[imitte-1]);
377 if (lauf[7] >= lauf[3] || lauf[15] >= lauf[11]) {
378 if ((r__1 = y - yps4, fabs(r__1)) > 1e-8f) {
380 a7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
381 y2 * (y2 * (y2 * (2.35944f - y2 * .56419f) - 72.9359f) +
382 571.687f) - 5860.68f) + 40649.2f) - 320772.f) + 1684100.f)
383 - 9694630.f) + 40816800.f) - 1.53575e8f) + 4.56662e8f) -
384 9.86604e8f) + 1.16028e9f);
385 b7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
386 y2 * (y2 * (23.0312f - y2 * 7.33447f) - 234.143f) -
387 2269.19f) + 45251.3f) - 234417.f) + 3599150.f) -
388 7723590.f) + 86482900.f) - 2.91876e8f) + 8.06985e8f) -
389 9.85386e8f) - 5.60505e8f);
390 c7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
391 y2 * (97.6203f - y2 * 44.0068f) + 1097.77f) - 25338.3f) +
392 98079.1f) + 576054.f) - 2.3818e7f) + 22930200.f) -
393 2.04467e8f) + 2.94262e8f) + 2.47157e8f) - 6.51523e8f);
394 d7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
395 228.563f - y2 * 161.358f) + 8381.97f) - 66431.2f) -
396 303569.f) + 2240400.f) + 38311200.f) - 41501300.f) -
397 99622400.f) + 2.70167e8f) - 2.63894e8f);
398 e7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
399 296.38f - y2 * 403.396f) + 23507.6f) - 66212.1f) -
400 1.003e6f) + 468142.f) + 24620100.f) + 5569650.f) +
401 1.40677e8f) - 63177100.f);
402 f7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (125.591f -
403 y2 * 726.113f) + 37544.8f) + 8820.94f) - 934717.f) -
404 1931140.f) - 33289600.f) + 4073820.f) - 16984600.f);
405 g7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (-260.198f - y2 *
406 968.15f) + 37371.9f) + 79902.5f) - 186682.f) - 900010.f)
407 + 7528830.f) - 1231650.f);
408 h7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (-571.645f - y2 * 968.15f)
409 + 23137.1f) + 72520.9f) + 153468.f) + 86407.6f) -
411 o7 = y * (y2 * (y2 * (y2 * (y2 * (-575.164f - y2 * 726.113f) +
412 8073.15f) + 26538.5f) + 49883.8f) - 23586.5f);
413 p7 = y * (y2 * (y2 * (y2 * (-352.467f - y2 * 403.396f) +
414 953.655f) + 2198.86f) - 8009.1f);
415 q7 = y * (y2 * (y2 * (-134.792f - y2 * 161.358f) - 271.202f) -
417 r7 = y * (y2 * (-29.7896f - y2 * 44.0068f) - 77.0535f);
418 s7 = y * (-2.92264f - y2 * 7.33447f);
420 a8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
421 y2 * (y2 * (y2 * (y2 - 3.68288f) + 126.532f) - 955.194f)
422 + 9504.65f) - 70946.1f) + 483737.f) - 2857210.f) +
423 14464700.f) - 61114800.f) + 2.11107e8f) - 5.79099e8f) +
424 1.17022e9f) - 1.5599e9f) + 1.02827e9f;
425 b8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
426 y2 * (y2 * (y2 * 14.f - 40.5117f) + 533.254f) + 3058.26f)
427 - 55600.f) + 498334.f) - 2849540.f) + 13946500.f) -
428 70135800.f) + 2.89676e8f) - 7.53828e8f) + 1.66421e9f) -
429 2.28855e9f) + 1.5599e9f;
430 c8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
431 y2 * (y2 * 91 - 198.876f) - 1500.17f) + 48153.3f) -
432 217801.f) - 1063520.f) + 1.4841e7f) - 46039600.f) +
433 63349600.f) - 6.60078e8f) + 1.06002e9f) - 1.66421e9f) +
435 d8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
436 y2 * 364 - 567.164f) - 16493.7f) + 161461.f) + 280428.f)
437 - 6890020.f) - 6876560.f) + 1.99846e8f) + 54036700.f) +
438 6.60078e8f) - 7.53828e8f) + 5.79099e8f;
439 e8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 *
440 1001 - 1012.79f) - 55582.f) + 240373.f) + 1954700.f) -
441 5257220.f) - 50101700.f) - 1.99846e8f) + 63349600.f) -
442 2.89676e8f) + 2.11107e8f;
443 f8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * 2002 -
444 1093.82f) - 106663.f) + 123052.f) + 3043160.f) +
445 5257220.f) - 6876560.f) + 46039600.f) - 70135800.f) +
447 g8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * 3003 -
448 486.14f) - 131337.f) - 123052.f) + 1954700.f) + 6890020.f)
449 + 1.4841e7f) - 13946500.f) + 14464700.f;
450 h8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * 3432 + 486.14f) -
451 106663.f) - 240373.f) + 280428.f) + 1063520.f) -
452 2849540.f) + 2857210.f;
453 o8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * 3003 + 1093.82f) -
454 55582.f) - 161461.f) - 217801.f) - 498334.f) + 483737.f;
455 p8 = y2 * (y2 * (y2 * (y2 * (y2 * 2002 + 1012.79f) - 16493.7f) -
456 48153.3f) - 55600.f) + 70946.1f;
457 q8 = y2 * (y2 * (y2 * (y2 * 1001.f + 567.164f) - 1500.17f) -
458 3058.26f) + 9504.65f;
459 r8 = y2 * (y2 * (y2 * 364 + 198.876f) + 533.254f) + 955.194f;
460 s8 = y2 * (y2 * 91.f + 40.5117f) + 126.532f;
461 t8 = y2 * 14.f + 3.68288f;
464 for (i2 = 1; i2 <= 3; i2 += 2) {
465 i__1 = lauf[((i2 + 1) << 2) - 1];
466 for (i1 = lauf[(i2 << 2) - 1]; i1 <= i__1; ++i1) {
467 x2 = x[i1-1] * x[i1-1];
468 ls[i1-1] =
fac * (exp(y2 - x2) * cos(x[i1-1] * ym2) - (a7 + x2 *
469 (b7 + x2 * (c7 + x2 * (d7 + x2 * (e7 + x2 * (f7 + x2
470 * (g7 + x2 * (h7 + x2 * (o7 + x2 * (p7 + x2 * (q7 +
471 x2 * (r7 + x2 * (s7 + x2 * t7))))))))))))) / (a8 + x2
472 * (b8 + x2 * (c8 + x2 * (d8 + x2 * (e8 + x2 * (f8 +
473 x2 * (g8 + x2 * (h8 + x2 * (o8 + x2 * (p8 + x2 * (q8
474 + x2 * (r8 + x2 * (s8 + x2 * (t8 + x2)))))))))))))));
481 if (lauf[6] >= lauf[2] || lauf[14] >= lauf[10]) {
482 if ((r__1 = y - yps3, fabs(r__1)) > 1e-8f) {
484 a5 = y * (y * (y * (y * (y * (y * (y * (y * (y *
485 .564224f + 7.55895f) + 49.5213f) + 204.501f) + 581.746f)
486 + 1174.8f) + 1678.33f) + 1629.76f) + 973.778f) + 272.102f;
487 b5 = y * (y * (y * (y * (y * (y * (y * 2.25689f + 22.6778f)
488 + 100.705f) + 247.198f) + 336.364f) + 220.843f) -
489 2.34403f) - 60.5644f;
490 c5 = y * (y * (y * (y * (y * 3.38534f + 22.6798f) + 52.8454f)
491 + 42.5683f) + 18.546f) + 4.58029f;
492 d5 = y * (y * (y * 2.25689f + 7.56186f) + 1.66203f) - .128922f;
493 e5 = y * .564224f + 9.71457e-4f;
494 a6 = y * (y * (y * (y * (y * (y * (y * (y * (y * (y +
495 13.3988f) + 88.2674f) + 369.199f) + 1074.41f) + 2256.98f)
496 + 3447.63f) + 3764.97f) + 2802.87f) + 1280.83f) +
498 b6 = y * (y * (y * (y * (y * (y * (y * (y * 5.f +
499 53.5952f) + 266.299f) + 793.427f) + 1549.68f) + 2037.31f)
500 + 1758.34f) + 902.306f) + 211.678f;
501 c6 = y * (y * (y * (y * (y * (y * 10.f + 80.3928f) +
502 269.292f) + 479.258f) + 497.302f) + 308.186f) + 78.866f;
503 d6 = y * (y * (y * (y * 10.f + 53.5952f) + 92.7568f) +
504 55.0293f) + 22.0353f;
505 e6 = y * (y * 5.f + 13.3988f) + 1.49645f;
507 for (i2 = 1; i2 <= 3; i2 += 2) {
508 i__1 = lauf[((i2 + 1) << 2) - 2];
509 for (i1 = lauf[(i2 << 2) - 2]; i1 <= i__1; ++i1) {
510 x2 = x[i1-1] * x[i1-1];
511 ls[i1-1] =
fac * (a5 + x2 * (b5 + x2 * (c5 + x2 * (d5 + x2 *
512 e5)))) / (a6 + x2 * (b6 + x2 * (c6 + x2 * (d6 + x2 * (
520 if (lauf[5] >= lauf[1] || lauf[13] >= lauf[9]) {
521 if ((r__1 = y - yps2, fabs(r__1)) > 1e-8f) {
523 a3 = y * (y2 * (y2 * (y2 * .56419f + 3.10304f) + 4.65456f) +
525 b3 = y * (y2 * (y2 * 1.69257f + .56419f) + 2.962f);
526 c3 = y * (y2 * 1.69257f - 2.53885f);
528 a4 = y2 * (y2 * (y2 * (y2 + 6.f) + 10.5f) + 4.5f) + .5625f;
529 b4 = y2 * (y2 * (y2 * 4.f + 6.f) + 9.f) - 4.5f;
530 c4 = y2 * (y2 * 6.f - 6.f) + 10.5f;
533 for (i2 = 1; i2 <= 3; i2 += 2) {
534 i__1 = lauf[((i2 + 1) << 2) - 3];
535 for (i1 = lauf[(i2 << 2) - 3]; i1 <= i__1; ++i1) {
536 x2 = x[i1-1] * x[i1-1];
537 ls[i1-1] =
fac * (a3 + x2 * (b3 + x2 * (c3 + x2 * d3))) / (a4
538 + x2 * (b4 + x2 * (c4 + x2 * (d4 + x2))));
546 if (lauf[4] >= lauf[0] || lauf[12] >= lauf[8]) {
547 if ((r__1 = y - yps1, fabs(r__1)) > 1e-8f) {
555 for (i2 = 1; i2 <= 3; i2 += 2) {
556 i__1 = lauf[((i2 + 1) << 2) - 4];
557 for (i1 = lauf[(i2 << 2) - 4]; i1 <= i__1; ++i1) {
558 x2 = x[i1-1] * x[i1-1];
560 ls[i1-1] = c1 * (b1 + x2) / (b2 * b2 + a2 * x2);
582 if (x2 * .4081676f + y2 > 21.159543f) {
583 if (x2 * .7019639f + y2 > 1123.14221f) {
589 if (x2 * .20753051f + y2 > 4.20249292f) {
591 }
else if (y >= fabs(x) * .08f - .12f) {
674 assert( nf==f_grid.
nelem() );
701 long bmin = 0, lauf[20] = {0} , bmax, imin, imax;
702 long stack[80] = {0} ;
703 Numeric a0, a1, a2, a3, a4, a5, a6, a7, a8, b8, c8, d8, e8, f8, g8,
704 h8, b7, c7, d7, e7, f7, g7, o8, p8, q8, r8, s8, t8, h7, o7, p7,
705 q7, r7, s7, t7, b6, c6, d6, e6, b5, c5, d5, e5, b4, c4, d4, b3,
707 a0 = a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = b8 = c8 = d8 = e8 = f8 = g8
708 = h8 = b7 = c7 = d7 = e7 = f7 = g7 = o8 = p8 = q8 = r8 = s8 = t8 = h7 = o7
709 = p7 = q7 = r7 = s7 = t7 = b6 = c6 = d6 = e6 = b5 = c5 = d5 = e5 = b4 = c4
710 = d4 = b3 = c3 = d3 = b1 = y2 = 0;
713 long stackp = 0, imitte = 0;
722 for (i1=0; i1< (int) nf; i1++)
724 x[i1] = (f_grid[i1] - f0) / sigma;
736 if (y >= 23.0 || x[0] >= 39.0 || x[nf-1] <= -39.0) {
743 for (i2 = 1; i2 <= 4; ++i2) {
744 for (i1 = 0; i1 <= 4; ++i1) {
745 lauf[i1 + i2 * 5 - 5] = i2 % 2 * (nf + 1);
750 stack[stackp - 1] = 1;
751 stack[stackp + 19] = nf;
752 stack[stackp + 39] =
bfun3_(y, x[0]);
753 stack[stackp + 59] =
bfun3_(y, x[nf-1]);
755 imin = stack[stackp - 1];
756 imax = stack[stackp + 19];
757 bmin = stack[stackp + 39];
758 bmax = stack[stackp + 59];
760 if (x[imax-1] < 0.f) {
762 i__1 = imin, i__2 = lauf[bmin];
763 lauf[bmin] =
min(i__1,i__2);
765 i__1 = imax, i__2 = lauf[bmax + 5];
766 lauf[bmax + 5] =
max(i__1,i__2);
769 }
else if (x[imin-1] >= 0.f) {
771 i__1 = imin, i__2 = lauf[bmin + 10];
772 lauf[bmin + 10] =
min(i__1,i__2);
774 i__1 = imax, i__2 = lauf[bmax + 15];
775 lauf[bmax + 15] =
max(i__1,i__2);
780 imitte = (imax + imin) / 2;
781 stack[stackp - 1] = imitte + 1;
782 stack[stackp + 19] = imax;
783 stack[stackp + 39] =
bfun3_(y, x[imitte]);
784 stack[stackp + 59] = bmax;
786 stack[stackp - 1] = imin;
787 stack[stackp + 19] = imitte;
788 stack[stackp + 39] = bmin;
789 stack[stackp + 59] =
bfun3_(y, x[imitte-1]);
796 if (lauf[9] >= lauf[4] || lauf[19] >= lauf[14]) {
797 if ((r__1 = y - yps4, fabs(r__1)) > 1e-8f) {
799 a7 = y * (y2 * (y2 * 4.56662e8f - 9.86604e8f) + 1.16028e9f);
800 b7 = y * (y2 * (y2 * 8.06985e8f - 9.85386e8f) - 5.60505e8f);
801 c7 = y * (y2 * (y2 * 2.94262e8f + 2.47157e8f) - 6.51523e8f);
802 d7 = y * (y2 * (2.70167e8f - y2 * 99622400.f) - 2.63894e8f);
803 e7 = y * (y2 * (y2 * 5569650.f + 1.40677e8f) - 63177100.f);
804 f7 = y * (y2 * (4073820.f - y2 * 33289600.f) - 16984600.f);
805 g7 = y * (y2 * (7528830.f - y2 * 900010) - 1231650.f);
806 h7 = y * (y2 * (y2 * 153468 + 86407.6f) - 610622.f);
807 o7 = y * (y2 * (y2 * 26538.5f + 49883.8f) - 23586.5f);
808 p7 = y * (y2 * (y2 * 953.655f + 2198.86f) - 8009.1f);
809 q7 = y * (y2 * (-271.202f - y2 * 134.792f) - 622.056f);
810 r7 = y * (y2 * (-29.7896f - y2 * 44.0068f) - 77.0535f);
811 s7 = y * (-2.92264f - y2 * 7.33447f);
813 a8 = y2 * (y2 * 1.17022e9f - 1.5599e9f) + 1.02827e9f;
814 b8 = y2 * (y2 * 1.66421e9f - 2.28855e9f) + 1.5599e9f;
815 c8 = y2 * (y2 * 1.06002e9f - 1.66421e9f) + 1.17022e9f;
816 d8 = y2 * (y2 * 6.60078e8f - 7.53828e8f) + 5.79099e8f;
817 e8 = y2 * (y2 * 63349600.f - 2.89676e8f) + 2.11107e8f;
818 f8 = y2 * (y2 * 46039600.f - 70135800.f) + 61114800.f;
819 g8 = y2 * (y2 * 1.4841e7f - 13946500.f) + 14464700.f;
820 h8 = y2 * (y2 * 1063520.f - 2849540.f) + 2857210.f;
821 o8 = y2 * (-498334.f - y2 * 217801.f) + 483737.f;
822 p8 = y2 * (-55600.f - y2 * 48153.3f) + 70946.1f;
823 q8 = y2 * (-3058.26f - y2 * 1500.17f) + 9504.65f;
824 r8 = y2 * (y2 * 198.876f + 533.254f) + 955.194f;
825 s8 = y2 * (y2 * 91.f + 40.5117f) + 126.532f;
826 t8 = y2 * 14.f + 3.68288f;
829 for (i2 = 1; i2 <= 3; i2 += 2) {
830 i__1 = lauf[(i2 + 1) * 5 - 1];
831 for (i1 = lauf[i2 * 5 - 1]; i1 <= i__1; ++i1) {
832 x2 = x[i1-1] * x[i1-1];
833 ls[i1-1] =
fac * (exp(y2 - x2) * cos(x[i1-1] * ym2) - (a7 + x2 *
834 (b7 + x2 * (c7 + x2 * (d7 + x2 * (e7 + x2 * (f7 + x2
835 * (g7 + x2 * (h7 + x2 * (o7 + x2 * (p7 + x2 * (q7 +
836 x2 * (r7 + x2 * (s7 + x2 * t7))))))))))))) / (a8 + x2
837 * (b8 + x2 * (c8 + x2 * (d8 + x2 * (e8 + x2 * (f8 +
838 x2 * (g8 + x2 * (h8 + x2 * (o8 + x2 * (p8 + x2 * (q8
839 + x2 * (r8 + x2 * (s8 + x2 * (t8 + x2)))))))))))))));
846 if (lauf[8] >= lauf[3] || lauf[18] >= lauf[13]) {
847 if ((r__1 = y - yps3, fabs(r__1)) > 1e-8f) {
849 a5 = y * (y * (y * (y * (y * (y * (y * (y * (y *
850 .564224f + 7.55895f) + 49.5213f) + 204.501f) + 581.746f)
851 + 1174.8f) + 1678.33f) + 1629.76f) + 973.778f) + 272.102f;
852 b5 = y * (y * (y * (y * (y * (y * (y * 2.25689f + 22.6778f)
853 + 100.705f) + 247.198f) + 336.364f) + 220.843f) -
854 2.34403f) - 60.5644f;
855 c5 = y * (y * (y * (y * (y * 3.38534f + 22.6798f) + 52.8454f)
856 + 42.5683f) + 18.546f) + 4.58029f;
857 d5 = y * (y * (y * 2.25689f + 7.56186f) + 1.66203f) - .128922f;
858 e5 = y * .564224f + 9.71457e-4f;
859 a6 = y * (y * (y * (y * (y * (y * (y * (y * (y * (y +
860 13.3988f) + 88.2674f) + 369.199f) + 1074.41f) + 2256.98f)
861 + 3447.63f) + 3764.97f) + 2802.87f) + 1280.83f) +
863 b6 = y * (y * (y * (y * (y * (y * (y * (y * 5.f +
864 53.5952f) + 266.299f) + 793.427f) + 1549.68f) + 2037.31f)
865 + 1758.34f) + 902.306f) + 211.678f;
866 c6 = y * (y * (y * (y * (y * (y * 10.f + 80.3928f) +
867 269.292f) + 479.258f) + 497.302f) + 308.186f) + 78.866f;
868 d6 = y * (y * (y * (y * 10.f + 53.5952f) + 92.7568f) +
869 55.0293f) + 22.0353f;
870 e6 = y * (y * 5.f + 13.3988f) + 1.49645f;
872 for (i2 = 1; i2 <= 3; i2 += 2) {
873 i__1 = lauf[(i2 + 1) * 5 - 2];
874 for (i1 = lauf[i2 * 5 - 2]; i1 <= i__1; ++i1) {
875 x2 = x[i1-1] * x[i1-1];
876 ls[i1-1] =
fac * (a5 + x2 * (b5 + x2 * (c5 + x2 * (d5 + x2 *
877 e5)))) / (a6 + x2 * (b6 + x2 * (c6 + x2 * (d6 + x2 * (
885 if (lauf[7] >= lauf[2] || lauf[17] >= lauf[12]) {
886 if ((r__1 = y - yps2, fabs(r__1)) > 1e-8f) {
888 a3 = y * (y2 * (y2 * (y2 * .56419f + 3.10304f) + 4.65456f) +
890 b3 = y * (y2 * (y2 * 1.69257f + .56419f) + 2.962f);
891 c3 = y * (y2 * 1.69257f - 2.53885f);
893 a4 = y2 * (y2 * (y2 * (y2 + 6.f) + 10.5f) + 4.5f) + .5625f;
894 b4 = y2 * (y2 * (y2 * 4.f + 6.f) + 9.f) - 4.5f;
895 c4 = y2 * (y2 * 6.f - 6.f) + 10.5f;
898 for (i2 = 1; i2 <= 3; i2 += 2) {
899 i__1 = lauf[(i2 + 1) * 5 - 3];
900 for (i1 = lauf[i2 * 5 - 3]; i1 <= i__1; ++i1) {
901 x2 = x[i1-1] * x[i1-1];
902 ls[i1-1] =
fac * (a3 + x2 * (b3 + x2 * (c3 + x2 * d3))) / (a4
903 + x2 * (b4 + x2 * (c4 + x2 * (d4 + x2))));
910 if (lauf[6] >= lauf[1] || lauf[16] >= lauf[11]) {
911 if ((r__1 = y - yps1, fabs(r__1)) > 1e-8f) {
919 for (i2 = 1; i2 <= 3; i2 += 2) {
920 i__1 = lauf[(i2 + 1) * 5 - 4];
921 for (i1 = lauf[i2 * 5 - 4]; i1 <= i__1; ++i1) {
922 x2 = x[i1-1] * x[i1-1];
924 ls[i1-1] = c1 * (b1 + x2) / (b2 * b2 + a2 * x2);
932 if (lauf[5] >= lauf[0] || lauf[15] >= lauf[10]) {
933 if ((r__1 = y - yps0, fabs(r__1)) > 1e-8f) {
939 for (i2 = 1; i2 <= 3; i2 += 2) {
940 i__1 = lauf[(i2 + 1) * 5 - 5];
941 for (i1 = lauf[i2 * 5 - 5]; i1 <= i__1; ++i1) {
942 ls[i1-1] =
b0 / (x[i1-1] * x[i1-1] + y2);
963 if (x2 * .0062f + y2 * .01417f > 1.f) {
964 if (x2 * 6.2e-5f + y2 * 1.98373e-4f > 1.f) {
970 if (x2 * .041649f + y2 * .111111111f > 1.f) {
972 }
else if (y >= fabs(x) * .19487f - .1753846f) {
1051 assert( nf==f_grid.
nelem() );
1079 long bmin = 0, lauf[20] = {0} , bmax, imin, imax;
1080 long stack[80] = {0} ;
1081 Numeric a0, a1, a2, a3, a4, a5, a6, a7, a8, b8, c8, d8, e8, f8, g8,
1082 h8, b7, c7, d7, e7, f7, g7, o8, p8, q8, r8, s8, t8, h7, o7, p7,
1083 q7, r7, s7, t7, b6, c6, d6, e6, b5, c5, d5, e5, b4, c4, d4, b3,
1085 a0 = a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = b8 = c8 = d8 = e8 = f8 = g8
1086 = h8 = b7 = c7 = d7 = e7 = f7 = g7 = o8 = p8 = q8 = r8 = s8 = t8 = h7
1087 = o7 = p7 = q7 = r7 = s7 = t7 = b6 = c6 = d6 = e6 = b5 = c5 = d5 = e5
1088 = b4 = c4 = d4 = b3 = c3 = d3 = b1 = y2 = 0;
1089 long i2 = 0, i1 = 0;
1091 long stackp = 0, imitte = 0;
1100 for (i1=0; i1< (int) nf; i1++)
1102 x[i1] = (f_grid[i1] - f0) / sigma;
1114 if (y >= 71.f || x[0] >= 123.f || x[nf-1] <= -123.f) {
1121 for (i2 = 1; i2 <= 4; ++i2) {
1122 for (i1 = 0; i1 <= 4; ++i1) {
1123 lauf[i1 + i2 * 5 - 5] = i2 % 2 * (nf + 1);
1128 stack[stackp - 1] = 1;
1129 stack[stackp + 19] = nf;
1130 stack[stackp + 39] =
bfun4_(y, x[0]);
1131 stack[stackp + 59] =
bfun4_(y, x[nf-1]);
1133 imin = stack[stackp - 1];
1134 imax = stack[stackp + 19];
1135 bmin = stack[stackp + 39];
1136 bmax = stack[stackp + 59];
1138 if (x[imax-1] < 0.f) {
1140 i__1 = imin, i__2 = lauf[bmin];
1141 lauf[bmin] =
min(i__1,i__2);
1143 i__1 = imax, i__2 = lauf[bmax + 5];
1144 lauf[bmax + 5] =
max(i__1,i__2);
1147 }
else if (x[imin-1] >= 0.f) {
1149 i__1 = imin, i__2 = lauf[bmin + 10];
1150 lauf[bmin + 10] =
min(i__1,i__2);
1152 i__1 = imax, i__2 = lauf[bmax + 15];
1153 lauf[bmax + 15] =
max(i__1,i__2);
1158 imitte = (imax + imin) / 2;
1159 stack[stackp - 1] = imitte + 1;
1160 stack[stackp + 19] = imax;
1161 stack[stackp + 39] =
bfun4_(y, x[imitte]);
1162 stack[stackp + 59] = bmax;
1164 stack[stackp - 1] = imin;
1165 stack[stackp + 19] = imitte;
1166 stack[stackp + 39] = bmin;
1167 stack[stackp + 59] =
bfun4_(y, x[imitte-1]);
1174 if (lauf[9] >= lauf[4] || lauf[19] >= lauf[14]) {
1175 if ((r__1 = (
float)(y - yps4), fabs(r__1)) > 1e-8f) {
1177 a7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
1178 y2 * (y2 * (y2 * (2.35944f - y2 * .56419f) - 72.9359f) +
1179 571.687f) - 5860.68f) + 40649.2f) - 320772.f) + 1684100.f)
1180 - 9694630.f) + 40816800.f) - 1.53575e8f) + 4.56662e8f) -
1181 9.86604e8f) + 1.16028e9f);
1182 b7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
1183 y2 * (y2 * (23.0312f - y2 * 7.33447f) - 234.143f) -
1184 2269.19f) + 45251.3f) - 234417.f) + 3599150.f) -
1185 7723590.f) + 86482900.f) - 2.91876e8f) + 8.06985e8f) -
1186 9.85386e8f) - 5.60505e8f);
1187 c7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
1188 y2 * (97.6203f - y2 * 44.0068f) + 1097.77f) - 25338.3f) +
1189 98079.1f) + 576054.f) - 2.3818e7f) + 22930200.f) -
1190 2.04467e8f) + 2.94262e8f) + 2.47157e8f) - 6.51523e8f);
1191 d7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
1192 228.563f - y2 * 161.358f) + 8381.97f) - 66431.2f) -
1193 303569.f) + 2240400.f) + 38311200.f) - 41501300.f) -
1194 99622400.f) + 2.70167e8f) - 2.63894e8f);
1195 e7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
1196 296.38f - y2 * 403.396f) + 23507.6f) - 66212.1f) -
1197 1.003e6f) + 468142.f) + 24620100.f) + 5569650.f) +
1198 1.40677e8f) - 63177100.f);
1199 f7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (125.591f -
1200 y2 * 726.113f) + 37544.8f) + 8820.94f) - 934717.f) -
1201 1931140.f) - 33289600.f) + 4073820.f) - 16984600.f);
1202 g7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (-260.198f - y2 *
1203 968.15f) + 37371.9f) + 79902.5f) - 186682.f) - 900010.f)
1204 + 7528830.f) - 1231650.f);
1205 h7 = y * (y2 * (y2 * (y2 * (y2 * (y2 * (-571.645f - y2 * 968.15f)
1206 + 23137.1f) + 72520.9f) + 153468.f) + 86407.6f) -
1208 o7 = y * (y2 * (y2 * (y2 * (y2 * (-575.164f - y2 * 726.113f) +
1209 8073.15f) + 26538.5f) + 49883.8f) - 23586.5f);
1210 p7 = y * (y2 * (y2 * (y2 * (-352.467f - y2 * 403.396f) +
1211 953.655f) + 2198.86f) - 8009.1f);
1212 q7 = y * (y2 * (y2 * (-134.792f - y2 * 161.358f) - 271.202f) -
1214 r7 = y * (y2 * (-29.7896f - y2 * 44.0068f) - 77.0535f);
1215 s7 = y * (-2.92264f - y2 * 7.33447f);
1217 a8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
1218 y2 * (y2 * (y2 * (y2 - 3.68288f) + 126.532f) - 955.194f)
1219 + 9504.65f) - 70946.1f) + 483737.f) - 2857210.f) +
1220 14464700.f) - 61114800.f) + 2.11107e8f) - 5.79099e8f) +
1221 1.17022e9f) - 1.5599e9f) + 1.02827e9f;
1222 b8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
1223 y2 * (y2 * (y2 * 14.f - 40.5117f) + 533.254f) + 3058.26f)
1224 - 55600.f) + 498334.f) - 2849540.f) + 13946500.f) -
1225 70135800.f) + 2.89676e8f) - 7.53828e8f) + 1.66421e9f) -
1226 2.28855e9f) + 1.5599e9f;
1227 c8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
1228 y2 * (y2 * 91 - 198.876f) - 1500.17f) + 48153.3f) -
1229 217801.f) - 1063520.f) + 1.4841e7f) - 46039600.f) +
1230 63349600.f) - 6.60078e8f) + 1.06002e9f) - 1.66421e9f) +
1232 d8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (
1233 y2 * 364 - 567.164f) - 16493.7f) + 161461.f) + 280428.f)
1234 - 6890020.f) - 6876560.f) + 1.99846e8f) + 54036700.f) +
1235 6.60078e8f) - 7.53828e8f) + 5.79099e8f;
1236 e8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 *
1237 1001 - 1012.79f) - 55582.f) + 240373.f) + 1954700.f) -
1238 5257220.f) - 50101700.f) - 1.99846e8f) + 63349600.f) -
1239 2.89676e8f) + 2.11107e8f;
1240 f8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * 2002 -
1241 1093.82f) - 106663.f) + 123052.f) + 3043160.f) +
1242 5257220.f) - 6876560.f) + 46039600.f) - 70135800.f) +
1244 g8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * 3003 -
1245 486.14f) - 131337.f) - 123052.f) + 1954700.f) + 6890020.f)
1246 + 1.4841e7f) - 13946500.f) + 14464700.f;
1247 h8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * (y2 * 3432 + 486.14f) -
1248 106663.f) - 240373.f) + 280428.f) + 1063520.f) -
1249 2849540.f) + 2857210.f;
1250 o8 = y2 * (y2 * (y2 * (y2 * (y2 * (y2 * 3003 + 1093.82f) -
1251 55582.f) - 161461.f) - 217801.f) - 498334.f) + 483737.f;
1252 p8 = y2 * (y2 * (y2 * (y2 * (y2 * 2002 + 1012.79f) - 16493.7f) -
1253 48153.3f) - 55600.f) + 70946.1f;
1254 q8 = y2 * (y2 * (y2 * (y2 * 1001.f + 567.164f) - 1500.17f) -
1255 3058.26f) + 9504.65f;
1256 r8 = y2 * (y2 * (y2 * 364 + 198.876f) + 533.254f) + 955.194f;
1257 s8 = y2 * (y2 * 91.f + 40.5117f) + 126.532f;
1258 t8 = y2 * 14.f + 3.68288f;
1261 for (i2 = 1; i2 <= 3; i2 += 2) {
1262 i__1 = lauf[(i2 + 1) * 5 - 1];
1263 for (i1 = lauf[i2 * 5 - 1]; i1 <= i__1; ++i1) {
1264 x2 = x[i1-1] * x[i1-1];
1265 ls[i1-1] =
fac * (exp(y2 - x2) * cos(x[i1-1] * ym2) - (a7 + x2 *
1266 (b7 + x2 * (c7 + x2 * (d7 + x2 * (e7 + x2 * (f7 + x2
1267 * (g7 + x2 * (h7 + x2 * (o7 + x2 * (p7 + x2 * (q7 +
1268 x2 * (r7 + x2 * (s7 + x2 * t7))))))))))))) / (a8 + x2
1269 * (b8 + x2 * (c8 + x2 * (d8 + x2 * (e8 + x2 * (f8 +
1270 x2 * (g8 + x2 * (h8 + x2 * (o8 + x2 * (p8 + x2 * (q8
1271 + x2 * (r8 + x2 * (s8 + x2 * (t8 + x2)))))))))))))));
1278 if (lauf[8] >= lauf[3] || lauf[18] >= lauf[13]) {
1279 if ((r__1 = (
float)(y - yps3), fabs(r__1)) > 1e-8f) {
1281 a5 = y * (y * (y * (y * (y * (y * (y * (y * (y *
1282 .564224f + 7.55895f) + 49.5213f) + 204.501f) + 581.746f)
1283 + 1174.8f) + 1678.33f) + 1629.76f) + 973.778f) + 272.102f;
1284 b5 = y * (y * (y * (y * (y * (y * (y * 2.25689f + 22.6778f)
1285 + 100.705f) + 247.198f) + 336.364f) + 220.843f) -
1286 2.34403f) - 60.5644f;
1287 c5 = y * (y * (y * (y * (y * 3.38534f + 22.6798f) + 52.8454f)
1288 + 42.5683f) + 18.546f) + 4.58029f;
1289 d5 = y * (y * (y * 2.25689f + 7.56186f) + 1.66203f) - .128922f;
1290 e5 = y * .564224f + 9.71457e-4f;
1291 a6 = y * (y * (y * (y * (y * (y * (y * (y * (y * (y +
1292 13.3988f) + 88.2674f) + 369.199f) + 1074.41f) + 2256.98f)
1293 + 3447.63f) + 3764.97f) + 2802.87f) + 1280.83f) +
1295 b6 = y * (y * (y * (y * (y * (y * (y * (y * 5.f +
1296 53.5952f) + 266.299f) + 793.427f) + 1549.68f) + 2037.31f)
1297 + 1758.34f) + 902.306f) + 211.678f;
1298 c6 = y * (y * (y * (y * (y * (y * 10.f + 80.3928f) +
1299 269.292f) + 479.258f) + 497.302f) + 308.186f) + 78.866f;
1300 d6 = y * (y * (y * (y * 10.f + 53.5952f) + 92.7568f) +
1301 55.0293f) + 22.0353f;
1302 e6 = y * (y * 5.f + 13.3988f) + 1.49645f;
1304 for (i2 = 1; i2 <= 3; i2 += 2) {
1305 i__1 = lauf[(i2 + 1) * 5 - 2];
1306 for (i1 = lauf[i2 * 5 - 2]; i1 <= i__1; ++i1) {
1307 x2 = x[i1-1] * x[i1-1];
1308 ls[i1-1] =
fac * (a5 + x2 * (b5 + x2 * (c5 + x2 * (d5 + x2 *
1309 e5)))) / (a6 + x2 * (b6 + x2 * (c6 + x2 * (d6 + x2 * (
1317 if (lauf[7] >= lauf[2] || lauf[17] >= lauf[12]) {
1318 if ((r__1 = (
float)(y - yps2), fabs(r__1)) > 1e-8f) {
1320 a3 = y * (y2 * (y2 * (y2 * .56419f + 3.10304f) + 4.65456f) +
1322 b3 = y * (y2 * (y2 * 1.69257f + .56419f) + 2.962f);
1323 c3 = y * (y2 * 1.69257f - 2.53885f);
1325 a4 = y2 * (y2 * (y2 * (y2 + 6.f) + 10.5f) + 4.5f) + .5625f;
1326 b4 = y2 * (y2 * (y2 * 4.f + 6.f) + 9.f) - 4.5f;
1327 c4 = y2 * (y2 * 6.f - 6.f) + 10.5f;
1328 d4 = y2 * 4.f - 6.f;
1330 for (i2 = 1; i2 <= 3; i2 += 2) {
1331 i__1 = lauf[(i2 + 1) * 5 - 3];
1332 for (i1 = lauf[i2 * 5 - 3]; i1 <= i__1; ++i1) {
1333 x2 = x[i1-1] * x[i1-1];
1334 ls[i1-1] =
fac * (a3 + x2 * (b3 + x2 * (c3 + x2 * d3))) / (a4
1335 + x2 * (b4 + x2 * (c4 + x2 * (d4 + x2))));
1342 if (lauf[6] >= lauf[1] || lauf[16] >= lauf[11]) {
1343 if ((r__1 = (
float)(y - yps1), fabs(r__1)) > 1e-8f) {
1351 for (i2 = 1; i2 <= 3; i2 += 2) {
1352 i__1 = lauf[(i2 + 1) * 5 - 4];
1353 for (i1 = lauf[i2 * 5 - 4]; i1 <= i__1; ++i1) {
1354 x2 = x[i1-1] * x[i1-1];
1356 ls[i1-1] = c1 * (b1 + x2) / (b2 * b2 + a2 * x2);
1364 if (lauf[5] >= lauf[0] || lauf[15] >= lauf[10]) {
1365 if ((r__1 = (
float)(y - yps0), fabs(r__1)) > 1e-8f) {
1371 for (i2 = 1; i2 <= 3; i2 += 2) {
1372 i__1 = lauf[(i2 + 1) * 5 - 5];
1373 for (i1 = lauf[i2 * 5 - 5]; i1 <= i__1; ++i1) {
1374 ls[i1-1] =
b0 / (x[i1-1] * x[i1-1] + y2);
1441 assert( nf==f_grid.
nelem() );
1455 Numeric B[22+1] = {0.,0.,.7093602e-7};
1457 const Numeric XN[15+1] = {0.,10.,9.,8.,8.,7.,6.,5.,4.,3.,3.,3.,3.,3.,3.,3.};
1458 const Numeric YN[15+1] = {0.,.6,.6,.6,.5,.4,.4,.3,.3,.3,.3,1.,.9,.8,.7,.7};
1459 Numeric D0[25+1] = {0}, D1[25+1] = {0}, D2[25+1] = {0}, D3[25+1] = {0}, D4[25+1] = {0};
1462 const Numeric XX[3+1] = {0.,.5246476,1.65068,.7071068};
1463 const Numeric HH[3+1] = {0.,.2562121,.2588268e-1,.2820948};
1464 const Numeric NBY2[19+1] = {0.,9.5,9.,8.5,8.,7.5,7.,6.5
1465 ,6.,5.5,5.,4.5,4.,3.5,3.,2.5,2.,1.5,1.,.5};
1466 const Numeric C[21+1] = {0.,.7093602e-7,-.2518434e-6,.856687e-6,
1467 -.2787638e-5,.866074e-5,-.2565551e-4,.7228775e-4,
1468 -.1933631e-3,.4899520e-3,-.1173267e-2,.2648762e-2,
1469 -.5623190e-2,.1119601e-1,-.2084976e-1,.3621573e-1,
1470 -.5851412e-1,.8770816e-1,-.121664,.15584,-.184,.2};
1473 int I, J, K, MAX, MIN,
N, i1;
1484 for (i1=0; i1< (int) nf; i1++)
1486 x[i1] = fabs( (f_grid[i1] - f0) )/ sigma;
1493 for (I=1; I<=15; I++)
1495 for (I=1; I<=25; I++)
1498 CO = 4.*HN[I]*HN[I]/25.-2.;
1499 for (J=2; J<=21; J++)
1500 B[J+1] = CO*B[J]-B[J-1]+C[J];
1501 D0[I] = HN[I]*(B[22]-B[21])/5.;
1502 D1[I] = 1.-2.*HN[I]*D0[I];
1503 D2[I] = (HN[I]*D1[I]+D0[I])/RI[2];
1504 D3[I] = (HN[I]*D2[I]+D1[I])/RI[3];
1505 D4[I] = (HN[I]*D3[I]+D2[I])/RI[4];
1507 L104:
for (K=0; K<(int) nf; K++)
1509 if ((x[K]-5.) < 0.)
goto L105;
else goto L112;
1510 L105:
if ((Y-1.) <= 0.)
goto L110;
else goto L106;
1511 L106:
if (x[K] > 1.85*(3.6-Y))
goto L112;
1513 if (Y < 1.45)
goto L107;
1516 L107: I = (int) (11.*Y);
1517 L108: J = (int) (x[K]+x[K]+1.85);
1518 MAX = (int) (XN[J]*YN[I]+.46);
1519 MIN = (int) ( (16 < 21-2*MAX) ? 16 : 21-2*MAX );
1523 for (J=MIN; J <= 19; J++)
1525 U = NBY2[J]/(UU*UU+VV*VV);
1529 ls[K] = UU/(UU*UU+VV*VV)/1.772454*
fac;
1532 if (x[K]+Y >= 5.)
goto L113;
1536 U = (((D4[
N+1]*DX+D3[
N+1])*DX+D2[
N+1])*DX+D1[
N+1])*DX+D0[
N+1];
1539 VV = exp(Y2-x[K]*x[K])*cos(2.*x[K]*Y)/1.128379-Y*V;
1541 MAX = (int) (5.+(12.5-x[K])*.8*Y);
1542 for (I=2; I<=MAX; I+=2)
1544 U = (x[K]*V+U)/RI[I];
1545 V = (x[K]*U+V)/RI[I+1];
1549 ls[K] = 1.128379*VV*
fac;
1552 if (Y < 11.-.6875*x[K])
goto L113;
1556 ls[K] = Y*(HH[3]/(Y2+U*U)+HH[3]/(Y2+V*V))*
fac;
1559 L113: U = x[K]-XX[1];
1563 ls[K] = Y*(HH[1]/(Y2+U*U)+HH[1]/(Y2+V*V)+HH[2]/(Y2+UU*UU)+HH[2]/(Y2+
1606 assert( nf==f_grid.
nelem() );
1619 os <<
"You have to set abs_h2o if you want to use this lineshape.";
1620 throw runtime_error( os.str() );
1644 gamma *= ( 1.0 - x[4] ) / ( 1 - x[3] );
1652 overlap = (x[7] + x[8] * ( x[0] - 1.0)) *
1657 gamma_o2 = gamma + 1.1 * x[5] * x[2] * x[4] * x[0];
1658 gamma_o2_2 = gamma_o2 * gamma_o2;
1663 if ( (gamma_o2/sigma - 40) <= 0.0 )
1679 FD = f_grid[J] - f0;
1680 FS = f_grid[J] + f0;
1681 SF1 = (gamma_o2 + FD*overlap) / (FD*FD + gamma_o2_2);
1682 SF2 = (gamma_o2 - FS*overlap) / (FS*FS + gamma_o2_2);
1683 ls[J] = (SF1 + SF2) /
PI;
1724 assert( nf==f_grid.
nelem() );
1752 gamma *= ( 1.0 - x[4] ) / ( 1 - x[3] );
1759 overlap = (x[7] + x[8] * ( x[0] - 1.0)) *
1764 gamma_o2 = gamma + 1.1 * x[5] * x[2] * x[4] * x[0];
1765 gamma_o2_2 = gamma_o2 * gamma_o2;
1770 if ( (gamma_o2/sigma - 40) <= 0.0 )
1791 ls[J] *= f0_2 / (f_grid[J] * f_grid[J]);
1799 FD = f_grid[J] - f0;
1800 FS = f_grid[J] + f0;
1801 SF1 = (gamma_o2 + FD*overlap) / (FD*FD + gamma_o2_2);
1802 SF2 = (gamma_o2 - FS*overlap) / (FS*FS + gamma_o2_2);
1803 ls[J] = (SF1 + SF2) /
PI;
1832 const Numeric df_cm_abs = fabs( df_cm );
1837 if( df_cm_abs <= 5 )
1839 else if( df_cm_abs <= 22 )
1840 { chi += n2 * 1.968 * exp( -0.1354 * df_cm_abs ); }
1841 else if( df_cm_abs <= 50 )
1842 { chi += n2 * 0.160 * exp( -0.0214 * df_cm_abs ); }
1844 { chi += n2 * 0.162 * exp( -0.0216 * df_cm_abs ); }
1847 if( df_cm_abs <= 5 )
1849 else if( df_cm_abs <= 22 )
1850 { chi += o2 * 1.968 * exp( -0.1354 * df_cm_abs ); }
1851 else if( df_cm_abs <= 50 )
1852 { chi += o2 * 0.160 * exp( -0.0214 * df_cm_abs ); }
1854 { chi += o2 * 0.162 * exp( -0.0216 * df_cm_abs ); }
1880 assert( f_grid.
nelem() == nf );
1886 const Numeric gamma2 = gamma * gamma;
1889 for (
Index i=0; i<nf; ++i )
1892 const Numeric df = f_grid[i] - f0;
1899 ls[i] = chi *
fac / ( df * df + gamma2 );
1928 for (
Index i=0; i<nf; ++i )
1931 const Numeric df = f_grid[i] - f0;
1970 if (f_grid.
nelem()>-1)
1972 assert( nf==f_grid.
nelem() );
1975 for (
Index i=0; i<nf; ++i )
2001 assert( nf==f_grid.
nelem() );
2003 for (
Index i=0; i<nf; ++i )
2005 fac[i] = f_grid[i] / f0;
2028 assert( nf==f_grid.
nelem() );
2033 for (
Index i=0; i<nf; ++i )
2035 fac[i] = (f_grid[i] * f_grid[i]) / f0_2;
2067 assert( nf==f_grid.
nelem() );
2075 for (
Index i=0; i<nf; ++i )
2100 "This lineshape does nothing. It only exists, because formally\n"
2101 "you have to specify a lineshape also for continuum tags.",
2107 "The Lorentz line shape.",
2113 "The Doppler line shape.",
2119 "The Voigt line shape. Approximation by Kuntz: Accuracy 2*10-6",
2125 "The Voigt line shape. Approximation by Kuntz: Accuracy 2*10-3",
2131 "The Voigt line shape. Approximation by Kuntz: Accuracy 2*10-4",
2137 "The Voigt line shape. Approximation by Drayson.",
2142 (
"Rosenkranz_Voigt_Kuntz6",
2143 "Rosenkranz lineshape for oxygen with overlap correction, "
2144 "at high altitudes Voigt_Kuntz6.",
2149 (
"Rosenkranz_Voigt_Drayson",
2150 "Rosenkranz lineshape for oxygen with overlap correction, "
2151 "at high altitudes Drayson.",
2157 "Special line shape for CO2 in the infrared, neglecting Doppler\n"
2158 "broadening and details of line mixing. The line shape can be\n"
2160 " chi(f,f0) * Lorentz(f,f0) \n"
2162 "The chi-factor follows Cousin et al. 1985. Broadening by N2 and O2\n"
2163 "is considered, while self-broadening (CO2-CO2) is neglected."
2165 "NOTE: Temperature dependency is not yet included. The chi factor is\n"
2172 "Special line shape for CO2 in the infrared, neglecting details of\n"
2173 "line mixing. The line shape can be expressed as\n"
2174 " chi(f,f0) * Drayson(f,f0) \n"
2176 "The chi-factor follows Cousin et al. 1985. Broadening by N2 and O2\n"
2177 "is considered, while self-broadening (CO2-CO2) is neglected.\n"
2179 "NOTE: Temperature dependency is not yet included. The chi factor is\n"
2197 "No normalization of the lineshape.",
2203 "Quadratic normalization of the lineshape with (f/f0)^2.",
2209 "Van Vleck Huber normalization of the lineshape with\n"
2210 " (f*tanh(h*f/(2*k*T))) / (f0*tanh(h*f0/(2*k*T))).\n"
2211 " The denominator is a result of catalogue intensities.",