62 const Index& antenna_dim,
71 const Index do_norm) {
77 const Index n_ant = antenna_dza.nelem();
86 const Index n_ar_pol =
97 const Index n_ar_za = aresponse_za_grid.
nelem();
98 const Index pol_step = n_ar_pol > 1;
110 const Index nfpol = n_f * n_pol;
113 H.
resize(n_ant * nfpol, n_za * nfpol);
120 Vector aresponse(n_ar_za, 0.0);
123 for (
Index ia = 0; ia < n_ant; ia++) {
124 Vector shifted_aresponse_za_grid = aresponse_za_grid;
125 shifted_aresponse_za_grid += antenna_dza[ia];
131 for (
Index f = 0; f < n_f; f++) {
133 for (
Index ip = 0; ip < n_pol; ip++) {
138 Index new_antenna = 1;
144 aresponse = antenna_response.
data(ip, 0,
joker, 0);
145 }
else if (f == 0 && ip == 0)
147 aresponse = antenna_response.
data(0, 0,
joker, 0);
153 if (ip == 0 || pol_step)
158 gridpos(gp_za, aresponse_za_grid, aresponse_za_grid);
161 Matrix aresponse_matrix(1, n_ar_za);
167 aresponse = aresponse_matrix(0,
joker);
177 hza, aresponse, shifted_aresponse_za_grid, za_grid);
187 const Index ii = f * n_pol + ip;
189 hrow[
Range(ii, n_za, nfpol)] = hza;
203 const Index& antenna_dim,
219 "For the gridded_dlos option, *mblock_dlos_grid* "
220 "must have two columns.");
224 for(
Index i=0; i<n_dlos-1 && mblock_dlos(i+1,0) > mblock_dlos(i,0); i++ ) {
228 "For the gridded_dlos option, the number of za angles "
229 "(among dlos directions) must be >= 2.");
231 "For the gridded_dlos option, the number of dlos angles "
232 "must be a product of two integers.");
233 const Index naa = n_dlos / nza;
234 const Vector za_grid = mblock_dlos(
Range(0,nza),0);
235 const Vector aa_grid = mblock_dlos(
Range(0,naa,nza),1);
236 for(
Index i=0; i<n_dlos; i++ ) {
238 "Zenith angle of dlos ", i,
" (0-based) differs to zenith "
239 "angle of dlos ", i-nza,
", while they need to be equal "
240 "to form rectangular grid.")
242 "Azimuth angle of dlos ", i,
" (0-based) differs to azimuth "
243 "angle ", (i/nza)*nza ,
", while they need to be equal "
244 "to form rectangular grid.")
248 const Index n_ant = antenna_dlos.nrows();
256 const Index n_ar_pol =
265 const Index n_ar_f = aresponse_f_grid.
nelem();
266 const Index n_ar_za = aresponse_za_grid.
nelem();
267 const Index n_ar_aa = aresponse_aa_grid.
nelem();
268 const Index pol_step = n_ar_pol > 1;
281 Tensor4 aresponse_with_cos(n_ar_pol, n_ar_f, n_ar_za, n_ar_aa);
282 for(
Index i3=0; i3<n_ar_za; i3++) {
284 for(
Index i4=0; i4<n_ar_aa; i4++) {
285 for(
Index i2=0; i2<n_ar_f; i2++) {
286 for(
Index i1=0; i1<n_ar_pol; i1++) {
287 aresponse_with_cos(i1,i2,i3,i4) = t * antenna_response.
data(i1,i2,i3,i4);
294 const Index nfpol = n_f * n_pol;
297 H.
resize(n_ant * nfpol, n_dlos * nfpol);
304 Matrix aresponse(n_ar_za, n_ar_aa, 0.0);
310 for (
Index ia = 0; ia < n_ant; ia++) {
315 for (
Index f = 0; f < n_f; f++) {
317 for (
Index ip = 0; ip < n_pol; ip++) {
322 Index new_antenna = 1;
328 aresponse = aresponse_with_cos(ip, 0,
joker,
joker);
329 }
else if (f == 0 && ip == 0)
331 aresponse = aresponse_with_cos(0, 0,
joker,
joker);
337 if (ip == 0 || pol_step) {
341 gridpos(gp_za, aresponse_za_grid, aresponse_za_grid);
342 gridpos(gp_aa, aresponse_aa_grid, aresponse_aa_grid);
343 Tensor4 itw(1, n_ar_za, n_ar_aa, 8);
345 Tensor3 aresponse_matrix(1, n_ar_za, n_ar_aa);
352 aresponse = aresponse_matrix(0,
joker,
joker);
363 Vector zas = aresponse_za_grid;
364 zas += antenna_dlos(ia, 0);
366 "The zenith angle grid in *mblock_dlos_grid* is too narrow. "
367 "It must be extended downwards with at least ",
368 za_grid[0]-zas[0],
" deg.")
370 "The zenith angle grid in *mblock_dlos_grid* is too narrow. "
371 "It must be extended upwards with at least ",
372 zas[n_ar_za-1] - za_grid[nza-1],
" deg.")
378 Vector aas = aresponse_aa_grid;
379 if (antenna_dlos.ncols() > 1) { aas += antenna_dlos(ia, 1); }
381 "The azimuth angle grid in *mblock_dlos_grid* is too narrow. "
382 "It must be extended downwards with at least ",
383 aa_grid[0]-aas[0],
" deg.")
385 "The azimuth angle grid in *mblock_dlos_grid* is too narrow. "
386 "It must be extended upwards with at least ",
387 aas[n_ar_aa-1] - aa_grid[naa-1],
" deg.")
394 Tensor3 itw(n_ar_za, n_ar_za, 4);
401 for (
Index iaa = 0; iaa < n_ar_aa; iaa++) {
402 const Index a = gp_aa[iaa].idx;
405 for (
Index iza = 0; iza < n_ar_za; iza++) {
407 const Index z = gp_za[iza].idx;
408 const Index x = z + 1;
410 if( itw(iza,iaa,0) > 1e-9 ) {
411 hza[
a*nza+z] += aresponse(iza,iaa) * itw(iza,iaa,0);
413 if( itw(iza,iaa,1) > 1e-9 ) {
414 hza[
b*nza+z] += aresponse(iza,iaa) * itw(iza,iaa,1);
416 if( itw(iza,iaa,2) > 1e-9 ) {
417 hza[
a*nza+x] += aresponse(iza,iaa) * itw(iza,iaa,2);
419 if( itw(iza,iaa,3) > 1e-9 ) {
420 hza[
b*nza+x] += aresponse(iza,iaa) * itw(iza,iaa,3);
431 const Index ii = f * n_pol + ip;
433 hrow[
Range(ii, n_dlos, nfpol)] = hza;
447 const Index& antenna_dim,
462 const Index n_ant = antenna_dlos.nrows();
470 const Index n_ar_pol =
479 const Index n_ar_f = aresponse_f_grid.
nelem();
480 const Index n_ar_za = aresponse_za_grid.
nelem();
481 const Index n_ar_aa = aresponse_aa_grid.
nelem();
482 const Index pol_step = n_ar_pol > 1;
495 Tensor4 aresponse_with_cos(n_ar_pol, n_ar_f, n_ar_za, n_ar_aa);
496 for(
Index i3=0; i3<n_ar_za; i3++) {
498 for(
Index i4=0; i4<n_ar_aa; i4++) {
499 for(
Index i2=0; i2<n_ar_f; i2++) {
500 for(
Index i1=0; i1<n_ar_pol; i1++) {
501 aresponse_with_cos(i1,i2,i3,i4) = t * antenna_response.
data(i1,i2,i3,i4);
508 const Index nfpol = n_f * n_pol;
511 H.
resize(n_ant * nfpol, n_dlos * nfpol);
518 Matrix aresponse(n_ar_za, n_ar_aa, 0.0);
524 for (
Index ia = 0; ia < n_ant; ia++) {
529 for (
Index f = 0; f < n_f; f++) {
531 for (
Index ip = 0; ip < n_pol; ip++) {
536 Index new_antenna = 1;
542 aresponse = aresponse_with_cos(ip, 0,
joker,
joker);
543 }
else if (f == 0 && ip == 0)
545 aresponse = aresponse_with_cos(0, 0,
joker,
joker);
551 if (ip == 0 || pol_step) {
555 gridpos(gp_za, aresponse_za_grid, aresponse_za_grid);
556 gridpos(gp_aa, aresponse_aa_grid, aresponse_aa_grid);
557 Tensor4 itw(1, n_ar_za, n_ar_aa, 8);
559 Tensor3 aresponse_matrix(1, n_ar_za, n_ar_aa);
566 aresponse = aresponse_matrix(0,
joker,
joker);
575 for (
Index l = 0;
l < n_dlos;
l++) {
576 const Numeric za = mblock_dlos(
l, 0) - antenna_dlos(ia, 0);
578 if (mblock_dlos.
ncols() > 1) {
579 aa += mblock_dlos(
l, 1);
581 if (antenna_dlos.ncols() > 1) {
582 aa -= antenna_dlos(ia, 1);
587 if (za < aresponse_za_grid[0] ||
588 za > aresponse_za_grid[n_ar_za - 1] ||
589 aa < aresponse_aa_grid[0] ||
590 aa > aresponse_aa_grid[n_ar_aa - 1]) {
601 interp(value, itw, aresponse, gp_za, gp_aa);
612 const Index ii = f * n_pol + ip;
614 hrow[
Range(ii, n_dlos, nfpol)] = hza;
637 const Index n = (
Index)floor(2 * xwidth_si / dx_si) + 1;
640 const Numeric dd = si * xwidth_si;
659 for (
Index i = 0; i < n; i++)
660 y[i] =
a * exp(-0.5 *
pow((x[i] - x0) / si, 2.0));
672 const Index& do_norm) {
710 const Numeric lim_high = -filter_grid[0];
714 list<Numeric> l_mixer;
716 if (fabs(f_grid[i] - lo) >= lim_low && fabs(f_grid[i] - lo) <= lim_high) {
717 l_mixer.push_back(fabs(f_grid[i] - lo));
720 l_mixer.push_back(lim_high);
725 for (list<Numeric>::iterator li = l_mixer.begin(); li != l_mixer.end();
745 row_temp, filter.
data, filter_grid, if_grid, f_mixer[i], -f_mixer[i]);
748 if (do_norm) row_temp /= row_temp.
sum();
751 for (
Index p = 0; p < n_pol; p++) {
757 a * f_grid.
nelem() * n_pol + p, f_grid.
nelem(), n_pol)] = row_temp;
769 const Index stokes_dim,
775 if (iy_unit ==
"PlanckBT" || iy_unit ==
"RJBT") {
784 for (
Index i = 0; i < nch; i++) {
785 if (mm_pol[i] ==
"AMSU-H") {
788 }
else if (mm_pol[i] ==
"AMSU-V") {
791 }
else if (mm_pol[i] ==
"ISMAR-H") {
794 }
else if (mm_pol[i] ==
"ISMAR-V") {
797 }
else if (mm_pol[i] ==
"MARSS-H") {
800 }
else if (mm_pol[i] ==
"MARSS-V") {
803 }
else if (mm_pol[i] ==
"H" || mm_pol[i] ==
"V" || mm_pol[i] ==
"LHC" ||
804 mm_pol[i] ==
"RHC") {
819 H =
Sparse(nch, nch * stokes_dim);
821 for (
Index i = 0; i < nch; i++) {
840 }
else if (pol[i] ==
"H") {
842 }
else if (pol[i] ==
"LHC")
845 }
else if (pol[i] ==
"RHC")
864 if (rot[i] ==
"none") {
866 Vector hrow(nch * stokes_dim, 0.0);
877 Sparse Hrot(stokes_dim, stokes_dim);
878 if (rot[i] ==
"AMSU") {
882 }
else if (rot[i] ==
"ISMAR") {
886 }
else if (rot[i] ==
"MARSS") {
900 Sparse Hpol(1, stokes_dim);
912 mult(Hc, Hpol, Hrot);
915 Vector hrow(nch * stokes_dim, 0.0);
916 const Index i0 = i * stokes_dim;
917 for (
Index s = 0; s < stokes_dim; s++) {
918 hrow[i0 + s] = Hc(0, s);
929 Matrix& sensor_response_dlos,
934 const Index nf = sensor_response_f_grid.
nelem();
935 const Index npol = sensor_response_pol_grid.
nelem();
936 const Index nlos = sensor_response_dlos_grid.
nrows();
937 const Index n = nf * npol * nlos;
940 sensor_response_f.
resize(n);
941 sensor_response_pol.resize(n);
942 sensor_response_dlos.
resize(n, sensor_response_dlos_grid.
ncols());
945 for (
Index ilos = 0; ilos < nlos; ilos++) {
946 const Index i2 = ilos * nf * npol;
948 for (
Index ifr = 0; ifr < nf; ifr++) {
949 const Index i3 = i2 + ifr * npol;
951 for (
Index ip = 0; ip < npol; ip++) {
952 const Index i = i3 + ip;
954 sensor_response_f[i] = sensor_response_f_grid[ifr];
955 sensor_response_pol[i] = sensor_response_pol_grid[ip];
956 sensor_response_dlos(i,
joker) = sensor_response_dlos_grid(ilos,
joker);
970 const Index& do_norm) {
985 const Index nin = n_sp * nin_f * n_pol;
986 const Index nout = n_sp * nout_f * n_pol;
995 Vector weights_long(nin, 0.0);
997 for (
Index ifr = 0; ifr < nout_f; ifr++) {
998 const Index irp = ifr * freq_full;
1001 ch_response_f = ch_response[irp].get_numeric_grid(
GFIELD1_F_GRID);
1002 ch_response_f += ch_f[ifr];
1006 weights, ch_response[irp].data, ch_response_f, sensor_f);
1009 if (do_norm) weights /= weights.
sum();
1013 for (
Index sp = 0; sp < n_sp; sp++) {
1014 for (
Index pol = 0; pol < n_pol; pol++) {
1016 weights_long[
Range(sp * nin_f * n_pol + pol, nin_f, n_pol)] = weights;
1019 H.
insert_row(sp * nout_f * n_pol + ifr * n_pol + pol, weights_long);
1031 const Index& stokes_dim,
1032 const Index& ipol_1based,
1037 "Valid polarization indices are 1 to 10 (1-based).");
1044 s2p[3] = {0, 0, 0, 1};
1047 s2p[6] = {nv, 0, nv};
1048 s2p[7] = {nv, 0, -nv};
1049 s2p[8] = {nv, 0, 0, nv};
1050 s2p[9] = {nv, 0, 0, -nv};
1054 "You have selected polarization with 1-based index: ", ipol_1based,
1056 "but this polarization demands stokes_dim >= ",
l,
"\n",
1057 "while the actual values of stokes_dim is ", stokes_dim)
1059 w[
Range(0,
l)] = s2p[ipol_1based - 1];
1060 if (
l < stokes_dim) {
1110 if (fmax[i] >= fmin[j]) {
1115 if (fmax[j] > fmax[i]) fmax[i] = fmax[j];
1120 Index n_behind = nf - 1 - j;
1125 if (n_behind > 0) fmin[
Range(j, n_behind)] = dummy[
Range(j + 1, n_behind)];
1130 if (n_behind > 0) fmax[
Range(j, n_behind)] = dummy[
Range(j + 1, n_behind)];
1155 "There must be at least one channel.\n"
1156 "(The vector *f_backend* must have at least one element.)")
1160 "Variables *f_backend_multi* and *backend_channel_response_multi*\n"
1161 "must have same number of bands for each LO.")
1164 for (
Index i = 0; i < n_chan; ++i) {
1166 const Vector& backend_f_grid =
1167 backend_channel_response[i].get_numeric_grid(0);
1170 "The frequency grid for the backend channel response of\n"
1171 "channel ", i,
" is not strictly increasing.\n"
1172 "It is: ", backend_f_grid,
"\n")
1177 out2 <<
" Original channel characteristics:\n"
1178 <<
" min nominal max (all in Hz):\n";
1185 for (
Index idx = 0; idx < n_chan; ++idx) {
1186 const Vector& backend_filter = backend_channel_response[idx].data;
1187 if (backend_filter.
nelem() >
1189 for (
Index idy = 1; idy < backend_filter.
nelem(); ++idy) {
1190 if ((backend_filter[idy] > 0) && (backend_filter[idy - 1] == 0)) {
1200 "No passbands found.\n"
1201 "*backend_channel_response* must be zero around the passbands.\n"
1202 "backend_channel_response.data = [0, >0, >0, 0]\n"
1203 "Borders between passbands are identified as [...0,0...]");
1209 for (
Index idx = 0; idx < n_chan; ++idx) {
1242 const Vector& backend_f_grid =
1243 backend_channel_response[idx].get_numeric_grid(0);
1244 const Vector& backend_filter = backend_channel_response[idx].data;
1245 if (backend_filter.
nelem() >=
1248 for (
Index idy = 1; idy < backend_filter.
nelem(); ++idy) {
1250 fmin_pb[pbIdx] = f_backend[idx] + backend_f_grid[0];
1251 }
else if ((backend_filter[idy] > 0) &&
1252 (backend_filter[idy - 1] == 0)) {
1253 fmin_pb[pbIdx] = f_backend[idx] + backend_f_grid[idy - 1] - delta;
1255 if ((backend_filter[idy] == 0) && (backend_filter[idy - 1] > 0)) {
1256 fmax_pb[pbIdx] = f_backend[idx] + backend_f_grid[idy] + delta;
1258 <<
"fmin_pb " << fmin_pb[pbIdx] <<
" "
1259 <<
"f_backend" << f_backend[idx] <<
" "
1260 <<
"fmax_pb " << fmax_pb[pbIdx] <<
" "
1261 <<
"diff " << fmax_pb[pbIdx] - fmin_pb[pbIdx] <<
"\n";
1265 fmax_pb[pbIdx - 1] = f_backend[idx] +
last(backend_f_grid);
1268 fmin_pb[pbIdx] = f_backend[idx] + backend_f_grid[0] - delta;
1269 fmax_pb[pbIdx] = f_backend[idx] +
1270 backend_f_grid[backend_f_grid.
nelem() - 1] +
1273 <<
"fmin_pb " << fmin_pb[pbIdx] <<
" "
1274 <<
"f_backend" << f_backend[pbIdx] <<
" "
1275 <<
"fmax_pb " << fmax_pb[pbIdx] <<
"\n";
1299 out2 <<
" resize numPb " << numPB <<
"\n";
1300 for (
Index idx = 0; idx < numPB; ++idx) {
1301 fmin[idx] = fmin_pb[isorted[idx]];
1302 fmax[idx] = fmax_pb[isorted[idx]];
1311 for (
Index i = 0; i < fmin.
nelem() - 1; ++i) {
1312 bool continue_checking =
true;
1316 while (continue_checking && i < fmin.
nelem() - 1) {
1324 out2 <<
" New channel characteristics:\n"
1325 <<
" min max (all in Hz):\n";
1327 out2 <<
" " << fmin[i] <<
" " << fmax[i] <<
"\n";
1353 Numeric xfmax = x_f_in[nf - 1];
1357 Index xg_reversed = 0;
1360 x_g = x_g_in[
Range(ng - 1, ng, -1)];
1370 const Numeric df = xfmax - xfmin;
1373 for (
Index i = 0; i < nf; i++) {
1374 x_f[i] = (x_f_in[i] - xfmin) / df;
1376 for (
Index i = 0; i < ng; i++) {
1377 x_g[i] = (x_g[i] - xfmin) / df;
1389 for (
Index it = 0; it < nf; it++) {
1390 l_x.push_back(x_f[it]);
1392 for (
Index it = 0; it < ng; it++) {
1393 if (x_g[it] > xfmin && x_g[it] < xfmax) {
1394 l_x.push_back(x_g[it]);
1400 Vector x_ref(l_x.size());
1402 for (list<Numeric>::iterator li = l_x.begin(); li != l_x.end(); li++) {
1414 for (
Index i = 0; i < x_ref.
nelem() - 1; i++) {
1417 while (x_g[i_g + 1] <= x_ref[i]) {
1420 while (x_f[i_f + 1] <= x_ref[i]) {
1426 if (x_ref[i] >= xfmin && x_ref[i] < xfmax) {
1428 dx = (x_f[i_f + 1] - x_f[i_f]) * (x_g[i_g + 1] - x_g[i_g]);
1431 a0 = (f[i_f] - f[i_f + 1]) / 3.0;
1432 b0 = (-f[i_f] * (x_g[i_g + 1] + x_f[i_f + 1]) +
1433 f[i_f + 1] * (x_g[i_g + 1] + x_f[i_f])) /
1435 c0 = x_g[i_g + 1] * (f[i_f] * x_f[i_f + 1] - f[i_f + 1] * x_f[i_f]);
1438 b1 = (f[i_f] * (x_g[i_g] + x_f[i_f + 1]) -
1439 f[i_f + 1] * (x_g[i_g] + x_f[i_f])) /
1441 c1 = x_g[i_g] * (-f[i_f] * x_f[i_f + 1] + f[i_f + 1] * x_f[i_f]);
1443 x1 = x_ref[i + 1] - x_ref[i];
1448 x2 = x1 * (2 * x_ref[i] + x1);
1449 x3 = x1 * (3 * x_ref[i] * (x_ref[i] + x1) + x1 * x1);
1453 h[i_g] += df * (a0 * x3 +
b0 * x2 + c0 * x1) /
dx;
1454 h[i_g + 1] += df * (
a1 * x3 +
b1 * x2 + c1 * x1) /
dx;
1468 "Significant negative response value obtained, "
1469 "despite sensor reponse is strictly positive. This "
1470 "indicates numerical problems. Is there any very "
1471 "small spacing of the sensor response grid?"
1472 "Please, send a report to Patrick if you see this!");
1491 Index xg_reversed = 0;
1494 x_g = x_g_in[
Range(ng - 1, ng, -1)];
1505 if (limit1 == limit2) {
1510 else if (limit1 == x_g[0] && limit2 == x_g[ng - 1]) {
1511 h[0] = (x_g[1] - x_g[0]) / 2.0;
1512 for (
Index i = 1; i < ng - 1; i++) {
1513 h[i] = (x_g[i + 1] - x_g[i - 1]) / 2.0;
1515 h[ng - 1] = (x_g[ng - 1] - x_g[ng - 2]) / 2.0;
1523 for (
Index i = 0; i < ng; i++) {
1524 bool inside =
false;
1527 if (limit1 < x_g[1]) {
1530 x2 =
min(limit2, x_g[1]);
1532 }
else if (i == ng - 1) {
1533 if (limit2 > x_g[ng - 2]) {
1535 x1 =
max(limit1, x_g[ng - 2]);
1539 if ((limit1 < x_g[i + 1] && limit2 > x_g[i - 1]) ||
1540 (limit2 > x_g[i - 1] && limit1 < x_g[i + 1])) {
1542 x1 =
max(limit1, x_g[i - 1]);
1543 x2 =
min(limit2, x_g[i + 1]);
1553 const Numeric r = 1.0 / (x_g[i] - x_g[i - 1]);
1554 const Numeric y1 = r * (x1 - x_g[i - 1]);
1557 h[i] = 0.5 *
dx * (y1 + y2);
1564 const Numeric r = 1.0 / (x_g[i + 1] - x_g[i]);
1565 const Numeric y2 = r * (x_g[i + 1] - x2);
1568 h[i] += 0.5 *
dx * (y1 + y2);
1605 interp(f1, itw1, f, gp1f);
1614 interp(f2, itw2, f, gp2f);
1618 h[gp1g[0].idx] += f1 * gp1g[0].fd[1];
1619 h[gp1g[0].idx + 1] += f1 * gp1g[0].fd[0];
1620 h[gp2g[0].idx] += f2 * gp2g[0].fd[1];
1621 h[gp2g[0].idx + 1] += f2 * gp2g[0].fd[0];
The global header file for ARTS.
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,...)
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.
void nlinspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlinspace
Numeric last(ConstVectorView x)
last
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 l(const Index p0, const Index n, const Numeric x, const SortedVectorType &xi, const Index j, const std::pair< Numeric, Numeric > cycle={ -180, 180}) noexcept
invlib::Vector< ArtsVector > Vector
invlib wrapper type for ARTS vectors.
Numeric pow(const Rational base, Numeric exp)
Power of.
Numeric sqrt(const Rational r)
Square root.
void muellersparse_rotation(Sparse &H, const Index &stokes_dim, const Numeric &rotangle)
muellersparse_rotation
Declaration of functions in rte.cc.
const Index GFIELD1_F_GRID
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
const Index GFIELD4_ZA_GRID
const Index GFIELD4_FIELD_NAMES
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.
void gaussian_response(Vector &y, const Vector &x, const Numeric &x0, const Numeric &fwhm)
gaussian_response
void summation_by_vecmult(VectorView h, ConstVectorView f, ConstVectorView x_f, ConstVectorView x_g, const Numeric x1, const Numeric x2)
summation_by_vecmult
void antenna2d_interp_response(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_response
const Index GFIELD4_F_GRID
void gaussian_response_autogrid(Vector &x, Vector &y, const Numeric &x0, const Numeric &fwhm, const Numeric &xwidth_si, const Numeric &dx_si)
gaussian_response_autogrid
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 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
const Index GFIELD4_AA_GRID
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.