ARTS 2.5.4 (git: 4c0d3b4d)
test_propagationmatrix.cc
Go to the documentation of this file.
1/* Copyright (C) 2015 Richard Larsson <ric.larsson@gmail.com>
2 *
3 * This program is free software; you can redistribute it and/or modify it
4 * under the terms of the GNU General Public License as published by the
5 * Free Software Foundation; either version 2, or (at your option) any
6 * later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 * USA. */
17
26#include "absorption.h"
27#include "arts.h"
28#include "global_data.h"
29#include "hitran_species.h"
30#include "legacy_continua.h"
31#include "linescaling.h"
32#include "lineshapemodel.h"
34#include "transmissionmatrix.h"
35#include "wigner_functions.h"
36#include "zeeman.h"
37#include "zeemandata.h"
38#include <Faddeeva/Faddeeva.hh>
39#include <random>
40
41#include "linemixing_hitran.h"
42#include <auto_md.h>
43
45 const Numeric k11 = 1;
46 const Numeric k12 = -0.51;
47 const Numeric k13 = -0.21;
48 const Numeric k14 = 0.31;
49 const Numeric k23 = -0.1;
50 const Numeric k24 = -0.99;
51 const Numeric k34 = 2;
52
53 const Numeric r = 0.5;
54
55 const Numeric a = -k11 * r;
56 const Numeric b = -k12 * r;
57 const Numeric c = -k13 * r;
58 const Numeric d = -k14 * r;
59 const Numeric u = -k23 * r;
60 const Numeric v = -k24 * r;
61 const Numeric w = -k34 * r;
62
63 const Numeric b2 = b * b, c2 = c * c, d2 = d * d, u2 = u * u, v2 = v * v,
64 w2 = w * w;
65
66 const Numeric Const2 = b2 + c2 + d2 - u2 - v2 - w2;
67
68 Numeric Const1;
69 Const1 = b2 * (b2 * 0.5 + c2 + d2 - u2 - v2 + w2);
70 Const1 += c2 * (c2 * 0.5 + d2 - u2 + v2 - w2);
71 Const1 += d2 * (d2 * 0.5 + u2 - v2 - w2);
72 Const1 += u2 * (u2 * 0.5 + v2 + w2);
73 Const1 += v2 * (v2 * 0.5 + w2);
74 Const1 *= 2;
75 Const1 += 8 * (b * d * u * w - b * c * v * w - c * d * u * v);
76 Const1 += w2 * w2;
77
78 if (Const1 > 0.0)
79 Const1 = sqrt(Const1);
80 else
81 Const1 = 0.0;
82
83 const Complex sqrt_BpA = sqrt(Complex(Const2 + Const1, 0.0));
84 const Complex sqrt_BmA = sqrt(Complex(Const2 - Const1, 0.0));
85 const Numeric x = sqrt_BpA.real() * sqrt(0.5);
86 const Numeric y = sqrt_BmA.imag() * sqrt(0.5);
87 const Numeric x2 = x * x;
88 const Numeric y2 = y * y;
89 const Numeric cos_y = cos(y);
90 const Numeric sin_y = sin(y);
91 const Numeric cosh_x = cosh(x);
92 const Numeric sinh_x = sinh(x);
93 const Numeric x2y2 = x2 + y2;
94 const Numeric inv_x2y2 = 1.0 / x2y2;
95
96 std::cout << x << " " << y << " " << Const1 << " " << Const2 << "\n";
97
98 Numeric C0, C1, C2, C3;
99 Numeric inv_y = 0.0, inv_x = 0.0; // Init'd to remove warnings
100
101 // X and Y cannot both be zero
102 if (x == 0.0) {
103 inv_y = 1.0 / y;
104 C0 = 1.0;
105 C1 = 1.0;
106 C2 = (1.0 - cos_y) * inv_x2y2;
107 C3 = (1.0 - sin_y * inv_y) * inv_x2y2;
108 } else if (y == 0.0) {
109 inv_x = 1.0 / x;
110 C0 = 1.0;
111 C1 = 1.0;
112 C2 = (cosh_x - 1.0) * inv_x2y2;
113 C3 = (sinh_x * inv_x - 1.0) * inv_x2y2;
114 } else {
115 inv_x = 1.0 / x;
116 inv_y = 1.0 / y;
117
118 C0 = (cos_y * x2 + cosh_x * y2) * inv_x2y2;
119 C1 = (sin_y * x2 * inv_y + sinh_x * y2 * inv_x) * inv_x2y2;
120 C2 = (cosh_x - cos_y) * inv_x2y2;
121 C3 = (sinh_x * inv_x - sin_y * inv_y) * inv_x2y2;
122 }
123
124 std::cout << C0 << " " << C1 << " " << C2 << " " << C3 << "\n";
125
126 Matrix F(4, 4, 0), A(4, 4, 0);
127
128 MatrixViewMap eigF = MapToEigen(F);
129 Eigen::Matrix4d eigA;
130 eigA << 0, b, c, d, b, 0, u, v, c, -u, 0, w, d, -v, -w, 0;
131
132 eigF = C1 * eigA + C2 * eigA * eigA + C3 * eigA * eigA * eigA;
133 eigF(0, 0) += C0;
134 eigF(1, 1) += C0;
135 eigF(2, 2) += C0;
136 eigF(3, 3) += C0;
137 eigF *= exp(a);
138
139 std::cout << F << "\n";
140}
141
143 // Initializes as unity matrices
144 TransmissionMatrix a(2, 4);
145 std::cout << "Initialized TransmissionMatrix(2, 4):\n" << a << "\n";
146
147 // Set a single input
148 Eigen::Matrix4d A;
149 A << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16;
150 std::cout << "New Matrix:\n" << A << "\n\n";
151 a.Mat4(0) = A;
152 std::cout << "Updated TransmissionMatrix Position 1 wit New Matrix:\n"
153 << a << "\n";
154
155 // The stream can also set the values
156 String S =
157 "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 125 26 27 28 29 30 31 32";
158 std::cout << "Stream:\n" << S << "\n\n";
159 std::istringstream astream(S);
160 astream >> a;
161 std::cout << "Streamed into TransmissionMatrix:\n" << a << "\n";
162
163 // Initialize empty
164 RadiationVector b(3, 3);
165 std::cout << "Initialized RadiationVector(3, 3)\n" << b << "\n";
166
167 // Set is not defined but add is
168 Eigen::Vector3d B;
169 B << 1, 2, 3;
170 std::cout << "New Vector:\n" << B << "\n\n"; // nb. not transposed
171 b.Vec3(1).noalias() += B;
172 std::cout << "Updated RadiationVector Position 1 with New Vector:\n"
173 << b << "\n";
174
175 // The stream can also set the values
176 String T = "1 2 3 4 5 6 7 8 90";
177 std::cout << "Stream:\n" << T << "\n\n";
178 std::istringstream bstream(T);
179 bstream >> b;
180 std::cout << "Streamed into RadiationVector:\n" << b << "\n";
181}
182
184 auto f = [](Numeric x) { return 0.1 * x; };
185 auto df = [](Numeric x) { return 0.1 + 0 * x; };
186
187 Index nstokes = 4;
188 const Numeric x1 = 30;
189 const Numeric x2 = -0.1;
190 const Numeric r_normal = 1000;
191 const Numeric r_extra1 = r_normal + f(x1);
192 const Numeric r_extra2 = r_normal + f(x2);
193
194 PropagationMatrix a(1, nstokes);
195 a.Kjj() = 10 + Numeric(rand() % 1000) / 100;
196 if (nstokes > 1) {
197 a.K12() = 2 + Numeric(rand() % 1000) / 100;
198 if (nstokes > 2) {
199 a.K13() = 3 + Numeric(rand() % 1000) / 100;
200 a.K23() = -1 + Numeric(rand() % 1000) / 100;
201 if (nstokes > 3) {
202 a.K14() = 5 + Numeric(rand() % 1000) / 100;
203 a.K24() = -3 + Numeric(rand() % 1000) / 100;
204 a.K34() = -2 + Numeric(rand() % 1000) / 100;
205 }
206 }
207 }
208 a.Data() *= 1e-5;
209
210 PropagationMatrix b(1, nstokes);
211 b.Kjj() = 5 + Numeric(rand() % 1000) / 100;
212 if (nstokes > 1) {
213 b.K12() = -1 + Numeric(rand() % 1000) / 100;
214 if (nstokes > 2) {
215 b.K13() = -3 + Numeric(rand() % 1000) / 100;
216 b.K23() = 4 + Numeric(rand() % 1000) / 100;
217 if (nstokes > 3) {
218 b.K14() = 2 + Numeric(rand() % 1000) / 100;
219 b.K24() = -1 + Numeric(rand() % 1000) / 100;
220 b.K34() = 3 + Numeric(rand() % 1000) / 100;
221 }
222 }
223 }
224 b.Data() *= 5e-6;
225
227 da[0].Data() = 0;
228 Tensor3 T_normal(1, nstokes, nstokes), T_extra(1, nstokes, nstokes);
229 Tensor4 dT1(1, 1, nstokes, nstokes), dT2(1, 1, nstokes, nstokes);
230
232 T_normal, dT1, dT2, r_normal, a, b, da, da, df(x1), df(x2), 0);
233
234 std::cout << "Transmission at r=" << r_normal << ":\n"
235 << MapToEigen(T_normal(0, joker, joker)) << "\n"
236 << "\n";
237 std::cout << "First derivative:\n"
238 << MapToEigen(dT1(0, 0, joker, joker)) << "\n"
239 << "\n";
240 std::cout << "Second derivative:\n"
241 << MapToEigen(dT2(0, 0, joker, joker)) << "\n"
242 << "\n";
243
244 compute_transmission_matrix(T_extra, r_extra1, a, b);
245
246 std::cout << "Transmission at perturbed r1=" << r_extra1 << ":\n"
247 << MapToEigen(T_extra(0, joker, joker)) << "\n"
248 << "\n";
249 T_extra -= T_normal;
250 T_extra /= x1;
251 std::cout << "First derivative perturbed:\n"
252 << MapToEigen(T_extra(0, joker, joker)) << "\n"
253 << "\n";
254 T_extra /= dT1(0, joker, joker, joker);
255 std::cout << "First derivative perturbed relative:\n"
256 << MapToEigen(T_extra(0, joker, joker)) << "\n"
257 << "\n";
258
259 compute_transmission_matrix(T_extra, r_extra2, a, b);
260
261 std::cout << "Transmission at perturbed r2=" << r_extra2 << ":\n"
262 << MapToEigen(T_extra(0, joker, joker)) << "\n"
263 << "\n";
264 T_extra -= T_normal;
265 T_extra /= x2;
266 std::cout << "Second derivative perturbed:\n"
267 << MapToEigen(T_extra(0, joker, joker)) << "\n"
268 << "\n";
269 T_extra /= dT2(0, joker, joker, joker);
270 std::cout << "Second derivative perturbed relative:\n"
271 << MapToEigen(T_extra(0, joker, joker)) << "\n"
272 << "\n";
273}
274
276 const Numeric a = 2;
277 const Numeric b = 3;
278 const Numeric c = 4;
279 const Numeric d = 1;
280 const Numeric u = 5;
281 const Numeric v = 1;
282 const Numeric w = 5;
283
288 test1.Kjj() = a;
289 test2.Kjj() = a;
290 test3.Kjj() = a;
291 test4.Kjj() = a;
292 test2.K12() = b;
293 test3.K12() = b;
294 test4.K12() = b;
295 test3.K13() = c;
296 test4.K13() = c;
297 test3.K23() = u;
298 test4.K23() = u;
299 test4.K14() = d;
300 test4.K24() = v;
301 test4.K34() = w;
302
303 std::cout << test1 << "\n\n"
304 << test2 << "\n\n"
305 << test3 << "\n\n"
306 << test4 << "\n\n";
307
308 TransmissionMatrix ans1(1, 1);
309 TransmissionMatrix ans2(1, 2);
310 TransmissionMatrix ans3(1, 3);
311 TransmissionMatrix ans4(1, 4);
312
314
316 empty,
317 empty,
318 test1,
319 test1,
322 1,
323 0,
324 0,
325 -1);
326
328 empty,
329 empty,
330 test2,
331 test2,
334 1,
335 0,
336 0,
337 -1);
338
340 empty,
341 empty,
342 test3,
343 test3,
346 1,
347 0,
348 0,
349 -1);
350
352 empty,
353 empty,
354 test4,
355 test4,
358 1,
359 0,
360 0,
361 -1);
362
363 std::cout << ans1 << "\n\n"
364 << ans2 << "\n\n"
365 << ans3 << "\n\n"
366 << ans4 << "\n\n";
367}
368
370 int i = 1;
372 for (auto& pm : propmats) {
373 pm.K12() = i;
374 i++;
375 pm.K13() = i;
376 i++;
377 pm.K23() = i;
378 i++;
379 pm.K14() = i;
380 i++;
381 pm.K24() = i;
382 i++;
383 pm.K34() = i;
384 i++;
385 pm.Kjj() = 2 * i;
386 i++;
387 pm.Data() *= 1e-2;
388 }
389
390 std::cout << "Propmats:\n" << propmats << "\n\n";
391
394 for (i = 0; i < 4; i++) {
395 stepwise_transmission(layers[i + 1],
396 empty,
397 empty,
398 propmats[i],
399 propmats[i + 1],
402 1,
403 0,
404 0,
405 -1);
406 }
407
408 std::cout << "Layers:\n" << layers << "\n\n";
409
410 ArrayOfTransmissionMatrix cumulative_forward =
412 ArrayOfTransmissionMatrix cumulative_reflect =
414
415 std::cout << "Forward accumulation:\n" << cumulative_forward << "\n\n";
416 std::cout << "Reflect accumulation:\n" << cumulative_reflect << "\n\n";
417}
418
420 Numeric start = 1.0;
421 Numeric end = 1e-7;
422 int n = 10000;
423
424 Vector x(n), sx(n), shx(n), cx(n), chx(n);
425 nlogspace(x, start, end, n);
426
427 for (int i = 0; i < n; i++) {
428 sx[i] = std::sin(x[i]);
429 cx[i] = std::cos(x[i]);
430 shx[i] = std::sinh(x[i]);
431 chx[i] = std::cosh(x[i]);
432 }
433
434 std::cout
435 << std::scientific << std::setprecision(15)
436 << "x\tabs(sx/x-1)\tabs(shx/x-1)\tabs((chx-cx)/2x^2-1/2)\tabs((shx/x-sx/x)/2x^2-1/6)\n";
437
438 for (int i = 0; i < n; i++)
439 std::cout << x[i] << '\t' << std::abs(sx[i] / x[i] - 1.0) << '\t'
440 << std::abs(shx[i] / x[i] - 1.0) << '\t'
441 << std::abs((chx[i] - cx[i]) / (2 * x[i] * x[i]) - 0.5) << '\t'
442 << std::abs((shx[i] / x[i] - sx[i] / x[i]) / (2 * x[i] * x[i]) -
443 1.0 / 6.0)
444 << '\n';
445}
446
447
449{
450 // Test constants
451 constexpr Index nf = 501;
452 constexpr Numeric fstart = 25e9;
453 constexpr Numeric fend = 165e9;
454 constexpr Numeric t = 200;
455 constexpr Numeric p = 1e4;
456 Vector f(nf);
457 nlinspace(f, fstart, fend, nf);
458 PropagationMatrix xsec(nf, 1);
460
463 jacs[1].Target(Jacobian::Target(Jacobian::Atm::WindU));
465 vmrs_predef.O2 = 1;
467 xsec,
468 dxsec,
470 f,
471 p,
472 t,
473 vmrs_predef,
474 jacs);
475
476 constexpr auto df = 1000;
477 constexpr auto dt = 0.1;
478 Matrix pxsec(nf, 1, 0);
479 Matrix pxsec_dt(nf, 1, 0);
480 Matrix pxsec_df(nf, 1, 0);
481 Vector f_pert = f;
482 f_pert += df;
483 PWR93O2AbsModel(pxsec, 0, 1, 1, 1, "user", "PWR98", f, {p}, {t}, {0.5}, {1}, Verbosity());
484 PWR93O2AbsModel(pxsec_dt, 0, 1, 1, 1, "user", "PWR98", f, {p}, {t+dt}, {0.5}, {1}, Verbosity());
485 PWR93O2AbsModel(pxsec_df, 0, 1, 1, 1, "user", "PWR98", f_pert, {p}, {t}, {0.5}, {1}, Verbosity());
486
487 std::cout<< "xr = np.array([";
488 for (Index i=0; i<nf; i++)
489 std::cout<<'['<<xsec(i, 0)<<','<<' '<<pxsec(i, 0) << ']' << ',' << ' ';
490 std::cout << ']' << ')' << '\n';
491
492 std::cout<< "dxr_dt = np.array([";
493 for (Index i=0; i<nf; i++)
494 std::cout<<'['<<dxsec[0](i, 0)<<','<<' '<<(pxsec_dt(i, 0)-pxsec(i, 0))/dt << ']' << ',' << ' ';
495 std::cout << ']' << ')' << '\n';
496
497 std::cout<< "dxr_df = np.array([";
498 for (Index i=0; i<nf; i++)
499 std::cout<<'['<<dxsec[1](i, 0)<<','<<' '<<(pxsec_df(i, 0)-pxsec(i, 0))/df << ']' << ',' << ' ';
500 std::cout << ']' << ')' << '\n';
501}
502
503void test_hitran2017(bool newtest = true)
504{
505 const Numeric p = 1.0;
506 const Numeric t = 296;
507 const Numeric xco2 = 1.5e-2;
508 const Numeric xh2o = 0;
509 const Numeric sigmin = 600;
510 const Numeric sigmax = 900;
511 const Numeric dsig = 0.005;
512 const Numeric stotmax = 0.1e-21;
513
514 const Index nsig = Index(((sigmax - sigmin) / dsig) + 0.5) + 1;
515 Vector invcm_grid(nsig);
516 Vector f_grid(nsig);
517 Numeric sigc = sigmin-dsig;
518 for (Index isig=0; isig<nsig; isig++) {
519 sigc += dsig;
520 invcm_grid[isig] = sigc;
521 f_grid[isig] = Conversion::kaycm2freq(sigc);
522 }
523
524 constexpr Index n=6;
525 auto types =
526 std::array<std::pair<lm_hitran_2017::ModeOfLineMixing, lm_hitran_2017::calctype>, 6>{
527 std::pair<lm_hitran_2017::ModeOfLineMixing, lm_hitran_2017::calctype>{lm_hitran_2017::ModeOfLineMixing::FullW, lm_hitran_2017::calctype::FullW},
528 {lm_hitran_2017::ModeOfLineMixing::VP_W, lm_hitran_2017::calctype::FullW},
529 {lm_hitran_2017::ModeOfLineMixing::VP, lm_hitran_2017::calctype::NoneVP},
530 {lm_hitran_2017::ModeOfLineMixing::VP_Y, lm_hitran_2017::calctype::NoneRosenkranz},
531 {lm_hitran_2017::ModeOfLineMixing::SDVP, lm_hitran_2017::calctype::SDVP},
532 {lm_hitran_2017::ModeOfLineMixing::SDVP_Y, lm_hitran_2017::calctype::SDRosenkranz}};
533
534 ArrayOfVector absorption(n);
535 make_wigner_ready(int(250), int(20000000), 6);
536
539 for (Index i=0;i<n; i++) {
540 auto type=types[i];
541
543 Vector vmrs = {1-xco2/100-xh2o/100, xh2o/100, xco2/100};
544
545 if (not newtest)
546 absorption[i] = lm_hitran_2017::compute(p, t, xco2, xh2o, invcm_grid, stotmax, type.second);
547 else
548 absorption[i] = lm_hitran_2017::compute(hitran, bands, Hitran::isotopologue_ratios(), Conversion::atm2pa(p), t, vmrs, f_grid);
549 }
550
551 for (Index i=0; i<nsig; i++) {
552 for (Index j=0; j<n; j++) {
553 std::cout<<absorption[j][i]<<' ';
554 }
555 std::cout<<'\n';
556 }
557}
558
559
560int main(int n, char **argc) {
561 /*test_speed_of_pressurebroadening();
562 test_transmissionmatrix();
563 test_r_deriv_propagationmatrix();
564 test_transmat_from_propmat();
565 test_transmat_to_cumulativetransmat();
566 test_sinc_likes_0limit();*/
567
568 if (n == 2 and String(argc[1]) == "new") {
569 std::cout<<"new test\n";
570 test_hitran2017(true);
571 }
572 else {
573 std::cout<<"old test\n";
574 test_hitran2017(false);
575 }
576 return 0;
577}
Declarations required for the calculation of absorption coefficients.
The global header file for ARTS.
This can be used to make arrays out of anything.
Definition: array.h:108
The Matrix class.
Definition: matpackI.h:1270
The Tensor3 class.
Definition: matpackIII.h:344
The Tensor4 class.
Definition: matpackIV.h:427
The Vector class.
Definition: matpackI.h:908
#define abs(x)
void PWR93O2AbsModel(MatrixView pxsec, const Numeric CCin, const Numeric CLin, const Numeric CWin, const Numeric COin, const String &model, const String &version, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView vmrh2o, ConstVectorView vmr, const Verbosity &verbosity)
Oxygen complex at 60 GHz plus mm O2 lines plus O2 continuum.
MatrixViewMap MapToEigen(Tensor3View &A, const Index &i)
Definition: lin_alg.cc:745
Namespace and functions to deal with HITRAN linemixing.
Constains various line scaling functions.
Contains the line shape namespace.
void nlinspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlinspace
Definition: math_funcs.cc:225
void nlogspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlogspace
Definition: math_funcs.cc:261
Eigen::Map< MatrixType, 0, StrideType > MatrixViewMap
Definition: matpackI.h:116
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
const Joker joker
std::complex< Numeric > Complex
#define b2
my_basic_string< char > String
The String type for ARTS.
Definition: mystring.h:287
void compute(PropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const SpeciesIsotopeRecord &model, const Vector &f_grid, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const VMRS &vmr, const ArrayOfRetrievalQuantity &jacobian_quantities)
Compute the predefined model.
constexpr auto atm2pa(T x) noexcept -> decltype(x *101 '325.0)
Conversion from Atm to Pa.
Definition: constants.h:446
constexpr auto kaycm_per_cmsquared2hz_per_msquared(T x) noexcept -> decltype(x *kaycm2freq(1e-4))
Conversion from cm-1 per molecule per cm^2 to Hz per molecule per m^2.
Definition: constants.h:501
constexpr auto kaycm2freq(T x) noexcept -> decltype(x *(100 *c))
Conversion from Kayser wavenumber to Hz.
Definition: constants.h:385
SpeciesIsotopologueRatios isotopologue_ratios()
Temperature
Definition: jacobian.h:58
Vector vmrs(const ConstVectorView &atmospheric_vmrs, const ArrayOfArrayOfSpeciesTag &atmospheric_species, const ArrayOfSpecies &lineshape_species) ARTS_NOEXCEPT
Returns a VMR vector for this model's main calculations.
constexpr std::array Isotopologues
A list of all ARTS isotopologues, note how the species enum class input HAS to be sorted.
Definition: isotopologues.h:57
constexpr Index find_species_index(const Species spec, const std::string_view isot) noexcept
constexpr Rational start(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the lowest M for a polarization type of this transition.
Definition: zeemandata.h:80
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
Definition: zeemandata.h:113
void read(HitranRelaxationMatrixData &hitran, ArrayOfAbsorptionLines &bands, const SpeciesIsotopologueRatios &isotopologue_ratio, const String &basedir, const Numeric linemixinglimit, const Numeric fmin, const Numeric fmax, const Numeric stot, const ModeOfLineMixing mode)
Read from HITRAN online line mixing file.
Vector compute(const Numeric p, const Numeric t, const Numeric xco2, const Numeric xh2o, const ConstVectorView &invcm_grid, const Numeric stotmax, const calctype type)
void compute_transmission_matrix_and_derivative(Tensor3View T, Tensor4View dT_dx_upper_level, Tensor4View dT_dx_lower_level, const Numeric &r, const PropagationMatrix &upper_level, const PropagationMatrix &lower_level, const ArrayOfPropagationMatrix &dupper_level_dx, const ArrayOfPropagationMatrix &dlower_level_dx, const Numeric &dr_dTu, const Numeric &dr_dTl, const Index it, const Index iz, const Index ia)
void compute_transmission_matrix(Tensor3View T, const Numeric &r, const PropagationMatrix &upper_level, const PropagationMatrix &lower_level, const Index iz, const Index ia)
Compute the matrix exponent as the transmission matrix of this propagation matrix.
#define u
#define d
#define v
#define w
#define a
Array< PropagationMatrix > ArrayOfPropagationMatrix
#define c
#define b
Numeric sqrt(const Rational r)
Square root.
Definition: rational.h:739
Contains known required VMR values.
Holds all information required for individual partial derivatives.
Definition: jacobian.h:107
Radiation Vector for Stokes dimension 1-4.
Class to keep track of Transmission Matrices for Stokes Dim 1-4.
void test2()
void test4()
int test1()
Definition: test_matpack.cc:48
void test_transmat_to_cumulativetransmat()
void test_r_deriv_propagationmatrix()
void test_sinc_likes_0limit()
int main(int n, char **argc)
void test_hitran2017(bool newtest=true)
void test_transmissionmatrix()
void test_matrix_buildup()
void test_mpm20()
void test_transmat_from_propmat()
void test3()
Definition: test_sparse.cc:43
ArrayOfTransmissionMatrix cumulative_transmission(const ArrayOfTransmissionMatrix &T, const CumulativeTransmission type)
Accumulate the transmission matrix over all layers.
void stepwise_transmission(TransmissionMatrix &T, ArrayOfTransmissionMatrix &dT1, ArrayOfTransmissionMatrix &dT2, const PropagationMatrix &K1, const PropagationMatrix &K2, const ArrayOfPropagationMatrix &dK1, const ArrayOfPropagationMatrix &dK2, const Numeric &r, const Numeric &dr_dtemp1, const Numeric &dr_dtemp2, const Index temp_deriv_pos)
Set the stepwise transmission matrix.
Stuff related to the transmission matrix.
Index make_wigner_ready(int largest, int fastest, int size)
Ready Wigner.
Wigner symbol interactions.
Headers and class definition of Zeeman modeling.