ARTS 2.5.11 (git: 725533f0)
interpolation.h
Go to the documentation of this file.
1
9#ifndef interpolation_h
10#define interpolation_h
11
12#include "arts.h"
13#include "matpack_data.h"
14#include "mystring.h"
15
17
56struct GridPos {
57 Index idx;
58 std::array<Numeric, 2> fd;
61 friend ostream& operator<<(ostream& os, const GridPos& gp);
62};
63
65
74
75// Function headers (documentation is in .cc file):
76
77void gridpos(ArrayOfGridPos& gp,
78 ConstVectorView old_grid,
79 ConstVectorView new_grid,
80 const Numeric& extpolfac = 0.5);
81
82void gridpos(GridPos& gp,
83 ConstVectorView old_grid,
84 const Numeric& new_grid,
85 const Numeric& extpolfac = 0.5);
86
87void gridpos_1to1(ArrayOfGridPos& gp, ConstVectorView grid);
88
89void gridpos_copy(GridPos& gp_new, const GridPos& gp_old);
90
91Numeric fractional_gp(const GridPos& gp);
92
94
95void gridpos_force_end_fd(GridPos& gp, const Index& n);
96
97void gridpos_upperend_check(GridPos& gp, const Index& ie);
98
99void gridpos_upperend_check(ArrayOfGridPos& gp, const Index& ie);
100
102
103bool is_gridpos_at_index_i(const GridPos& gp,
104 const Index& i,
105 const bool& strict = true);
106
107Index gridpos2gridrange(const GridPos& gp, const bool& upwards);
108
110// Red Interpolation
112
113void interpweights(VectorView itw, const GridPos& tc);
114
115void interpweights(VectorView itw, const GridPos& tr, const GridPos& tc);
116
117void interpweights(VectorView itw,
118 const GridPos& tp,
119 const GridPos& tr,
120 const GridPos& tc);
121
122void interpweights(VectorView itw,
123 const GridPos& tb,
124 const GridPos& tp,
125 const GridPos& tr,
126 const GridPos& tc);
127
128void interpweights(VectorView itw,
129 const GridPos& ts,
130 const GridPos& tb,
131 const GridPos& tp,
132 const GridPos& tr,
133 const GridPos& tc);
134
135void interpweights(VectorView itw,
136 const GridPos& tv,
137 const GridPos& ts,
138 const GridPos& tb,
139 const GridPos& tp,
140 const GridPos& tr,
141 const GridPos& tc);
142
143Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPos& tc);
144
145Numeric interp(ConstVectorView itw,
146 ConstMatrixView a,
147 const GridPos& tr,
148 const GridPos& tc);
149
150Numeric interp(ConstVectorView itw,
151 ConstTensor3View a,
152 const GridPos& tp,
153 const GridPos& tr,
154 const GridPos& tc);
155
156Numeric interp(ConstVectorView itw,
157 ConstTensor4View a,
158 const GridPos& tb,
159 const GridPos& tp,
160 const GridPos& tr,
161 const GridPos& tc);
162
163Numeric interp(ConstVectorView itw,
164 ConstTensor5View a,
165 const GridPos& ts,
166 const GridPos& tb,
167 const GridPos& tp,
168 const GridPos& tr,
169 const GridPos& tc);
170
171Numeric interp(ConstVectorView itw,
172 ConstTensor6View a,
173 const GridPos& tv,
174 const GridPos& ts,
175 const GridPos& tb,
176 const GridPos& tp,
177 const GridPos& tr,
178 const GridPos& tc);
179
181// Blue interpolation
183
184void interpweights(MatrixView itw, const ArrayOfGridPos& cgp);
185
186void interpweights(MatrixView itw,
187 const ArrayOfGridPos& rgp,
188 const ArrayOfGridPos& cgp);
189
190void interpweights(MatrixView itw,
191 const ArrayOfGridPos& pgp,
192 const ArrayOfGridPos& rgp,
193 const ArrayOfGridPos& cgp);
194
195void interpweights(MatrixView itw,
196 const ArrayOfGridPos& bgp,
197 const ArrayOfGridPos& pgp,
198 const ArrayOfGridPos& rgp,
199 const ArrayOfGridPos& cgp);
200
201void interpweights(MatrixView itw,
202 const ArrayOfGridPos& sgp,
203 const ArrayOfGridPos& bgp,
204 const ArrayOfGridPos& pgp,
205 const ArrayOfGridPos& rgp,
206 const ArrayOfGridPos& cgp);
207
208void interpweights(MatrixView itw,
209 const ArrayOfGridPos& vgp,
210 const ArrayOfGridPos& sgp,
211 const ArrayOfGridPos& bgp,
212 const ArrayOfGridPos& pgp,
213 const ArrayOfGridPos& rgp,
214 const ArrayOfGridPos& cgp);
215
216void interp(VectorView ia,
217 ConstMatrixView itw,
218 ConstVectorView a,
219 const ArrayOfGridPos& cgp);
220
221void interp(VectorView ia,
222 ConstMatrixView itw,
223 ConstMatrixView a,
224 const ArrayOfGridPos& rgp,
225 const ArrayOfGridPos& cgp);
226
227void interp(VectorView ia,
228 ConstMatrixView itw,
229 ConstTensor3View a,
230 const ArrayOfGridPos& pgp,
231 const ArrayOfGridPos& rgp,
232 const ArrayOfGridPos& cgp);
233
234void interp(VectorView ia,
235 ConstMatrixView itw,
236 ConstTensor4View a,
237 const ArrayOfGridPos& bgp,
238 const ArrayOfGridPos& pgp,
239 const ArrayOfGridPos& rgp,
240 const ArrayOfGridPos& cgp);
241
242void interp(VectorView ia,
243 ConstMatrixView itw,
244 ConstTensor5View a,
245 const ArrayOfGridPos& sgp,
246 const ArrayOfGridPos& bgp,
247 const ArrayOfGridPos& pgp,
248 const ArrayOfGridPos& rgp,
249 const ArrayOfGridPos& cgp);
250
251void interp(VectorView ia,
252 ConstMatrixView itw,
253 ConstTensor6View a,
254 const ArrayOfGridPos& vgp,
255 const ArrayOfGridPos& sgp,
256 const ArrayOfGridPos& bgp,
257 const ArrayOfGridPos& pgp,
258 const ArrayOfGridPos& rgp,
259 const ArrayOfGridPos& cgp);
260
262// Green interpolation
264
265void interpweights(Tensor3View itw,
266 const ArrayOfGridPos& rgp,
267 const ArrayOfGridPos& cgp);
268
269void interpweights(Tensor4View itw,
270 const ArrayOfGridPos& pgp,
271 const ArrayOfGridPos& rgp,
272 const ArrayOfGridPos& cgp);
273
274void interpweights(Tensor5View itw,
275 const ArrayOfGridPos& bgp,
276 const ArrayOfGridPos& pgp,
277 const ArrayOfGridPos& rgp,
278 const ArrayOfGridPos& cgp);
279
280void interpweights(Tensor6View itw,
281 const ArrayOfGridPos& sgp,
282 const ArrayOfGridPos& bgp,
283 const ArrayOfGridPos& pgp,
284 const ArrayOfGridPos& rgp,
285 const ArrayOfGridPos& cgp);
286
287void interpweights(Tensor7View itw,
288 const ArrayOfGridPos& vgp,
289 const ArrayOfGridPos& sgp,
290 const ArrayOfGridPos& bgp,
291 const ArrayOfGridPos& pgp,
292 const ArrayOfGridPos& rgp,
293 const ArrayOfGridPos& cgp);
294
295void interp(MatrixView ia,
296 ConstTensor3View itw,
297 ConstMatrixView a,
298 const ArrayOfGridPos& rgp,
299 const ArrayOfGridPos& cgp);
300
301void interp(Tensor3View ia,
302 ConstTensor4View itw,
303 ConstTensor3View a,
304 const ArrayOfGridPos& pgp,
305 const ArrayOfGridPos& rgp,
306 const ArrayOfGridPos& cgp);
307
308void interp(Tensor4View ia,
309 ConstTensor5View itw,
310 ConstTensor4View a,
311 const ArrayOfGridPos& bgp,
312 const ArrayOfGridPos& pgp,
313 const ArrayOfGridPos& rgp,
314 const ArrayOfGridPos& cgp);
315
316void interp(Tensor5View ia,
317 ConstTensor6View itw,
318 ConstTensor5View a,
319 const ArrayOfGridPos& sgp,
320 const ArrayOfGridPos& bgp,
321 const ArrayOfGridPos& pgp,
322 const ArrayOfGridPos& rgp,
323 const ArrayOfGridPos& cgp);
324
325void interp(Tensor6View ia,
326 ConstTensor7View itw,
327 ConstTensor6View a,
328 const ArrayOfGridPos& vgp,
329 const ArrayOfGridPos& sgp,
330 const ArrayOfGridPos& bgp,
331 const ArrayOfGridPos& pgp,
332 const ArrayOfGridPos& rgp,
333 const ArrayOfGridPos& cgp);
334
335Numeric interp_poly(ConstVectorView x,
336 ConstVectorView y,
337 const Numeric& x_i,
338 const GridPos& gp);
339
340#endif // interpolation_h
The global header file for ARTS.
This can be used to make arrays out of anything.
Definition array.h:31
Index gridpos2gridrange(const GridPos &gp, const bool &upwards)
gridpos2gridrange
bool is_gridpos_at_index_i(const GridPos &gp, const Index &i, const bool &strict=true)
is_gridpos_at_index_i
void gridpos(ArrayOfGridPos &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Numeric &extpolfac=0.5)
Set up a grid position Array.
void gridpos_force_end_fd(GridPos &gp, const Index &n)
gridpos_force_end_fd
void gridpos_check_fd(GridPos &gp)
gridpos_check_fd
void gridpos_upperend_check(GridPos &gp, const Index &ie)
gridpos_upperend_check
Array< GridPos > ArrayOfGridPos
An Array of grid positions.
Array< Array< Array< Array< GridPos > > > > ArrayOfArrayOfArrayOfArrayOfGridPos
void interpweights(VectorView itw, const GridPos &tc)
Red 1D interpolation weights.
Numeric interp_poly(ConstVectorView x, ConstVectorView y, const Numeric &x_i, const GridPos &gp)
Polynomial interpolation.
Array< Array< GridPos > > ArrayOfArrayOfGridPos
void gp4length1grid(ArrayOfGridPos &gp)
Grid position matching a grid of length 1.
Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPos &tc)
Red 1D Interpolate.
Array< Array< Array< GridPos > > > ArrayOfArrayOfArrayOfGridPos
void gridpos_copy(GridPos &gp_new, const GridPos &gp_old)
gridpos_copy
void gridpos_1to1(ArrayOfGridPos &gp, ConstVectorView grid)
gridpos_1to1
Numeric fractional_gp(const GridPos &gp)
fractional_gp
This file contains the definition of String, the ARTS string class.
Structure to store a grid position.
std::array< Numeric, 2 > fd
friend ostream & operator<<(ostream &os, const GridPos &gp)
Output operator for GridPos.
Index idx
#define a