14#include "matpack_complex.h"
16#include "matpack_data.h"
28 const Numeric& alpha);
44 const Numeric& alpha_1,
45 const Numeric& alpha_2);
55 const Numeric& alpha_1,
56 const Numeric& alpha_2);
61 const Numeric& thet0_1,
62 const Numeric& thet0_2,
68 const Numeric& alpha);
73 const Numeric& thet0_1,
74 const Numeric& thet0_2,
80 const Numeric& alpha_1,
81 const Numeric& alpha_2);
193void tmd_(
const Numeric& rat,
195 const Numeric& axmax,
205 const Numeric& ddelt,
208 const Numeric& r1rat,
209 const Numeric& r2rat,
265 const Numeric& ddelt,
295void ampl_(
const Index& nmax,
297 const Numeric& thet0,
301 const Numeric& alpha,
323#ifndef ENABLE_TMATRIX
357 throw std::runtime_error(
358 "This version of ARTS was compiled without T-Matrix support.");
375 throw std::runtime_error(
376 "This version of ARTS was compiled without T-Matrix support.");
392 throw std::runtime_error(
393 "This version of ARTS was compiled without T-Matrix support.");
397 throw std::runtime_error(
398 "This version of ARTS was compiled without T-Matrix support.");
406 const Numeric& thet0,
411 const Numeric& alpha) {
416 ampl_(nmax, lam, thet0, thet, phi0, phi, alpha, beta, s11, s12, s21, s22);
438 const Complex& s22) {
440 z(0, 0) = 0.5 * (s11 * conj(s11) + s12 * conj(s12) + s21 * conj(s21) +
443 z(0, 1) = 0.5 * (s11 * conj(s11) - s12 * conj(s12) + s21 * conj(s21) -
446 z(0, 2) = (-s11 * conj(s12) - s22 * conj(s21)).real();
447 z(0, 3) = (Complex(0., 1.) * (s11 * conj(s12) - s22 * conj(s21))).real();
449 z(1, 0) = 0.5 * (s11 * conj(s11) + s12 * conj(s12) - s21 * conj(s21) -
452 z(1, 1) = 0.5 * (s11 * conj(s11) - s12 * conj(s12) - s21 * conj(s21) +
455 z(1, 2) = (-s11 * conj(s12) + s22 * conj(s21)).real();
456 z(1, 3) = (Complex(0., 1.) * (s11 * conj(s12) + s22 * conj(s21))).real();
458 z(2, 0) = (-s11 * conj(s21) - s22 * conj(s12)).real();
459 z(2, 1) = (-s11 * conj(s21) + s22 * conj(s12)).real();
460 z(2, 2) = (s11 * conj(s22) + s12 * conj(s21)).real();
461 z(2, 3) = (Complex(0., -1.) * (s11 * conj(s22) + s21 * conj(s12))).real();
463 z(3, 0) = (Complex(0., 1.) * (s21 * conj(s11) + s22 * conj(s12))).real();
464 z(3, 1) = (Complex(0., 1.) * (s21 * conj(s11) - s22 * conj(s12))).real();
465 z(3, 2) = (Complex(0., -1.) * (s22 * conj(s11) - s12 * conj(s21))).real();
466 z(3, 3) = (s22 * conj(s11) - s12 * conj(s21)).real();
469static const Numeric GaussLeg6[][3] = {{0.23861918, 0.66120939, 0.93246951},
470 {0.46791393, 0.36076157, 0.17132449}};
472static const Numeric GaussLeg10[][5] = {
473 {0.14887434, 0.43339539, 0.67940957, 0.86506337, 0.97390653},
474 {0.29552422, 0.26926672, 0.21908636, 0.14945135, 0.06667134}};
497 const Numeric& thet0,
502 const Numeric& alpha_1,
503 const Numeric& alpha_2) {
504 const Numeric
c = 0.5 * (alpha_2 + alpha_1);
505 const Numeric m = 0.5 * (alpha_2 - alpha_1);
511 for (Index i = 0; i < 5; ++i) {
512 const Numeric abscissa = GaussLeg10[0][i];
513 const Numeric weight = GaussLeg10[1][i];
515 calc_phamat(z, nmax, lam, thet0, thet, phi0, phi, beta,
c + m * abscissa);
519 calc_phamat(z, nmax, lam, thet0, thet, phi0, phi, beta,
c - m * abscissa);
547 const Numeric& thet0,
552 const Numeric& alpha_1,
553 const Numeric& alpha_2) {
554 const Numeric
c = 0.5 * (alpha_2 + alpha_1);
555 const Numeric m = 0.5 * (alpha_2 - alpha_1);
561 for (Index i = 0; i < 3; ++i) {
562 const Numeric abscissa = GaussLeg6[0][i];
563 const Numeric weight = GaussLeg6[1][i];
565 calc_phamat(z, nmax, lam, thet0, thet, phi0, phi, beta,
c + m * abscissa);
569 calc_phamat(z, nmax, lam, thet0, thet, phi0, phi, beta,
c - m * abscissa);
599 const Numeric& thet0_1,
600 const Numeric& thet0_2,
603 const Numeric& phi_1,
604 const Numeric& phi_2,
606 const Numeric& alpha) {
613 const Numeric c_thet0 = 0.5 * (thet0_2 + thet0_1);
614 const Numeric m_thet0 = 0.5 * (thet0_2 - thet0_1);
615 const Numeric c_phi = 0.5 * (phi_2 + phi_1);
616 const Numeric m_phi = 0.5 * (phi_2 - phi_1);
618 for (Index t = 0; t < 5; ++t) {
619 const Numeric abscissa_thet0 = GaussLeg10[0][t];
620 const Numeric weight_thet0 = GaussLeg10[1][t];
622 Matrix phamat_phi(4, 4, 0.);
624 for (Index p = 0; p < 5; ++p) {
625 const Numeric abscissa_phi = GaussLeg10[0][p];
626 const Numeric weight_phi = GaussLeg10[1][p];
628 Numeric this_thet0 = c_thet0 + m_thet0 * abscissa_thet0;
635 c_phi + m_phi * abscissa_phi,
638 z *= weight_phi * sin(this_thet0 *
PI / 180.);
647 c_phi - m_phi * abscissa_phi,
650 z *= weight_phi * sin(this_thet0 *
PI / 180.);
653 this_thet0 = c_thet0 - m_thet0 * abscissa_thet0;
660 c_phi + m_phi * abscissa_phi,
663 z *= weight_phi * sin(this_thet0 *
PI / 180.);
672 c_phi - m_phi * abscissa_phi,
675 z *= weight_phi * sin(this_thet0 *
PI / 180.);
678 phamat_phi *= m_phi * weight_thet0;
679 phamat += phamat_phi;
710 const Numeric& thet0_1,
711 const Numeric& thet0_2,
714 const Numeric& phi_1,
715 const Numeric& phi_2,
717 const Numeric& alpha_1,
718 const Numeric& alpha_2) {
722 Matrix phamat_phi(4, 4);
724 const Numeric c_thet0 = 0.5 * (thet0_2 + thet0_1);
725 const Numeric m_thet0 = 0.5 * (thet0_2 - thet0_1);
726 const Numeric c_phi = 0.5 * (phi_2 + phi_1);
727 const Numeric m_phi = 0.5 * (phi_2 - phi_1);
732 for (Index t = 0; t < 3; ++t) {
733 const Numeric abscissa_thet0 = GaussLeg6[0][t];
734 const Numeric weight_thet0 = GaussLeg6[1][t];
738 for (Index p = 0; p < 3; ++p) {
739 const Numeric abscissa_phi = GaussLeg6[0][p];
740 const Numeric weight_phi = GaussLeg6[1][p];
742 Numeric this_thet0 = c_thet0 + m_thet0 * abscissa_thet0;
749 c_phi + m_phi * abscissa_phi,
753 z *= weight_phi * sin(this_thet0 *
PI / 180.);
762 c_phi - m_phi * abscissa_phi,
766 z *= weight_phi * sin(this_thet0 *
PI / 180.);
769 this_thet0 = c_thet0 - m_thet0 * abscissa_thet0;
776 c_phi + m_phi * abscissa_phi,
780 z *= weight_phi * sin(this_thet0 *
PI / 180.);
789 c_phi - m_phi * abscissa_phi,
793 z *= weight_phi * sin(this_thet0 *
PI / 180.);
796 phamat_phi *= m_phi * weight_thet0;
797 phamat += phamat_phi;
835 const Numeric equiv_radius,
836 const Numeric aspect_ratio,
839 const Numeric ref_index_real,
840 const Numeric ref_index_imag,
841 const Numeric precision,
844 const Index quiet = 1) {
850 char errmsg[1024] =
"";
868#pragma omp critical(tmatrix_code)
893 f11.unsafe_data_handle(),
894 f22.unsafe_data_handle(),
895 f33.unsafe_data_handle(),
896 f44.unsafe_data_handle(),
897 f12.unsafe_data_handle(),
898 f34.unsafe_data_handle(),
901 if (strlen(errmsg)) {
902 std::ostringstream os;
903 os <<
"T-Matrix code failed: " << errmsg;
904 throw std::runtime_error(os.str());
928 const Numeric equiv_radius,
929 const Numeric aspect_ratio,
932 const Numeric ref_index_real,
933 const Numeric ref_index_imag,
934 const Numeric precision,
935 const Index quiet = 1) {
936 char errmsg[1024] =
"";
941#pragma omp critical(tmatrix_code)
956 if (strlen(errmsg)) {
957 std::ostringstream os;
958 os <<
"T-Matrix code failed: " << errmsg;
959 throw std::runtime_error(os.str());
964 ConstMatrixView ref_index_real,
965 ConstMatrixView ref_index_imag,
966 const Numeric equiv_radius,
968 const Numeric aspect_ratio,
969 const Numeric precision,
973 const Index nf = ssd.
f_grid.nelem();
974 const Index nT = ssd.
T_grid.nelem();
979 if (ref_index_real.nrows() != nf)
980 throw std::runtime_error(
981 "Number of rows of refractive index real part must match ssd.f_grid.");
982 if (ref_index_real.ncols() != nT)
983 throw std::runtime_error(
984 "Number of cols of refractive index real part must match ssd.T_grid.");
985 if (ref_index_imag.nrows() != nf)
986 throw std::runtime_error(
987 "Number of rows of refractive index imaginary part must match ssd.f_grid.");
988 if (ref_index_imag.ncols() != nT)
989 throw std::runtime_error(
990 "Number of cols of refractive index imaginary part must match ssd.T_grid.");
998 const Index nza = ssd.
za_grid.nelem();
1017 Matrix mono_pha_mat_data(nza, 6, NAN);
1020 os <<
"Calculation of SingleScatteringData properties failed for\n\n";
1021 bool anyfailed =
false;
1022#pragma omp critical(tmatrix_ssp)
1023 for (Index f_index = 0; f_index < nf; ++f_index)
1024 for (Index T_index = 0; T_index < nT; ++T_index) {
1025 bool thisfailed =
false;
1039 ref_index_real(f_index, T_index),
1040 ref_index_imag(f_index, T_index),
1045 }
catch (
const std::runtime_error& e) {
1048 os <<
"f_grid[" << f_index <<
"] = " << ssd.
f_grid[f_index] <<
"\n"
1049 <<
"T_grid[" << T_index <<
"] = " << ssd.
T_grid[T_index]
1059 mono_pha_mat_data(joker, 0) = f11;
1060 mono_pha_mat_data(joker, 1) = f12;
1061 mono_pha_mat_data(joker, 2) = f22;
1062 mono_pha_mat_data(joker, 3) = f33;
1063 mono_pha_mat_data(joker, 4) = f34;
1064 mono_pha_mat_data(joker, 5) = f44;
1066 mono_pha_mat_data *= csca / 4. /
PI;
1067 ssd.
pha_mat_data(f_index, T_index, joker, 0, 0, 0, joker) =
1071 ssd.
abs_vec_data(f_index, T_index, 0, 0, 0) = cext - csca;
1078 throw std::runtime_error(os.str());
1086 const Index nza = ssd.
za_grid.nelem();
1087 const Index naa = ssd.
aa_grid.nelem();
1102 Tensor5 csca_data(nf, nT, nza, 1, 2);
1104#pragma omp critical(tmatrix_ssp)
1105 for (Index f_index = 0; f_index < nf; ++f_index) {
1106 const Numeric lam_f = lam[f_index];
1108 for (Index T_index = 0; T_index < nT; ++T_index) {
1117 ref_index_real(f_index, T_index),
1118 ref_index_imag(f_index, T_index),
1120 }
catch (
const std::runtime_error& e) {
1122 os <<
"Calculation of SingleScatteringData properties failed for\n"
1123 <<
"f_grid[" << f_index <<
"] = " << ssd.
f_grid[f_index] <<
"\n"
1124 <<
"T_grid[" << T_index <<
"] = " << ssd.
T_grid[T_index] <<
"\n"
1126 throw std::runtime_error(os.str());
1130 for (Index za_scat_index = 0; za_scat_index < nza; ++za_scat_index)
1131 for (Index aa_index = 0; aa_index < naa; ++aa_index)
1132 for (Index za_inc_index = 0; za_inc_index < nza; ++za_inc_index) {
1133 if (aspect_ratio < 1.0) {
1165 Range(0, 4)) = phamat(0, joker);
1172 Range(4, 4)) = phamat(1, joker);
1179 Range(8, 4)) = phamat(2, joker);
1186 Range(12, 4)) = phamat(3, joker);
1190 for (Index za_scat_index = 0; za_scat_index < nza; ++za_scat_index) {
1191 Matrix csca_integral;
1192 if (aspect_ratio < 1.0) {
1206 csca_integral /= 180.;
1221 csca_data(f_index, T_index, za_scat_index, 0, joker) =
1222 csca_integral(Range(0, 2), 0);
1226 if (aspect_ratio < 1.0) {
1231 for (Index za_inc_index = 0; za_inc_index < nza; ++za_inc_index) {
1237 ssd.
ext_mat_data(f_index, T_index, za_inc_index, 0, joker);
1239 const Numeric beta = 0.;
1240 const Numeric alpha = 0.;
1254 K[0] = (Complex(0., -1.) * (s11 + s22)).real();
1255 K[1] = (Complex(0., 1.) * (s22 - s11)).real();
1256 K[2] = (s22 - s11).real();
1263 csca_data *= 2. *
PI *
PI / 32400.;
1265 ssd.
ext_mat_data(joker, joker, joker, joker, Range(0, 2));
1271 std::ostringstream os;
1272 os <<
"Only particle types totally_random and azimuthally_random\n"
1273 <<
"are currently supported: " << ssd.
ptype;
1274 throw std::runtime_error(os.str());
1284 out0 <<
"======================================================\n";
1285 out0 <<
"Test for nonspherical particles in a fixed orientation\n";
1286 out0 <<
"Output should match 3rdparty/tmatrix/tmatrix_ampld.ref\n";
1287 out0 <<
"======================================================\n";
1293 Numeric lam = acos(-1.) * 2.;
1297 Numeric ddelt = 0.001;
1305 char errmsg[1024] =
"";
1308 rat, axi, np, lam, eps, mrr, mri, ddelt, quiet, nmax, csca, cext, errmsg);
1310 out0 <<
"nmax: " << nmax <<
"\n";
1311 out0 <<
"csca: " << csca <<
" um2\n";
1312 out0 <<
"cext: " << cext <<
" um2\n";
1314 out0 <<
"Error message: " << (strlen(errmsg) ? errmsg :
"None") <<
"\n";
1317 Numeric alpha = 145.;
1319 Numeric thet0 = 56.;
1321 Numeric phi0 = 114.;
1329 ampl_(nmax, lam, thet0, thet, phi0, phi, alpha, beta, s11, s12, s21, s22);
1331 out0 <<
"AMPLITUDE MATRIX (all in [um]): \n";
1332 out0 <<
"s11: " << s11 <<
"\n";
1333 out0 <<
"s12: " << s12 <<
"\n";
1334 out0 <<
"s21: " << s21 <<
"\n";
1335 out0 <<
"s22: " << s22 <<
"\n";
1341 out0 <<
"PHASE MATRIX (all un [um2]): \n" << z <<
"\n";
1348 out0 <<
"======================================================\n";
1349 out0 <<
"Test for randomly oriented nonspherical particles\n";
1350 out0 <<
"Output should match 3rdparty/tmatrix/tmatrix_tmd.ref\n";
1351 out0 <<
"======================================================\n";
1365 Numeric mri = 0.008;
1366 Numeric ddelt = 0.001;
1369 Numeric r1rat = 0.89031;
1370 Numeric r2rat = 1.56538;
1381 Vector f11(npna, 0.);
1382 Vector f22(npna, 0.);
1383 Vector f33(npna, 0.);
1384 Vector f44(npna, 0.);
1385 Vector f12(npna, 0.);
1386 Vector f34(npna, 0.);
1387 char errmsg[1024] =
"";
1413 f11.unsafe_data_handle(),
1414 f22.unsafe_data_handle(),
1415 f33.unsafe_data_handle(),
1416 f44.unsafe_data_handle(),
1417 f12.unsafe_data_handle(),
1418 f34.unsafe_data_handle(),
1421 out0 <<
"reff: " << reff <<
" um\n";
1422 out0 <<
"veff: " << veff <<
"\n";
1423 out0 <<
"cext: " << cext <<
" um2\n";
1424 out0 <<
"csca: " << csca <<
" um2\n";
1425 out0 <<
"walb: " << walb <<
"\n";
1426 out0 <<
"asymm: " << asymm <<
"\n";
1427 out0 <<
"f11: " << f11 <<
"\n";
1428 out0 <<
"f22: " << f22 <<
"\n";
1429 out0 <<
"f33: " << f33 <<
"\n";
1430 out0 <<
"f44: " << f44 <<
"\n";
1431 out0 <<
"f12: " << f12 <<
"\n";
1432 out0 <<
"f34: " << f34 <<
"\n";
1434 out0 <<
"Error message: " << (strlen(errmsg) ? errmsg :
"None") <<
"\n";
1440 out0 <<
"======================================================\n";
1441 out0 <<
"Test calculation of single scattering data\n";
1442 out0 <<
"for randomly oriented, oblate particles\n";
1443 out0 <<
"======================================================\n";
1448 ssd.
f_grid = {230e9, 240e9};
1455 Matrix mrr(ssd.
f_grid.nelem(), ssd.
T_grid.nelem(), 1.78031135);
1456 Matrix mri(ssd.
f_grid.nelem(), ssd.
T_grid.nelem(), 0.00278706);
1458 mrr(0, 0) = 1.78031135;
1459 mrr(0, 1) = 1.78150475;
1460 mrr(1, 0) = 1.78037238;
1461 mrr(1, 1) = 1.78147686;
1463 mri(0, 0) = 0.00278706;
1464 mri(0, 1) = 0.00507565;
1465 mri(1, 0) = 0.00287245;
1466 mri(1, 1) = 0.00523012;
1470 out0 <<
"ssd.pha_mat_data(0, 0, joker, 0, 0, joker, joker):\n"
1471 << ssd.
pha_mat_data(0, 0, joker, 0, 0, joker, joker) <<
"\n\n";
1473 out0 <<
"ssd.ext_mat_data:\n" << ssd.
ext_mat_data <<
"\n\n";
1474 out0 <<
"ssd.abs_vec_data:\n" << ssd.
abs_vec_data <<
"\n\n";
1476 out0 <<
"======================================================\n";
1477 out0 <<
"Test calculation of single scattering data\n";
1478 out0 <<
"for randomly oriented, prolate particles\n";
1479 out0 <<
"======================================================\n";
1483 out0 <<
"ssd.pha_mat_data(0, 0, joker, 0, 0, joker, joker):\n"
1484 << ssd.
pha_mat_data(0, 0, joker, 0, 0, joker, joker) <<
"\n\n";
1486 out0 <<
"ssd.ext_mat_data:\n" << ssd.
ext_mat_data <<
"\n\n";
1487 out0 <<
"ssd.abs_vec_data:\n" << ssd.
abs_vec_data <<
"\n\n";
1493 out0 <<
"======================================================\n";
1494 out0 <<
"Test calculation of single scattering data\n";
1495 out0 <<
"for oblate particles with fixed orientation\n";
1496 out0 <<
"======================================================\n";
1501 ssd.
f_grid = {230e9, 240e9};
1508 Matrix mrr(ssd.
f_grid.nelem(), ssd.
T_grid.nelem(), 1.78031135);
1509 Matrix mri(ssd.
f_grid.nelem(), ssd.
T_grid.nelem(), 0.00278706);
1511 mrr(0, 0) = 1.78031135;
1512 mrr(0, 1) = 1.78150475;
1513 mrr(1, 0) = 1.78037238;
1514 mrr(1, 1) = 1.78147686;
1516 mri(0, 0) = 0.00278706;
1517 mri(0, 1) = 0.00507565;
1518 mri(1, 0) = 0.00287245;
1519 mri(1, 1) = 0.00523012;
1523 out0 <<
"ssd.pha_mat_data(0, 0, joker, 0, 0, joker, joker):\n"
1524 << ssd.
pha_mat_data(0, 0, joker, 0, 0, joker, joker) <<
"\n\n";
1526 out0 <<
"ssd.ext_mat_data(0, 0, joker, joker, joker):\n"
1527 << ssd.
ext_mat_data(0, 0, joker, joker, joker) <<
"\n\n";
1529 out0 <<
"abs_vec_data:\n" << ssd.
abs_vec_data <<
"\n\n";
1531 out0 <<
"======================================================\n";
1532 out0 <<
"Test calculation of single scattering data\n";
1533 out0 <<
"for prolate particles with fixed orientation\n";
1534 out0 <<
"======================================================\n";
1537 out0 <<
"ssd.pha_mat_data(0, 0, joker, 0, 0, joker, joker):\n"
1538 << ssd.
pha_mat_data(0, 0, joker, 0, 0, joker, joker) <<
"\n\n";
1540 out0 <<
"ssd.ext_mat_data(0, 0, joker, joker, joker):\n"
1541 << ssd.
ext_mat_data(0, 0, joker, joker, joker) <<
"\n\n";
1543 out0 <<
"abs_vec_data:\n" << ssd.
abs_vec_data <<
"\n\n";
Constants of physical expressions as constexpr.
constexpr Numeric SPEED_OF_LIGHT
void nlinspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlinspace
Declarations having to do with the four output streams.
constexpr Numeric pi
The following mathematical constants are generated in python Decimal package by the code:
constexpr Numeric speed_of_light
Speed of light [m/s] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 201...
Scattering database structure and functions.
void calc_ssp_fixed_test(const Verbosity &verbosity)
Single scattering properties calculation for particles with fixed orientation.
void calcSingleScatteringDataProperties(SingleScatteringData &ssd, ConstMatrixView ref_index_real, ConstMatrixView ref_index_imag, const Numeric equiv_radius, const Index np, const Numeric aspect_ratio, const Numeric precision, const Index ndgs, const Index robust, const Index quiet)
Calculate SingleScatteringData properties.
void integrate_phamat_alpha6(Matrix &phamat, const Index &nmax, const Numeric &lam, const Numeric &thet0, const Numeric &thet, const Numeric &phi0, const Numeric &phi, const Numeric &beta, const Numeric &alpha_1, const Numeric &alpha_2)
Integrate phase matrix over particle orientation angle.
void tmatrix_fixed_orientation(Numeric &cext, Numeric &csca, Index &nmax, const Numeric equiv_radius, const Numeric aspect_ratio, const Index np, const Numeric lam, const Numeric ref_index_real, const Numeric ref_index_imag, const Numeric precision, const Index quiet=1)
Calculate properties for particles in a fixed orientation.
void calc_phamat(Matrix &z, const Index &nmax, const Numeric &lam, const Numeric &thet0, const Numeric &thet, const Numeric &phi0, const Numeric &phi, const Numeric &beta, const Numeric &alpha)
void tmatrix_random_orientation(Numeric &cext, Numeric &csca, Vector &f11, Vector &f22, Vector &f33, Vector &f44, Vector &f12, Vector &f34, const Numeric equiv_radius, const Numeric aspect_ratio, const Index np, const Numeric lam, const Numeric ref_index_real, const Numeric ref_index_imag, const Numeric precision, const Index nza, const Index ndgs, const Index quiet=1)
Calculate properties for randomly oriented particles.
void tmatrix_tmd_test(const Verbosity &verbosity)
T-Matrix validation test.
void tmatrix_(const Numeric &rat, const Numeric &axi, const Index &np, const Numeric &lam, const Numeric &eps, const Numeric &mrr, const Numeric &mri, const Numeric &ddelt, const Index &quiet, Index &nmax, Numeric &csca, Numeric &cext, char *errmsg)
T-matrix code for nonspherical particles in a fixed orientation.
void calc_ssp_random_test(const Verbosity &verbosity)
Single scattering properties calculation for randomly oriented particles.
void avgtmatrix_(const Index &nmax)
Perform orientation averaging.
void tmatrix_ampld_test(const Verbosity &verbosity)
T-Matrix validation test.
void ampl_(const Index &nmax, const Numeric &lam, const Numeric &thet0, const Numeric &thet, const Numeric &phi0, const Numeric &phi, const Numeric &alpha, const Numeric &beta, Complex &s11, Complex &s12, Complex &s21, Complex &s22)
T-matrix code for nonspherical particles in a fixed orientation.
void tmd_(const Numeric &rat, const Index &ndistr, const Numeric &axmax, const Index &npnax, const Numeric &b, const Numeric &gam, const Index &nkmax, const Numeric &eps, const Index &np, const Numeric &lam, const Numeric &mrr, const Numeric &mri, const Numeric &ddelt, const Index &npna, const Index &ndgs, const Numeric &r1rat, const Numeric &r2rat, const Index &quiet, Numeric &reff, Numeric &veff, Numeric &cext, Numeric &csca, Numeric &walb, Numeric &asymm, Numeric *f11, Numeric *f22, Numeric *f33, Numeric *f44, Numeric *f12, Numeric *f34, char *errmsg)
T-matrix code for randomly oriented nonspherical particles.
void integrate_phamat_alpha10(Matrix &phamat, const Index &nmax, const Numeric &lam, const Numeric &thet0, const Numeric &thet, const Numeric &phi0, const Numeric &phi, const Numeric &beta, const Numeric &alpha_1, const Numeric &alpha_2)
Integrate phase matrix over particle orientation angle.
void ampmat_to_phamat(Matrix &z, const Complex &s11, const Complex &s12, const Complex &s21, const Complex &s22)
Calculate phase matrix from amplitude matrix.
void integrate_phamat_theta0_phi10(Matrix &phamat, const Index &nmax, const Numeric &lam, const Numeric &thet0_1, const Numeric &thet0_2, const Numeric &thet, const Numeric &phi0, const Numeric &phi_1, const Numeric &phi_2, const Numeric &beta, const Numeric &alpha)
Integrate phase matrix over angles thet0 and phi.
void integrate_phamat_theta0_phi_alpha6(Matrix &phamat, const Index &nmax, const Numeric &lam, const Numeric &thet0_1, const Numeric &thet0_2, const Numeric &thet, const Numeric &phi0, const Numeric &phi_1, const Numeric &phi_2, const Numeric &beta, const Numeric &alpha_1, const Numeric &alpha_2)
Integrate phase matrix over angles thet0, phi and alpha.
Declarations for the T-Matrix interface.