ARTS 2.5.4 (git: 31ce4f0e)
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"
33#include "matpack_eigen.h"
35#include "transmissionmatrix.h"
36#include "wigner_functions.h"
37#include "zeeman.h"
38#include "zeemandata.h"
39#include <Faddeeva/Faddeeva.hh>
40#include <random>
41
42#include "linemixing_hitran.h"
43#include <auto_md.h>
44
46 const Numeric k11 = 1;
47 const Numeric k12 = -0.51;
48 const Numeric k13 = -0.21;
49 const Numeric k14 = 0.31;
50 const Numeric k23 = -0.1;
51 const Numeric k24 = -0.99;
52 const Numeric k34 = 2;
53
54 const Numeric r = 0.5;
55
56 const Numeric a = -k11 * r;
57 const Numeric b = -k12 * r;
58 const Numeric c = -k13 * r;
59 const Numeric d = -k14 * r;
60 const Numeric u = -k23 * r;
61 const Numeric v = -k24 * r;
62 const Numeric w = -k34 * r;
63
64 const Numeric b2 = b * b, c2 = c * c, d2 = d * d, u2 = u * u, v2 = v * v,
65 w2 = w * w;
66
67 const Numeric Const2 = b2 + c2 + d2 - u2 - v2 - w2;
68
69 Numeric Const1;
70 Const1 = b2 * (b2 * 0.5 + c2 + d2 - u2 - v2 + w2);
71 Const1 += c2 * (c2 * 0.5 + d2 - u2 + v2 - w2);
72 Const1 += d2 * (d2 * 0.5 + u2 - v2 - w2);
73 Const1 += u2 * (u2 * 0.5 + v2 + w2);
74 Const1 += v2 * (v2 * 0.5 + w2);
75 Const1 *= 2;
76 Const1 += 8 * (b * d * u * w - b * c * v * w - c * d * u * v);
77 Const1 += w2 * w2;
78
79 if (Const1 > 0.0)
80 Const1 = sqrt(Const1);
81 else
82 Const1 = 0.0;
83
84 const Complex sqrt_BpA = sqrt(Complex(Const2 + Const1, 0.0));
85 const Complex sqrt_BmA = sqrt(Complex(Const2 - Const1, 0.0));
86 const Numeric x = sqrt_BpA.real() * sqrt(0.5);
87 const Numeric y = sqrt_BmA.imag() * sqrt(0.5);
88 const Numeric x2 = x * x;
89 const Numeric y2 = y * y;
90 const Numeric cos_y = cos(y);
91 const Numeric sin_y = sin(y);
92 const Numeric cosh_x = cosh(x);
93 const Numeric sinh_x = sinh(x);
94 const Numeric x2y2 = x2 + y2;
95 const Numeric inv_x2y2 = 1.0 / x2y2;
96
97 std::cout << x << " " << y << " " << Const1 << " " << Const2 << "\n";
98
99 Numeric C0, C1, C2, C3;
100 Numeric inv_y = 0.0, inv_x = 0.0; // Init'd to remove warnings
101
102 // X and Y cannot both be zero
103 if (x == 0.0) {
104 inv_y = 1.0 / y;
105 C0 = 1.0;
106 C1 = 1.0;
107 C2 = (1.0 - cos_y) * inv_x2y2;
108 C3 = (1.0 - sin_y * inv_y) * inv_x2y2;
109 } else if (y == 0.0) {
110 inv_x = 1.0 / x;
111 C0 = 1.0;
112 C1 = 1.0;
113 C2 = (cosh_x - 1.0) * inv_x2y2;
114 C3 = (sinh_x * inv_x - 1.0) * inv_x2y2;
115 } else {
116 inv_x = 1.0 / x;
117 inv_y = 1.0 / y;
118
119 C0 = (cos_y * x2 + cosh_x * y2) * inv_x2y2;
120 C1 = (sin_y * x2 * inv_y + sinh_x * y2 * inv_x) * inv_x2y2;
121 C2 = (cosh_x - cos_y) * inv_x2y2;
122 C3 = (sinh_x * inv_x - sin_y * inv_y) * inv_x2y2;
123 }
124
125 std::cout << C0 << " " << C1 << " " << C2 << " " << C3 << "\n";
126
127 Matrix F(4, 4, 0), A(4, 4, 0);
128
129 auto eigF = matpack::eigen::mat(F);
130 Eigen::Matrix4d eigA;
131 eigA << 0, b, c, d, b, 0, u, v, c, -u, 0, w, d, -v, -w, 0;
132
133 eigF = C1 * eigA + C2 * eigA * eigA + C3 * eigA * eigA * eigA;
134 eigF(0, 0) += C0;
135 eigF(1, 1) += C0;
136 eigF(2, 2) += C0;
137 eigF(3, 3) += C0;
138 eigF *= exp(a);
139
140 std::cout << F << "\n";
141}
142
144 // Initializes as unity matrices
145 TransmissionMatrix a(2, 4);
146 std::cout << "Initialized TransmissionMatrix(2, 4):\n" << a << "\n";
147
148 // Set a single input
149 Eigen::Matrix4d A;
150 A << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16;
151 std::cout << "New Matrix:\n" << A << "\n\n";
152 a.Mat4(0) = A;
153 std::cout << "Updated TransmissionMatrix Position 1 wit New Matrix:\n"
154 << a << "\n";
155
156 // The stream can also set the values
157 String S =
158 "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";
159 std::cout << "Stream:\n" << S << "\n\n";
160 std::istringstream astream(S);
161 astream >> a;
162 std::cout << "Streamed into TransmissionMatrix:\n" << a << "\n";
163
164 // Initialize empty
165 RadiationVector b(3, 3);
166 std::cout << "Initialized RadiationVector(3, 3)\n" << b << "\n";
167
168 // Set is not defined but add is
169 Eigen::Vector3d B;
170 B << 1, 2, 3;
171 std::cout << "New Vector:\n" << B << "\n\n"; // nb. not transposed
172 b.Vec3(1).noalias() += B;
173 std::cout << "Updated RadiationVector Position 1 with New Vector:\n"
174 << b << "\n";
175
176 // The stream can also set the values
177 String T = "1 2 3 4 5 6 7 8 90";
178 std::cout << "Stream:\n" << T << "\n\n";
179 std::istringstream bstream(T);
180 bstream >> b;
181 std::cout << "Streamed into RadiationVector:\n" << b << "\n";
182}
183
185 auto f = [](Numeric x) { return 0.1 * x; };
186 auto df = [](Numeric x) { return 0.1 + 0 * x; };
187
188 Index nstokes = 4;
189 const Numeric x1 = 30;
190 const Numeric x2 = -0.1;
191 const Numeric r_normal = 1000;
192 const Numeric r_extra1 = r_normal + f(x1);
193 const Numeric r_extra2 = r_normal + f(x2);
194
195 PropagationMatrix a(1, nstokes);
196 a.Kjj() = 10 + Numeric(rand() % 1000) / 100;
197 if (nstokes > 1) {
198 a.K12() = 2 + Numeric(rand() % 1000) / 100;
199 if (nstokes > 2) {
200 a.K13() = 3 + Numeric(rand() % 1000) / 100;
201 a.K23() = -1 + Numeric(rand() % 1000) / 100;
202 if (nstokes > 3) {
203 a.K14() = 5 + Numeric(rand() % 1000) / 100;
204 a.K24() = -3 + Numeric(rand() % 1000) / 100;
205 a.K34() = -2 + Numeric(rand() % 1000) / 100;
206 }
207 }
208 }
209 a.Data() *= 1e-5;
210
211 PropagationMatrix b(1, nstokes);
212 b.Kjj() = 5 + Numeric(rand() % 1000) / 100;
213 if (nstokes > 1) {
214 b.K12() = -1 + Numeric(rand() % 1000) / 100;
215 if (nstokes > 2) {
216 b.K13() = -3 + Numeric(rand() % 1000) / 100;
217 b.K23() = 4 + Numeric(rand() % 1000) / 100;
218 if (nstokes > 3) {
219 b.K14() = 2 + Numeric(rand() % 1000) / 100;
220 b.K24() = -1 + Numeric(rand() % 1000) / 100;
221 b.K34() = 3 + Numeric(rand() % 1000) / 100;
222 }
223 }
224 }
225 b.Data() *= 5e-6;
226
228 da[0].Data() = 0;
229 Tensor3 T_normal(1, nstokes, nstokes), T_extra(1, nstokes, nstokes);
230 Tensor4 dT1(1, 1, nstokes, nstokes), dT2(1, 1, nstokes, nstokes);
231
233 T_normal, dT1, dT2, r_normal, a, b, da, da, df(x1), df(x2), 0);
234
235 std::cout << "Transmission at r=" << r_normal << ":\n"
236 << matpack::eigen::mat(T_normal(0, joker, joker)) << "\n"
237 << "\n";
238 std::cout << "First derivative:\n"
239 << matpack::eigen::mat(dT1(0, 0, joker, joker)) << "\n"
240 << "\n";
241 std::cout << "Second derivative:\n"
242 << matpack::eigen::mat(dT2(0, 0, joker, joker)) << "\n"
243 << "\n";
244
245 compute_transmission_matrix(T_extra, r_extra1, a, b);
246
247 std::cout << "Transmission at perturbed r1=" << r_extra1 << ":\n"
248 << matpack::eigen::mat(T_extra(0, joker, joker)) << "\n"
249 << "\n";
250 T_extra -= T_normal;
251 T_extra /= x1;
252 std::cout << "First derivative perturbed:\n"
253 << matpack::eigen::mat(T_extra(0, joker, joker)) << "\n"
254 << "\n";
255 T_extra /= dT1(0, joker, joker, joker);
256 std::cout << "First derivative perturbed relative:\n"
257 << matpack::eigen::mat(T_extra(0, joker, joker)) << "\n"
258 << "\n";
259
260 compute_transmission_matrix(T_extra, r_extra2, a, b);
261
262 std::cout << "Transmission at perturbed r2=" << r_extra2 << ":\n"
263 << matpack::eigen::mat(T_extra(0, joker, joker)) << "\n"
264 << "\n";
265 T_extra -= T_normal;
266 T_extra /= x2;
267 std::cout << "Second derivative perturbed:\n"
268 << matpack::eigen::mat(T_extra(0, joker, joker)) << "\n"
269 << "\n";
270 T_extra /= dT2(0, joker, joker, joker);
271 std::cout << "Second derivative perturbed relative:\n"
272 << matpack::eigen::mat(T_extra(0, joker, joker)) << "\n"
273 << "\n";
274}
275
277 const Numeric a = 2;
278 const Numeric b = 3;
279 const Numeric c = 4;
280 const Numeric d = 1;
281 const Numeric u = 5;
282 const Numeric v = 1;
283 const Numeric w = 5;
284
289 test1.Kjj() = a;
290 test2.Kjj() = a;
291 test3.Kjj() = a;
292 test4.Kjj() = a;
293 test2.K12() = b;
294 test3.K12() = b;
295 test4.K12() = b;
296 test3.K13() = c;
297 test4.K13() = c;
298 test3.K23() = u;
299 test4.K23() = u;
300 test4.K14() = d;
301 test4.K24() = v;
302 test4.K34() = w;
303
304 std::cout << test1 << "\n\n"
305 << test2 << "\n\n"
306 << test3 << "\n\n"
307 << test4 << "\n\n";
308
309 TransmissionMatrix ans1(1, 1);
310 TransmissionMatrix ans2(1, 2);
311 TransmissionMatrix ans3(1, 3);
312 TransmissionMatrix ans4(1, 4);
313
315
317 empty,
318 empty,
319 test1,
320 test1,
323 1,
324 0,
325 0,
326 -1);
327
329 empty,
330 empty,
331 test2,
332 test2,
335 1,
336 0,
337 0,
338 -1);
339
341 empty,
342 empty,
343 test3,
344 test3,
347 1,
348 0,
349 0,
350 -1);
351
353 empty,
354 empty,
355 test4,
356 test4,
359 1,
360 0,
361 0,
362 -1);
363
364 std::cout << ans1 << "\n\n"
365 << ans2 << "\n\n"
366 << ans3 << "\n\n"
367 << ans4 << "\n\n";
368}
369
371 int i = 1;
373 for (auto& pm : propmats) {
374 pm.K12() = i;
375 i++;
376 pm.K13() = i;
377 i++;
378 pm.K23() = i;
379 i++;
380 pm.K14() = i;
381 i++;
382 pm.K24() = i;
383 i++;
384 pm.K34() = i;
385 i++;
386 pm.Kjj() = 2 * i;
387 i++;
388 pm.Data() *= 1e-2;
389 }
390
391 std::cout << "Propmats:\n" << propmats << "\n\n";
392
395 for (i = 0; i < 4; i++) {
396 stepwise_transmission(layers[i + 1],
397 empty,
398 empty,
399 propmats[i],
400 propmats[i + 1],
403 1,
404 0,
405 0,
406 -1);
407 }
408
409 std::cout << "Layers:\n" << layers << "\n\n";
410
411 ArrayOfTransmissionMatrix cumulative_forward =
413 ArrayOfTransmissionMatrix cumulative_reflect =
415
416 std::cout << "Forward accumulation:\n" << cumulative_forward << "\n\n";
417 std::cout << "Reflect accumulation:\n" << cumulative_reflect << "\n\n";
418}
419
421 Numeric start = 1.0;
422 Numeric end = 1e-7;
423 int n = 10000;
424
425 Vector x(n), sx(n), shx(n), cx(n), chx(n);
426 nlogspace(x, start, end, n);
427
428 for (int i = 0; i < n; i++) {
429 sx[i] = std::sin(x[i]);
430 cx[i] = std::cos(x[i]);
431 shx[i] = std::sinh(x[i]);
432 chx[i] = std::cosh(x[i]);
433 }
434
435 std::cout
436 << std::scientific << std::setprecision(15)
437 << "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";
438
439 for (int i = 0; i < n; i++)
440 std::cout << x[i] << '\t' << std::abs(sx[i] / x[i] - 1.0) << '\t'
441 << std::abs(shx[i] / x[i] - 1.0) << '\t'
442 << std::abs((chx[i] - cx[i]) / (2 * x[i] * x[i]) - 0.5) << '\t'
443 << std::abs((shx[i] / x[i] - sx[i] / x[i]) / (2 * x[i] * x[i]) -
444 1.0 / 6.0)
445 << '\n';
446}
447
448
450{
451 // Test constants
452 constexpr Index nf = 501;
453 constexpr Numeric fstart = 25e9;
454 constexpr Numeric fend = 165e9;
455 constexpr Numeric t = 200;
456 constexpr Numeric p = 1e4;
457 Vector f(nf);
458 nlinspace(f, fstart, fend, nf);
459 PropagationMatrix xsec(nf, 1);
461
464 jacs[1].Target(Jacobian::Target(Jacobian::Atm::WindU));
466 vmrs_predef.O2 = 1;
468 xsec,
469 dxsec,
471 f,
472 p,
473 t,
474 vmrs_predef,
475 jacs,
476 {});
477
478 constexpr auto df = 1000;
479 constexpr auto dt = 0.1;
480 Matrix pxsec(nf, 1, 0);
481 Matrix pxsec_dt(nf, 1, 0);
482 Matrix pxsec_df(nf, 1, 0);
483 Vector f_pert = f;
484 f_pert += df;
485 PWR93O2AbsModel(pxsec, 0, 1, 1, 1, "user", "PWR98", f, {p}, {t}, {0.5}, {1}, Verbosity());
486 PWR93O2AbsModel(pxsec_dt, 0, 1, 1, 1, "user", "PWR98", f, {p}, {t+dt}, {0.5}, {1}, Verbosity());
487 PWR93O2AbsModel(pxsec_df, 0, 1, 1, 1, "user", "PWR98", f_pert, {p}, {t}, {0.5}, {1}, Verbosity());
488
489 std::cout<< "xr = np.array([";
490 for (Index i=0; i<nf; i++)
491 std::cout<<'['<<xsec(i, 0)<<','<<' '<<pxsec(i, 0) << ']' << ',' << ' ';
492 std::cout << ']' << ')' << '\n';
493
494 std::cout<< "dxr_dt = np.array([";
495 for (Index i=0; i<nf; i++)
496 std::cout<<'['<<dxsec[0](i, 0)<<','<<' '<<(pxsec_dt(i, 0)-pxsec(i, 0))/dt << ']' << ',' << ' ';
497 std::cout << ']' << ')' << '\n';
498
499 std::cout<< "dxr_df = np.array([";
500 for (Index i=0; i<nf; i++)
501 std::cout<<'['<<dxsec[1](i, 0)<<','<<' '<<(pxsec_df(i, 0)-pxsec(i, 0))/df << ']' << ',' << ' ';
502 std::cout << ']' << ')' << '\n';
503}
504
505void test_hitran2017(bool newtest = true)
506{
507 const Numeric p = 1.0;
508 const Numeric t = 296;
509 const Numeric xco2 = 1.5e-2;
510 const Numeric xh2o = 0;
511 const Numeric sigmin = 600;
512 const Numeric sigmax = 900;
513 const Numeric dsig = 0.005;
514 const Numeric stotmax = 0.1e-21;
515
516 const Index nsig = Index(((sigmax - sigmin) / dsig) + 0.5) + 1;
517 Vector invcm_grid(nsig);
518 Vector f_grid(nsig);
519 Numeric sigc = sigmin-dsig;
520 for (Index isig=0; isig<nsig; isig++) {
521 sigc += dsig;
522 invcm_grid[isig] = sigc;
523 f_grid[isig] = Conversion::kaycm2freq(sigc);
524 }
525
526 constexpr Index n=6;
527 auto types =
528 std::array<std::pair<lm_hitran_2017::ModeOfLineMixing, lm_hitran_2017::calctype>, 6>{
529 std::pair<lm_hitran_2017::ModeOfLineMixing, lm_hitran_2017::calctype>{lm_hitran_2017::ModeOfLineMixing::FullW, lm_hitran_2017::calctype::FullW},
530 {lm_hitran_2017::ModeOfLineMixing::VP_W, lm_hitran_2017::calctype::FullW},
531 {lm_hitran_2017::ModeOfLineMixing::VP, lm_hitran_2017::calctype::NoneVP},
532 {lm_hitran_2017::ModeOfLineMixing::VP_Y, lm_hitran_2017::calctype::NoneRosenkranz},
533 {lm_hitran_2017::ModeOfLineMixing::SDVP, lm_hitran_2017::calctype::SDVP},
534 {lm_hitran_2017::ModeOfLineMixing::SDVP_Y, lm_hitran_2017::calctype::SDRosenkranz}};
535
536 ArrayOfVector absorption(n);
537 make_wigner_ready(int(250), int(20000000), 6);
538
541 for (Index i=0;i<n; i++) {
542 auto type=types[i];
543
545 Vector vmrs = {1-xco2/100-xh2o/100, xh2o/100, xco2/100};
546
547 if (not newtest)
548 absorption[i] = lm_hitran_2017::compute(p, t, xco2, xh2o, invcm_grid, stotmax, type.second);
549 else
550 absorption[i] = lm_hitran_2017::compute(hitran, bands, Hitran::isotopologue_ratios(), Conversion::atm2pa(p), t, vmrs, f_grid);
551 }
552
553 for (Index i=0; i<nsig; i++) {
554 for (Index j=0; j<n; j++) {
555 std::cout<<absorption[j][i]<<' ';
556 }
557 std::cout<<'\n';
558 }
559}
560
561
562int main(int n, char **argc) {
563 /*test_speed_of_pressurebroadening();
564 test_transmissionmatrix();
565 test_r_deriv_propagationmatrix();
566 test_transmat_from_propmat();
567 test_transmat_to_cumulativetransmat();
568 test_sinc_likes_0limit();*/
569
570 if (n == 2 and String(argc[1]) == "new") {
571 std::cout<<"new test\n";
572 test_hitran2017(true);
573 }
574 else {
575 std::cout<<"old test\n";
576 test_hitran2017(false);
577 }
578 return 0;
579}
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:48
The Matrix class.
Definition: matpackI.h:1261
The Tensor3 class.
Definition: matpackIII.h:346
The Tensor4 class.
Definition: matpackIV.h:429
The Vector class.
Definition: matpackI.h:899
#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.
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:227
void nlogspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlogspace
Definition: math_funcs.cc:263
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:216
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, const PredefinedModelData &predefined_model_data)
Compute the predefined model.
constexpr Numeric e
Elementary charge convenience name [C].
constexpr auto kaycm_per_cmsquared2hz_per_msquared(auto x) noexcept
Conversion from cm-1 per molecule per cm^2 to Hz per molecule per m^2.
constexpr auto kaycm2freq(auto x) noexcept
Conversion from Kayser wavenumber to Hz.
constexpr auto atm2pa(auto x) noexcept
Conversion from Atm to Pa.
SpeciesIsotopologueRatios isotopologue_ratios()
Temperature
Definition: jacobian.h:59
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)
auto mat(matpack::matrix auto &&x)
Map the input to a non-owning const-correct Eigen Map representing a row matrix.
Definition: matpack_eigen.h:76
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.
Array< PropagationMatrix > ArrayOfPropagationMatrix
Numeric sqrt(const Rational r)
Square root.
Definition: rational.h:705
Contains known required VMR values.
Holds all information required for individual partial derivatives.
Definition: jacobian.h:108
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:49
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.
#define u
#define d
#define v
#define w
#define a
#define c
#define b
Index make_wigner_ready(int largest, int fastest, int size)
Ready Wigner.
Wigner symbol interactions.
Headers and class definition of Zeeman modeling.