66 const Index& antenna_dim,
75 const Index do_norm) {
81 const Index n_ant = antenna_dza.nelem();
90 const Index n_ar_pol =
100 const Index n_ar_f = aresponse_f_grid.
nelem();
101 const Index n_ar_za = aresponse_za_grid.
nelem();
102 const Index pol_step = n_ar_pol > 1;
114 const Index nfpol = n_f * n_pol;
117 H.
resize(n_ant * nfpol, n_za * nfpol);
124 Vector aresponse(n_ar_za, 0.0);
127 for (
Index ia = 0; ia < n_ant; ia++) {
128 Vector shifted_aresponse_za_grid = aresponse_za_grid;
129 shifted_aresponse_za_grid += antenna_dza[ia];
135 for (
Index f = 0; f < n_f; f++) {
137 for (
Index ip = 0; ip < n_pol; ip++) {
142 Index new_antenna = 1;
148 aresponse = antenna_response.
data(ip, 0,
joker, 0);
149 }
else if (f == 0 && ip == 0)
151 aresponse = antenna_response.
data(0, 0,
joker, 0);
157 if (ip == 0 || pol_step)
162 gridpos(gp_za, aresponse_za_grid, aresponse_za_grid);
165 Matrix aresponse_matrix(1, n_ar_za);
171 aresponse = aresponse_matrix(0,
joker);
181 hza, aresponse, shifted_aresponse_za_grid, za_grid);
191 const Index ii = f * n_pol + ip;
193 hrow[
Range(ii, n_za, nfpol)] = hza;
207 const Index& antenna_dim,
223 "For the gridded_dlos option, *mblock_dlos* "
224 "must have two columns.");
228 for(
Index i=0; i<n_dlos-1 && mblock_dlos(i+1,0) > mblock_dlos(i,0); i++ ) {
232 "For the gridded_dlos option, the number of za angles "
233 "(among dlos directions) must be >= 2.");
235 "For the gridded_dlos option, the number of dlos angles "
236 "must be a product of two integers.");
237 const Index naa = n_dlos / nza;
238 const Vector za_grid = mblock_dlos(
Range(0,nza),0);
239 const Vector aa_grid = mblock_dlos(
Range(0,naa,nza),1);
240 for(
Index i=0; i<n_dlos; i++ ) {
242 "Zenith angle of dlos ", i,
" (0-based) differs to zenith "
243 "angle of dlos ", i-nza,
", while they need to be equal "
244 "to form rectangular grid.")
246 "Azimuth angle of dlos ", i,
" (0-based) differs to azimuth "
247 "angle ", (i/nza)*nza ,
", while they need to be equal "
248 "to form rectangular grid.")
252 const Index n_ant = antenna_dlos.nrows();
260 const Index n_ar_pol =
269 const Index n_ar_f = aresponse_f_grid.
nelem();
270 const Index n_ar_za = aresponse_za_grid.
nelem();
271 const Index n_ar_aa = aresponse_aa_grid.
nelem();
272 const Index pol_step = n_ar_pol > 1;
286 Tensor4 aresponse_with_cos(n_ar_pol, n_ar_f, n_ar_za, n_ar_aa);
287 for(
Index i3=0; i3<n_ar_za; i3++) {
289 for(
Index i4=0; i4<n_ar_aa; i4++) {
290 for(
Index i2=0; i2<n_ar_f; i2++) {
291 for(
Index i1=0; i1<n_ar_pol; i1++) {
292 aresponse_with_cos(i1,i2,i3,i4) = t * antenna_response.
data(i1,i2,i3,i4);
299 const Index nfpol = n_f * n_pol;
302 H.
resize(n_ant * nfpol, n_dlos * nfpol);
309 Matrix aresponse(n_ar_za, n_ar_aa, 0.0);
312 for (
Index ia = 0; ia < n_ant; ia++) {
317 for (
Index f = 0; f < n_f; f++) {
319 for (
Index ip = 0; ip < n_pol; ip++) {
324 Index new_antenna = 1;
330 aresponse = aresponse_with_cos(ip, 0,
joker,
joker);
331 }
else if (f == 0 && ip == 0)
333 aresponse = aresponse_with_cos(0, 0,
joker,
joker);
339 if (ip == 0 || pol_step) {
343 gridpos(gp_za, aresponse_za_grid, aresponse_za_grid);
344 gridpos(gp_aa, aresponse_aa_grid, aresponse_aa_grid);
345 Tensor4 itw(1, n_ar_za, n_ar_aa, 8);
347 Tensor3 aresponse_matrix(1, n_ar_za, n_ar_aa);
354 aresponse = aresponse_matrix(0,
joker,
joker);
365 Vector zas = aresponse_za_grid;
366 zas += antenna_dlos(ia, 0);
368 "The zenith angle grid in *mblock_dlos* is too narrow. "
369 "It must be extended downwards with at least ",
370 za_grid[0]-zas[0],
" deg.")
372 "The zenith angle grid in *mblock_dlos* is too narrow. "
373 "It must be extended upwards with at least ",
374 zas[n_ar_za-1] - za_grid[nza-1],
" deg.")
380 Vector aas = aresponse_aa_grid;
381 if (antenna_dlos.ncols() > 1) { aas += antenna_dlos(ia, 1); }
383 "The azimuth angle grid in *mblock_dlos* is too narrow. "
384 "It must be extended downwards with at least ",
385 aa_grid[0]-aas[0],
" deg.")
387 "The azimuth angle grid in *mblock_dlos* is too narrow. "
388 "It must be extended upwards with at least ",
389 aas[n_ar_aa-1] - aa_grid[naa-1],
" deg.")
396 Tensor3 itw(n_ar_za, n_ar_za, 4);
403 for (
Index iaa = 0; iaa < n_ar_aa; iaa++) {
404 const Index a = gp_aa[iaa].idx;
407 for (
Index iza = 0; iza < n_ar_za; iza++) {
409 const Index z = gp_za[iza].idx;
410 const Index x = z + 1;
412 if( itw(iza,iaa,0) > 1e-9 ) {
413 hza[
a*nza+z] += aresponse(iza,iaa) * itw(iza,iaa,0);
415 if( itw(iza,iaa,1) > 1e-9 ) {
416 hza[
b*nza+z] += aresponse(iza,iaa) * itw(iza,iaa,1);
418 if( itw(iza,iaa,2) > 1e-9 ) {
419 hza[
a*nza+x] += aresponse(iza,iaa) * itw(iza,iaa,2);
421 if( itw(iza,iaa,3) > 1e-9 ) {
422 hza[
b*nza+x] += aresponse(iza,iaa) * itw(iza,iaa,3);
433 const Index ii = f * n_pol + ip;
435 hrow[
Range(ii, n_dlos, nfpol)] = hza;
449 const Index& antenna_dim,
465 const Index n_ant = antenna_dlos.nrows();
474 const Index n_ar_pol =
483 const Index n_ar_f = aresponse_f_grid.
nelem();
484 const Index n_ar_za = aresponse_za_grid.
nelem();
485 const Index n_ar_aa = aresponse_aa_grid.
nelem();
486 const Index pol_step = n_ar_pol > 1;
499 Tensor4 aresponse_with_cos(n_ar_pol, n_ar_f, n_ar_za, n_ar_aa);
500 for(
Index i3=0; i3<n_ar_za; i3++) {
502 for(
Index i4=0; i4<n_ar_aa; i4++) {
503 for(
Index i2=0; i2<n_ar_f; i2++) {
504 for(
Index i1=0; i1<n_ar_pol; i1++) {
505 aresponse_with_cos(i1,i2,i3,i4) = t * antenna_response.
data(i1,i2,i3,i4);
512 const Index nfpol = n_f * n_pol;
515 H.
resize(n_ant * nfpol, n_dlos * nfpol);
519 Vector hdlos(n_dlos, 0.0);
522 Matrix aresponse(n_ar_za, n_ar_aa, 0.0);
528 for (
Index ia = 0; ia < n_ant; ia++) {
533 for (
Index f = 0; f < n_f; f++) {
535 for (
Index ip = 0; ip < n_pol; ip++) {
540 Index new_antenna = 1;
547 }
else if (f == 0 && ip == 0)
555 if (ip == 0 || pol_step) {
559 gridpos(gp_za, aresponse_za_grid, aresponse_za_grid);
560 gridpos(gp_aa, aresponse_aa_grid, aresponse_aa_grid);
561 Tensor4 itw(1, n_ar_za, n_ar_aa, 8);
563 Tensor3 aresponse_matrix(1, n_ar_za, n_ar_aa);
570 aresponse = aresponse_matrix(0,
joker,
joker);
579 for (
Index l = 0; l < n_dlos; l++) {
580 const Numeric za = mblock_dlos(l, 0) - antenna_dlos(ia, 0);
582 if (mblock_dlos.
ncols() > 1) {
583 aa += mblock_dlos(l, 1);
585 if (antenna_dlos.ncols() > 1) {
586 aa -= antenna_dlos(ia, 1);
591 if (za < aresponse_za_grid[0] ||
592 za > aresponse_za_grid[n_ar_za - 1] ||
593 aa < aresponse_aa_grid[0] ||
594 aa > aresponse_aa_grid[n_ar_aa - 1]) {
605 interp(value, itw, aresponse, gp_za, gp_aa);
606 hdlos[l] = solid_angles[l] * value[0];
611 hdlos /= hdlos.
sum();
616 const Index ii = f * n_pol + ip;
618 hrow[
Range(ii, n_dlos, nfpol)] = hdlos;
637 const Index& do_norm) {
675 const Numeric lim_high = -filter_grid[0];
679 list<Numeric> l_mixer;
681 if (fabs(f_grid[i] - lo) >= lim_low && fabs(f_grid[i] - lo) <= lim_high) {
682 l_mixer.push_back(fabs(f_grid[i] - lo));
685 l_mixer.push_back(lim_high);
690 for (list<Numeric>::iterator li = l_mixer.begin(); li != l_mixer.end();
710 row_temp, filter.
data, filter_grid, if_grid, f_mixer[i], -f_mixer[i]);
713 if (do_norm) row_temp /= row_temp.
sum();
716 for (
Index p = 0; p < n_pol; p++) {
722 a * f_grid.
nelem() * n_pol + p, f_grid.
nelem(), n_pol)] = row_temp;
734 const Index stokes_dim,
740 if (iy_unit ==
"PlanckBT" || iy_unit ==
"RJBT") {
749 for (
Index i = 0; i < nch; i++) {
750 if (mm_pol[i] ==
"AMSU-H") {
753 }
else if (mm_pol[i] ==
"AMSU-V") {
756 }
else if (mm_pol[i] ==
"ISMAR-H") {
759 }
else if (mm_pol[i] ==
"ISMAR-V") {
762 }
else if (mm_pol[i] ==
"MARSS-H") {
765 }
else if (mm_pol[i] ==
"MARSS-V") {
768 }
else if (mm_pol[i] ==
"H" || mm_pol[i] ==
"V" || mm_pol[i] ==
"LHC" ||
769 mm_pol[i] ==
"RHC") {
784 H =
Sparse(nch, nch * stokes_dim);
786 for (
Index i = 0; i < nch; i++) {
805 }
else if (pol[i] ==
"H") {
807 }
else if (pol[i] ==
"LHC")
810 }
else if (pol[i] ==
"RHC")
829 if (rot[i] ==
"none") {
831 Vector hrow(nch * stokes_dim, 0.0);
842 Sparse Hrot(stokes_dim, stokes_dim);
843 if (rot[i] ==
"AMSU") {
847 }
else if (rot[i] ==
"ISMAR") {
851 }
else if (rot[i] ==
"MARSS") {
865 Sparse Hpol(1, stokes_dim);
877 mult(Hc, Hpol, Hrot);
880 Vector hrow(nch * stokes_dim, 0.0);
881 const Index i0 = i * stokes_dim;
882 for (
Index s = 0; s < stokes_dim; s++) {
883 hrow[i0 + s] = Hc(0, s);
894 Matrix& sensor_response_dlos,
899 const Index nf = sensor_response_f_grid.
nelem();
900 const Index npol = sensor_response_pol_grid.
nelem();
901 const Index nlos = sensor_response_dlos_grid.
nrows();
902 const Index n = nf * npol * nlos;
905 sensor_response_f.
resize(n);
906 sensor_response_pol.resize(n);
907 sensor_response_dlos.
resize(n, sensor_response_dlos_grid.
ncols());
910 for (
Index ilos = 0; ilos < nlos; ilos++) {
911 const Index i2 = ilos * nf * npol;
913 for (
Index ifr = 0; ifr < nf; ifr++) {
914 const Index i3 = i2 + ifr * npol;
916 for (
Index ip = 0; ip < npol; ip++) {
917 const Index i = i3 + ip;
919 sensor_response_f[i] = sensor_response_f_grid[ifr];
920 sensor_response_pol[i] = sensor_response_pol_grid[ip];
921 sensor_response_dlos(i,
joker) = sensor_response_dlos_grid(ilos,
joker);
935 const Index& do_norm) {
950 const Index nin = n_sp * nin_f * n_pol;
951 const Index nout = n_sp * nout_f * n_pol;
960 Vector weights_long(nin, 0.0);
962 for (
Index ifr = 0; ifr < nout_f; ifr++) {
963 const Index irp = ifr * freq_full;
966 ch_response_f = ch_response[irp].get_numeric_grid(GFIELD1_F_GRID);
967 ch_response_f += ch_f[ifr];
971 weights, ch_response[irp].data, ch_response_f, sensor_f);
974 if (do_norm) weights /= weights.
sum();
978 for (
Index sp = 0; sp < n_sp; sp++) {
979 for (
Index pol = 0; pol < n_pol; pol++) {
981 weights_long[
Range(sp * nin_f * n_pol + pol, nin_f, n_pol)] = weights;
984 H.
insert_row(sp * nout_f * n_pol + ifr * n_pol + pol, weights_long);
996 const Index& stokes_dim,
997 const Index& ipol_1based,
1002 "Valid polarization indices are 1 to 10 (1-based).");
1009 s2p[3] = {0, 0, 0, 1};
1012 s2p[6] = {nv, 0, nv};
1013 s2p[7] = {nv, 0, -nv};
1014 s2p[8] = {nv, 0, 0, nv};
1015 s2p[9] = {nv, 0, 0, -nv};
1017 const Index l = s2p[ipol_1based - 1].
nelem();
1019 "You have selected polarization with 1-based index: ", ipol_1based,
1021 "but this polarization demands stokes_dim >= ", l,
"\n",
1022 "while the actual values of stokes_dim is ", stokes_dim)
1024 w[
Range(0, l)] = s2p[ipol_1based - 1];
1025 if (l < stokes_dim) {
1026 w[
Range(l, stokes_dim - l)] = 0;
1075 if (fmax[i] >= fmin[j]) {
1080 if (fmax[j] > fmax[i]) fmax[i] = fmax[j];
1085 Index n_behind = nf - 1 - j;
1090 if (n_behind > 0) fmin[
Range(j, n_behind)] = dummy[
Range(j + 1, n_behind)];
1095 if (n_behind > 0) fmax[
Range(j, n_behind)] = dummy[
Range(j + 1, n_behind)];
1120 "There must be at least one channel.\n"
1121 "(The vector *f_backend* must have at least one element.)")
1125 "Variables *f_backend_multi* and *backend_channel_response_multi*\n"
1126 "must have same number of bands for each LO.")
1129 for (
Index i = 0; i < n_chan; ++i) {
1131 const Vector& backend_f_grid =
1132 backend_channel_response[i].get_numeric_grid(0);
1135 "The frequency grid for the backend channel response of\n"
1136 "channel ", i,
" is not strictly increasing.\n"
1137 "It is: ", backend_f_grid,
"\n")
1142 out2 <<
" Original channel characteristics:\n"
1143 <<
" min nominal max (all in Hz):\n";
1150 for (
Index idx = 0; idx < n_chan; ++idx) {
1151 const Vector& backend_filter = backend_channel_response[idx].data;
1152 if (backend_filter.
nelem() >
1154 for (
Index idy = 1; idy < backend_filter.
nelem(); ++idy) {
1155 if ((backend_filter[idy] > 0) && (backend_filter[idy - 1] == 0)) {
1165 "No passbands found.\n"
1166 "*backend_channel_response* must be zero around the passbands.\n"
1167 "backend_channel_response.data = [0, >0, >0, 0]\n"
1168 "Borders between passbands are identified as [...0,0...]");
1174 for (
Index idx = 0; idx < n_chan; ++idx) {
1207 const Vector& backend_f_grid =
1208 backend_channel_response[idx].get_numeric_grid(0);
1209 const Vector& backend_filter = backend_channel_response[idx].data;
1210 if (backend_filter.
nelem() >=
1213 for (
Index idy = 1; idy < backend_filter.
nelem(); ++idy) {
1215 fmin_pb[pbIdx] = f_backend[idx] + backend_f_grid[0];
1216 }
else if ((backend_filter[idy] > 0) &&
1217 (backend_filter[idy - 1] == 0)) {
1218 fmin_pb[pbIdx] = f_backend[idx] + backend_f_grid[idy - 1] - delta;
1220 if ((backend_filter[idy] == 0) && (backend_filter[idy - 1] > 0)) {
1221 fmax_pb[pbIdx] = f_backend[idx] + backend_f_grid[idy] + delta;
1223 <<
"fmin_pb " << fmin_pb[pbIdx] <<
" "
1224 <<
"f_backend" << f_backend[idx] <<
" "
1225 <<
"fmax_pb " << fmax_pb[pbIdx] <<
" "
1226 <<
"diff " << fmax_pb[pbIdx] - fmin_pb[pbIdx] <<
"\n";
1230 fmax_pb[pbIdx - 1] = f_backend[idx] +
last(backend_f_grid);
1233 fmin_pb[pbIdx] = f_backend[idx] + backend_f_grid[0] - delta;
1234 fmax_pb[pbIdx] = f_backend[idx] +
1235 backend_f_grid[backend_f_grid.
nelem() - 1] +
1238 <<
"fmin_pb " << fmin_pb[pbIdx] <<
" "
1239 <<
"f_backend" << f_backend[pbIdx] <<
" "
1240 <<
"fmax_pb " << fmax_pb[pbIdx] <<
"\n";
1264 out2 <<
" resize numPb " << numPB <<
"\n";
1265 for (
Index idx = 0; idx < numPB; ++idx) {
1266 fmin[idx] = fmin_pb[isorted[idx]];
1267 fmax[idx] = fmax_pb[isorted[idx]];
1276 for (
Index i = 0; i < fmin.
nelem() - 1; ++i) {
1277 bool continue_checking =
true;
1281 while (continue_checking && i < fmin.
nelem() - 1) {
1289 out2 <<
" New channel characteristics:\n"
1290 <<
" min max (all in Hz):\n";
1292 out2 <<
" " << fmin[i] <<
" " << fmax[i] <<
"\n";
1318 Numeric xfmax = x_f_in[nf - 1];
1322 Index xg_reversed = 0;
1325 x_g = x_g_in[
Range(ng - 1, ng, -1)];
1335 const Numeric df = xfmax - xfmin;
1338 for (
Index i = 0; i < nf; i++) {
1339 x_f[i] = (x_f_in[i] - xfmin) / df;
1341 for (
Index i = 0; i < ng; i++) {
1342 x_g[i] = (x_g[i] - xfmin) / df;
1354 for (
Index it = 0; it < nf; it++) {
1355 l_x.push_back(x_f[it]);
1357 for (
Index it = 0; it < ng; it++) {
1358 if (x_g[it] > xfmin && x_g[it] < xfmax) {
1359 l_x.push_back(x_g[it]);
1365 Vector x_ref(l_x.size());
1367 for (list<Numeric>::iterator li = l_x.begin(); li != l_x.end(); li++) {
1379 for (
Index i = 0; i < x_ref.
nelem() - 1; i++) {
1382 while (x_g[i_g + 1] <= x_ref[i]) {
1385 while (x_f[i_f + 1] <= x_ref[i]) {
1391 if (x_ref[i] >= xfmin && x_ref[i] < xfmax) {
1393 dx = (x_f[i_f + 1] - x_f[i_f]) * (x_g[i_g + 1] - x_g[i_g]);
1396 a0 = (f[i_f] - f[i_f + 1]) / 3.0;
1397 b0 = (-f[i_f] * (x_g[i_g + 1] + x_f[i_f + 1]) +
1398 f[i_f + 1] * (x_g[i_g + 1] + x_f[i_f])) /
1400 c0 = x_g[i_g + 1] * (f[i_f] * x_f[i_f + 1] - f[i_f + 1] * x_f[i_f]);
1403 b1 = (f[i_f] * (x_g[i_g] + x_f[i_f + 1]) -
1404 f[i_f + 1] * (x_g[i_g] + x_f[i_f])) /
1406 c1 = x_g[i_g] * (-f[i_f] * x_f[i_f + 1] + f[i_f + 1] * x_f[i_f]);
1408 x1 = x_ref[i + 1] - x_ref[i];
1413 x2 = x1 * (2 * x_ref[i] + x1);
1414 x3 = x1 * (3 * x_ref[i] * (x_ref[i] + x1) + x1 * x1);
1418 h[i_g] += df * (a0 * x3 + b0 * x2 + c0 * x1) / dx;
1419 h[i_g + 1] += df * (
a1 * x3 +
b1 * x2 + c1 * x1) / dx;
1433 "Significant negative response value obtained, "
1434 "despite sensor reponse is strictly positive. This "
1435 "indicates numerical problems. Is there any very "
1436 "small spacing of the sensor response grid?"
1437 "Please, send a report to Patrick if you see this!");
1456 Index xg_reversed = 0;
1459 x_g = x_g_in[
Range(ng - 1, ng, -1)];
1470 if (limit1 == limit2) {
1475 else if (limit1 == x_g[0] && limit2 == x_g[ng - 1]) {
1476 h[0] = (x_g[1] - x_g[0]) / 2.0;
1477 for (
Index i = 1; i < ng - 1; i++) {
1478 h[i] = (x_g[i + 1] - x_g[i - 1]) / 2.0;
1480 h[ng - 1] = (x_g[ng - 1] - x_g[ng - 2]) / 2.0;
1488 for (
Index i = 0; i < ng; i++) {
1489 bool inside =
false;
1492 if (limit1 < x_g[1]) {
1495 x2 =
min(limit2, x_g[1]);
1497 }
else if (i == ng - 1) {
1498 if (limit2 > x_g[ng - 2]) {
1500 x1 =
max(limit1, x_g[ng - 2]);
1504 if ((limit1 < x_g[i + 1] && limit2 > x_g[i - 1]) ||
1505 (limit2 > x_g[i - 1] && limit1 < x_g[i + 1])) {
1507 x1 =
max(limit1, x_g[i - 1]);
1508 x2 =
min(limit2, x_g[i + 1]);
1518 const Numeric r = 1.0 / (x_g[i] - x_g[i - 1]);
1519 const Numeric y1 = r * (x1 - x_g[i - 1]);
1521 const Numeric y2 = y1 + r * dx;
1522 h[i] = 0.5 * dx * (y1 + y2);
1529 const Numeric r = 1.0 / (x_g[i + 1] - x_g[i]);
1530 const Numeric y2 = r * (x_g[i + 1] - x2);
1532 const Numeric y1 = y2 + r * dx;
1533 h[i] += 0.5 * dx * (y1 + y2);
1570 interp(f1, itw1, f, gp1f);
1579 interp(f2, itw2, f, gp2f);
1583 h[gp1g[0].idx] += f1 * gp1g[0].fd[1];
1584 h[gp1g[0].idx + 1] += f1 * gp1g[0].fd[0];
1585 h[gp2g[0].idx] += f2 * gp2g[0].fd[1];
1586 h[gp2g[0].idx + 1] += f2 * gp2g[0].fd[0];
base max(const Array< base > &x)
Max function.
base min(const Array< base > &x)
Min function.
The global header file for ARTS.
Constants of physical expressions as constexpr.
Index nelem() const ARTS_NOEXCEPT
A constant view of a Matrix.
Index nrows() const noexcept
Index ncols() const noexcept
Index ncols() const noexcept
Index nrows() const noexcept
Index nbooks() const noexcept
Index npages() const noexcept
A constant view of a Vector.
Numeric sum() const ARTS_NOEXCEPT
The sum of all elements of a Vector.
Index nelem() const noexcept
Returns the number of elements.
const ArrayOfString & get_string_grid(Index i) const
Get a string grid.
const Vector & get_numeric_grid(Index i) const
Get a numeric grid.
void resize(Index r, Index c)
Resize function.
void resize(Index n)
Resize function.
void mult(MatrixView C, ConstMatrixView A, const Block &B)
#define ARTS_ASSERT(condition,...)
#define ARTS_USER_ERROR(...)
#define ARTS_USER_ERROR_IF(condition,...)
Implementation of gridded fields.
void gridpos(ArrayOfGridPos &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Numeric &extpolfac)
Set up a grid position Array.
void interpweights(VectorView itw, const GridPos &tc)
Red 1D interpolation weights.
Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPos &tc)
Red 1D Interpolate.
bool is_increasing(ConstVectorView x)
Checks if a vector is sorted and strictly increasing.
bool is_decreasing(ConstVectorView x)
Checks if a vector is sorted in reversed order and is strictly decreasing.
Header file for logic.cc.
Numeric last(ConstVectorView x)
last
void abs(Sparse &A, const Sparse &B)
Absolute value of sparse matrix elements.
Header file for sparse matrices.
Implementation of Matrix, Vector, and such stuff.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
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 ln_2
Natural logarithm of 2.
constexpr auto deg2rad(auto x) noexcept
Converts degrees to radians.
constexpr Index GFIELD4_FIELD_NAMES
Global constant, Index of the field names in GriddedField4.
constexpr Index GFIELD1_F_GRID
Global constant, Index of the frequency grid in GriddedField1.
constexpr Index GFIELD4_ZA_GRID
Global constant, Index of the zenith angle grid in GriddedField4.
constexpr Index GFIELD4_F_GRID
Global constant, Index of the frequency grid in GriddedField4.
constexpr Index GFIELD4_AA_GRID
Global constant, Index of the azimuth angle grid in GriddedField4.
void muellersparse_rotation(Sparse &H, const Index &stokes_dim, const Numeric &rotangle)
muellersparse_rotation
Declaration of functions in rte.cc.
void antenna2d_gridded_dlos(Sparse &H, const Index &antenna_dim, ConstMatrixView antenna_dlos, const GriddedField4 &antenna_response, ConstMatrixView mblock_dlos, ConstVectorView f_grid, const Index n_pol)
antenna2d_interp_gridded_dlos
void find_effective_channel_boundaries(Vector &fmin, Vector &fmax, const Vector &f_backend, const ArrayOfGriddedField1 &backend_channel_response, const Numeric &delta, const Verbosity &verbosity)
Calculate channel boundaries from instrument response functions.
void integration_bin_by_vecmult(VectorView h, ConstVectorView x_g_in, const Numeric &limit1, const Numeric &limit2)
integration_bin_by_vecmult
constexpr Numeric DEG2RAD
void met_mm_polarisation_hmatrix(Sparse &H, const ArrayOfString &mm_pol, const Numeric dza, const Index stokes_dim, const String &iy_unit)
Calculate polarisation H-matrix.
constexpr Numeric NAT_LOG_2
void summation_by_vecmult(VectorView h, ConstVectorView f, ConstVectorView x_f, ConstVectorView x_g, const Numeric x1, const Numeric x2)
summation_by_vecmult
void mixer_matrix(Sparse &H, Vector &f_mixer, const Numeric &lo, const GriddedField1 &filter, ConstVectorView f_grid, const Index &n_pol, const Index &n_sp, const Index &do_norm)
mixer_matrix
bool test_and_merge_two_channels(Vector &fmin, Vector &fmax, Index i, Index j)
Test if two instrument channels overlap, and if so, merge them.
void spectrometer_matrix(Sparse &H, ConstVectorView ch_f, const ArrayOfGriddedField1 &ch_response, ConstVectorView sensor_f, const Index &n_pol, const Index &n_sp, const Index &do_norm)
spectrometer_matrix
void antenna2d_interp_response(Sparse &H, const Index &antenna_dim, ConstMatrixView antenna_dlos, const GriddedField4 &antenna_response, ConstMatrixView mblock_dlos, ConstVectorView solid_angles, ConstVectorView f_grid, const Index n_pol)
antenna2d_interp_response
void integration_func_by_vecmult(VectorView h, ConstVectorView f, ConstVectorView x_f_in, ConstVectorView x_g_in)
integration_func_by_vecmult
void antenna1d_matrix(Sparse &H, const Index &antenna_dim, ConstVectorView antenna_dza, const GriddedField4 &antenna_response, ConstVectorView za_grid, ConstVectorView f_grid, const Index n_pol, const Index do_norm)
antenna1d_matrix
void stokes2pol(VectorView w, const Index &stokes_dim, const Index &ipol_1based, const Numeric nv)
stokes2pol
void sensor_aux_vectors(Vector &sensor_response_f, ArrayOfIndex &sensor_response_pol, Matrix &sensor_response_dlos, ConstVectorView sensor_response_f_grid, const ArrayOfIndex &sensor_response_pol_grid, ConstMatrixView sensor_response_dlos_grid)
sensor_aux_vectors
Sensor modelling functions.
Contains sorting routines.
void get_sorted_indexes(ArrayOfIndex &sorted, const T &data)
get_sorted_indexes
void resize(Index r, Index c)
Resize function.
void insert_row(Index r, Vector v)
Insert row function.
Index ncols() const
Returns the number of columns.