Go to the documentation of this file.
151 gridpos( gp_trad, old_grid, new_grid, extpolfac );
159 for (
Index i=0; i<n_new; ++i) {
161 gp_trad[i].fd[0] = 0;
162 gp_trad[i].fd[1] = 1;
171 for (
Index s=0; s<n_new; ++s)
182 k =
IMIN(
IMAX(gp_trad[s].idx-(m-1)/2, 0),
189 if (gp_trad[s].fd[0]<=0.5)
213 for (
Index i=0; i<m; ++i)
221 for (
Index j=0; j<m; ++j)
223 num *= new_grid[s] - old_grid[k+j];
227 for (
Index j=0; j<m; ++j)
229 denom *= old_grid[k+i] - old_grid[k+j];
231 gp[s].w[i] = num / denom;
273 gridpos_poly( agp, old_grid, new_grid, order, extpolfac );
315 if (old_grid[0] >= new_grid[new_grid.
nelem()-1])
317 Vector shifted_old_grid = old_grid;
318 shifted_old_grid -= 360;
321 gridpos_poly(gp, shifted_old_grid, new_grid, order, extpolfac);
323 else if (old_grid[old_grid.
nelem()-1] <= new_grid[0])
325 Vector shifted_old_grid = old_grid;
326 shifted_old_grid += 360;
328 gridpos_poly(gp, shifted_old_grid, new_grid, order, extpolfac);
372 Vector large_grid(new_n*3);
374 large_grid[r_left] = old_grid_n1;
375 large_grid[r_left] -= 360.;
377 large_grid[
Range(new_n, new_n)] = old_grid_n1;
379 large_grid[r_right] = old_grid_n1;
380 large_grid[r_right] += 360.;
382 gridpos_poly(gp, large_grid, new_grid, order, extpolfac);
384 for (ArrayOfGridPosPoly::iterator itgp = gp.begin(); itgp != gp.end(); itgp++)
385 for (ArrayOfIndex::iterator iti = itgp->idx.begin(); iti != itgp->idx.end(); iti++)
406 #define LOOPW(x) for ( ConstIterator1D x = t##x##begin; x!=t##x##end; ++x)
409 #define CACHEW(x) const ConstIterator1D t##x##begin = t##x.w.begin(); \
410 const ConstIterator1D t##x##end = t##x.w.end();
418 #define LOOPIDX(x) for (ArrayOfIndex::const_iterator x=t##x##begin; x!=t##x##end; ++x)
421 #define CACHEIDX(x) const ArrayOfIndex::const_iterator t##x##begin = t##x.idx.begin(); \
422 const ArrayOfIndex::const_iterator t##x##end = t##x.idx.end();
436 os <<
"idx: " << gp.
idx <<
"\n";
437 os <<
"w: " << gp.
w <<
"\n";
519 itw.
get(iti) = (*r) * (*c);
559 itw.
get(iti) = (*p) * (*r) * (*c);
604 itw.
get(iti) = (*b) * (*p) * (*r) * (*c);
654 itw.
get(iti) = (*s) * (*b) * (*p) * (*r) * (*c);
709 itw.
get(iti) = (*v) * (*s) * (*b) * (*p) * (*r) * (*c);
749 tia += a.
get(*c) * itw.
get(iti);
1092 for (
Index i=0; i<n; ++i )
1130 itw.
get(i,iti) = *c;
1170 for (
Index i=0; i<n; ++i )
1190 itw.
get(i,iti) = (*r) * (*c);
1234 for (
Index i=0; i<n; ++i )
1249 itw.
get(i,iti) = (*p) * (*r) * (*c);
1297 for (
Index i=0; i<n; ++i )
1315 itw.
get(i,iti) = (*b) * (*p) * (*r) * (*c);
1367 for (
Index i=0; i<n; ++i )
1388 itw.
get(i,iti) = (*s) * (*b) * (*p) * (*r) * (*c);
1444 for (
Index i=0; i<n; ++i )
1468 itw.
get(i,iti) = (*v) * (*s) * (*b) * (*p) * (*r) * (*c);
1509 for (
Index i=0; i<n; ++i )
1523 tia += a.
get(*c) * itw.
get(i,iti);
1572 for (
Index i=0; i<n; ++i )
1590 *c) * itw.
get(i,iti);
1643 for (
Index i=0; i<n; ++i )
1665 *c) * itw.
get(i,iti);
1722 for (
Index i=0; i<n; ++i )
1748 *c) * itw.
get(i,iti);
1809 for (
Index i=0; i<n; ++i )
1839 *c) * itw.
get(i,iti);
1904 for (
Index i=0; i<n; ++i )
1938 *c) * itw.
get(i,iti);
1982 for (
Index ir=0; ir<nr; ++ir )
1988 for (
Index ic=0; ic<nc; ++ic )
2006 itw.
get(ir,ic,iti) = (*r) * (*c);
2051 for (
Index ip=0; ip<np; ++ip )
2055 for (
Index ir=0; ir<nr; ++ir )
2059 for (
Index ic=0; ic<nc; ++ic )
2070 itw.
get(ip,ir,ic,iti) =
2114 assert(
is_size(itw,nb,np,nr,nc,
2121 for (
Index ib=0; ib<nb; ++ib )
2125 for (
Index ip=0; ip<np; ++ip )
2129 for (
Index ir=0; ir<nr; ++ir )
2133 for (
Index ic=0; ic<nc; ++ic )
2145 itw.
get(ib,ip,ir,ic,iti) =
2146 (*b) * (*p) * (*r) * (*c);
2201 for (
Index is=0; is<
ns; ++is )
2205 for (
Index ib=0; ib<nb; ++ib )
2209 for (
Index ip=0; ip<np; ++ip )
2213 for (
Index ir=0; ir<nr; ++ir )
2217 for (
Index ic=0; ic<nc; ++ic )
2230 itw.
get(is,ib,ip,ir,ic,iti) =
2231 (*s) * (*b) * (*p) * (*r) * (*c);
2291 for (
Index iv=0; iv<nv; ++iv )
2295 for (
Index is=0; is<
ns; ++is )
2299 for (
Index ib=0; ib<nb; ++ib )
2303 for (
Index ip=0; ip<np; ++ip )
2307 for (
Index ir=0; ir<nr; ++ir )
2311 for (
Index ic=0; ic<nc; ++ic )
2325 itw.
get(iv,is,ib,ip,ir,ic,iti) =
2326 (*v) * (*s) * (*b) * (*p) * (*r) * (*c);
2380 for (
Index ir=0; ir<nr; ++ir )
2386 for (
Index ic=0; ic<nc; ++ic )
2402 *c) * itw.
get(ir,ic,iti);
2458 for (
Index ip=0; ip<np; ++ip )
2462 for (
Index ir=0; ir<nr; ++ir )
2466 for (
Index ic=0; ic<nc; ++ic )
2484 *c) * itw.
get(ip,ir,ic,
2546 for (
Index ib=0; ib<nb; ++ib )
2550 for (
Index ip=0; ip<np; ++ip )
2554 for (
Index ir=0; ir<nr; ++ir )
2558 for (
Index ic=0; ic<nc; ++ic )
2566 Numeric& tia = ia(ib,ip,ir,ic);
2578 *c) * itw.
get(ib,ip,ir,ic,
2645 for (
Index is=0; is<
ns; ++is )
2649 for (
Index ib=0; ib<nb; ++ib )
2653 for (
Index ip=0; ip<np; ++ip )
2657 for (
Index ir=0; ir<nr; ++ir )
2661 for (
Index ic=0; ic<nc; ++ic )
2669 Numeric& tia = ia(is,ib,ip,ir,ic);
2683 *c) * itw.
get(is,ib,ip,ir,ic,
2737 nv,
ns,nb,np,nr,nc));
2755 for (
Index iv=0; iv<nv; ++iv )
2759 for (
Index is=0; is<
ns; ++is )
2763 for (
Index ib=0; ib<nb; ++ib )
2767 for (
Index ip=0; ip<np; ++ip )
2771 for (
Index ir=0; ir<nr; ++ir )
2775 for (
Index ic=0; ic<nc; ++ic )
2783 Numeric& tia = ia(iv,is,ib,ip,ir,ic);
2799 *c) * itw.
get(iv,is,ib,ip,ir,ic,
bool is_same_within_epsilon(const Numeric &a, const Numeric &b, const Numeric &epsilon)
Check, if two numbers agree within a given epsilon.
const Numeric sum_check_epsilon
The maximum difference from 1 that we allow for a sum check.
Numeric get(Index l, Index v, Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Index IMIN(Index a, Index b)
Return the minimum of two integer numbers.
ostream & operator<<(ostream &os, const GridPosPoly &gp)
Output operator for GridPosPoly.
Numeric get(Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
void gridpos(ArrayOfGridPos &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Numeric &extpolfac)
Set up a grid position Array.
A constant view of a Tensor7.
Header file for interpolation.cc.
Numeric get(Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
void interpweights(VectorView itw, const GridPosPoly &tc)
Red 1D interpolation weights.
Numeric get(Index n) const
Get element implementation without assertions.
Numeric get(Index r, Index c) const
Get element implementation without assertions.
Numeric get(Index n) const
Get element implementation without assertions.
bool is_size(ConstVectorView x, const Index &n)
Verifies that the size of x is l.
#define LOOPW(x)
Macro for interpolation weight loops.
A constant view of a Tensor4.
#define CACHEW(x)
Macro for caching begin and end iterators for interpolation weight loops.
cmplx FADDEEVA() w(cmplx z, double relerr)
Numeric get(Index v, Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Numeric get(Index v, Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
void gridpos_poly_cyclic_longitudinal(ArrayOfGridPosPoly &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Index order, const Numeric &extpolfac)
Set up grid positions for higher order interpolation.
void gridpos_poly_longitudinal(const String &error_msg, ArrayOfGridPosPoly &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Index order, const Numeric &extpolfac)
Set up grid positions for higher order interpolation on longitudes.
Structure to store a grid position for higher order interpolation.
Numeric get(Index p, Index r, Index c) const
Get element implementation without assertions.
The implementation for String, the ARTS string class.
Numeric get(Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Index nelem() const
Returns the number of elements.
#define CACHEIDX(x)
Macro for caching begin and end iterators for interpolation index loops.
Index IMAX(Index a, Index b)
Return the maximum of two integer numbers.
Numeric sum() const
The sum of all elements of a Vector.
A constant view of a Tensor6.
NUMERIC Numeric
The type to use for all floating point numbers.
#define LOOPIDX(x)
Macro for interpolation index loops.
bool is_lon_cyclic(ConstVectorView grid, const Numeric &epsilon)
Check if the given longitude grid is cyclic.
Numeric get(Index r, Index c) const
Get element implementation without assertions.
Header file for interpolation_poly.cc.
A constant view of a Matrix.
Numeric get(Index l, Index v, Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Numeric get(Index p, Index r, Index c) const
Get element implementation without assertions.
Header file for logic.cc.
A constant view of a Tensor3.
Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPosPoly &tc)
Red 1D Interpolate.
INDEX Index
The type to use for all integer numbers and indices.
void gridpos_poly(ArrayOfGridPosPoly &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Index order, const Numeric &extpolfac)
Set up grid positions for higher order interpolation.
Header file for helper functions for OpenMP.
A constant view of a Vector.
Index nelem() const
Number of elements.
A constant view of a Tensor5.
Numeric get(Index b, Index p, Index r, Index c) const
Get element implementation without assertions.