ARTS 2.5.11 (git: 725533f0)
GridPos Struct Reference

Structure to store a grid position. More...

#include <interpolation.h>

Public Attributes

Index idx
std::array< Numeric, 2 > fd


ostream & operator<< (ostream &os, const GridPos &gp)
 Output operator for GridPos.

Detailed Description

Structure to store a grid position.

A grid position specifies, where an interpolation point is, relative to the original grid. It consists of three parts, an Index giving the original grid index below the interpolation point, a Numeric giving the fractional distance to the next original grid point, and a Numeric giving 1 minus this number. Of course, the last element is redundant. However, it is efficient to store this, since it is used many times over. We store the two Numerics in a plain C array of dimension 2. (No need to use fancy Array or Vector for this, since the dimension is fixed.)

For example, idx=3 and fd=.5 means that this interpolation point is half-way between index 3 and 4 of the original grid.

Note, that below in the first paragraph means "with a lower index". If the original grid is sorted in descending order, the value at the grid point below the interpolation point will be numerically higher than the interpolation point.

In other words, grid positions and fractional distances are defined relative to the order of the original grid. Examples:

old grid = 2 3 new grid = 2.25 idx = 0 fd[0] = 0.25

old grid = 3 2 new grid = 2.25 idx = 0 fd[0] = 0.75

Note that fd[0] is different in the second case, because the old grid is sorted in descending order. Note also that idx is the same in both cases.

Grid positions for a whole new grid are stored in an Array<GridPos> (called ArrayOfGridPos).

Definition at line 56 of file interpolation.h.

Friends And Related Symbol Documentation

◆ operator<<

ostream & operator<< ( ostream &  os,
const GridPos gp 

Output operator for GridPos.

This is just intended for testing and debugging.

osOutput stream.
gpGrid position.
The output stream.

Definition at line 81 of file

Member Data Documentation

◆ fd

◆ idx

The documentation for this struct was generated from the following file: