1 | |
---|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
4 | |
---|
5 | <!-- Generated by IDLdoc 2.0 --> |
---|
6 | |
---|
7 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
8 | <head> |
---|
9 | <title>spl_incr.pro (SAXO Documentation)</title> |
---|
10 | |
---|
11 | |
---|
12 | <link rel="stylesheet" type="text/css" media="all" href="./../main_files.css" /> |
---|
13 | <link rel="stylesheet" type="text/css" media="print" href="./../main_files_print.css" /> |
---|
14 | |
---|
15 | |
---|
16 | <script type="text/javascript"> |
---|
17 | function setTitle() { |
---|
18 | parent.document.title="spl_incr.pro (SAXO Documentation)"; |
---|
19 | } |
---|
20 | </script> |
---|
21 | </head> |
---|
22 | |
---|
23 | <body onload="setTitle();"> |
---|
24 | |
---|
25 | <div id="navbar_title"> |
---|
26 | <h1>SAXO Documentation</h1> |
---|
27 | </div> |
---|
28 | |
---|
29 | |
---|
30 | <div id="main_navbar"> |
---|
31 | |
---|
32 | <table cellspacing="0"> |
---|
33 | <tr> |
---|
34 | |
---|
35 | <td><a href="./../overview.html" title="Overview of library">Overview</a></td> |
---|
36 | |
---|
37 | |
---|
38 | |
---|
39 | <td >Directory</td> |
---|
40 | |
---|
41 | |
---|
42 | |
---|
43 | <td><a href="./../idldoc-categories.html" title="Browse library by category">Categories</a></td> |
---|
44 | |
---|
45 | |
---|
46 | |
---|
47 | <td><a href="./../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td> |
---|
48 | |
---|
49 | |
---|
50 | |
---|
51 | <td><a href="./../search-page.html" title="Search library">Search</a></td> |
---|
52 | |
---|
53 | |
---|
54 | <td id="selected">File</td> |
---|
55 | |
---|
56 | |
---|
57 | <td><a href="../../../Interpolation//spl_incr.pro" title="Source code of a file">Source</a></td> |
---|
58 | |
---|
59 | |
---|
60 | |
---|
61 | <td><a href="./../idldoc-help.html" title="Help on IDLdoc">Help</a></td> |
---|
62 | |
---|
63 | |
---|
64 | <td >Etc</td> |
---|
65 | |
---|
66 | <td id="flexible">Developer documentation</td> |
---|
67 | </tr> |
---|
68 | </table> |
---|
69 | |
---|
70 | </div> |
---|
71 | |
---|
72 | <div id="secondary_navbar"> |
---|
73 | |
---|
74 | <a href="spl_fstdrv.html"><<prev file</a> | <a href="spl_keep_mean.html">next file >></a> <a href="spl_incr.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a> summary: fields | <a href="#routine_summary">routine</a> details: <a href="#routine_details">routine</a> |
---|
75 | |
---|
76 | </div> |
---|
77 | |
---|
78 | |
---|
79 | <div id="container"> |
---|
80 | |
---|
81 | <h1 class="directory"><a href="directory-overview.html">Interpolation/</a></h1> |
---|
82 | <h2 class="pro_file">spl_incr.pro</h2> |
---|
83 | |
---|
84 | <div id="file_attr"> |
---|
85 | <dl> |
---|
86 | </dl> |
---|
87 | </div> |
---|
88 | |
---|
89 | <div id="file_comments"> |
---|
90 | Given the arrays X and Y, which tabulate a function (with the X[i] |
---|
91 | AND Y[i] in ascending order), and given an input value X2, the |
---|
92 | spl_incr function returns an interpolated value for the given values |
---|
93 | of X2. The interpolation method is based on cubic spline, corrected |
---|
94 | in a way that interpolated values are also monotonically increasing. |
---|
95 | </div> |
---|
96 | |
---|
97 | |
---|
98 | |
---|
99 | |
---|
100 | |
---|
101 | |
---|
102 | |
---|
103 | |
---|
104 | <div id="routine_summary"> |
---|
105 | <h2>Routine summary</h2> |
---|
106 | |
---|
107 | <dl> |
---|
108 | |
---|
109 | <dt><p><a href="#_pure_concave"><span class="result">result = </span>pure_concave(<span class="result">x1, x2, y1, y2, der2, x</span>)</a></p><dt> |
---|
110 | <dd> </dd> |
---|
111 | |
---|
112 | <dt><p><a href="#_pure_convex"><span class="result">result = </span>pure_convex(<span class="result">x1, x2, y1, y2, der2, x</span>)</a></p><dt> |
---|
113 | <dd> </dd> |
---|
114 | |
---|
115 | <dt><p><a href="#_spl_incr"><span class="result">result = </span>spl_incr(<span class="result">x, y, x2</span>, YP0=<span class="result">YP0</span>, YPN_1=<span class="result">YPN_1</span>)</a></p><dt> |
---|
116 | <dd> </dd> |
---|
117 | |
---|
118 | </dl> |
---|
119 | </div> |
---|
120 | |
---|
121 | |
---|
122 | <div id="routine_details"> |
---|
123 | |
---|
124 | |
---|
125 | <div class="routine_details" id="_pure_concave"> |
---|
126 | |
---|
127 | <h2><a class="top" href="#container">top</a>pure_concave </h2> |
---|
128 | |
---|
129 | <p class="header"> |
---|
130 | <span class="result">result = </span>pure_concave(<span class="result"><a href="#_pure_concave_param_x1">x1</a>, <a href="#_pure_concave_param_x2">x2</a>, <a href="#_pure_concave_param_y1">y1</a>, <a href="#_pure_concave_param_y2">y2</a>, <a href="#_pure_concave_param_der2">der2</a>, <a href="#_pure_concave_param_x">x</a></span>)</p> |
---|
131 | |
---|
132 | <div class="comments"> |
---|
133 | </div> |
---|
134 | |
---|
135 | <h3>Return value</h3><div class="preformat"> |
---|
136 | y2: f(x2) = y2. Double precision array |
---|
137 | </div> |
---|
138 | |
---|
139 | |
---|
140 | <h3>Parameters</h3> |
---|
141 | |
---|
142 | |
---|
143 | <h4 id="_pure_concave_param_x1">x1 |
---|
144 | <span class="attr">in</span> |
---|
145 | |
---|
146 | |
---|
147 | <span class="attr">required</span> |
---|
148 | |
---|
149 | |
---|
150 | |
---|
151 | |
---|
152 | </h4> |
---|
153 | |
---|
154 | <div class="comments"> |
---|
155 | An n-elements (at least 2) input vector that specifies the tabulate points in |
---|
156 | a strict ascending order. |
---|
157 | </div> |
---|
158 | |
---|
159 | <h4 id="_pure_concave_param_x2">x2 |
---|
160 | <span class="attr">in</span> |
---|
161 | |
---|
162 | |
---|
163 | <span class="attr">required</span> |
---|
164 | |
---|
165 | |
---|
166 | |
---|
167 | |
---|
168 | </h4> |
---|
169 | |
---|
170 | <div class="comments"> |
---|
171 | The input values for which the interpolated values are |
---|
172 | desired. Its values must be strictly monotonically increasing. |
---|
173 | </div> |
---|
174 | |
---|
175 | <h4 id="_pure_concave_param_y1">y1 |
---|
176 | <span class="attr">in</span> |
---|
177 | |
---|
178 | |
---|
179 | <span class="attr">required</span> |
---|
180 | |
---|
181 | |
---|
182 | |
---|
183 | |
---|
184 | </h4> |
---|
185 | |
---|
186 | <div class="comments"> |
---|
187 | f(x) = y. An n-elements input vector that specifies the values |
---|
188 | of the tabulated function F(Xi) corresponding to Xi. As f is |
---|
189 | supposed to be monotonically increasing, y values must be |
---|
190 | monotonically increasing. y can have equal consecutive values. |
---|
191 | </div> |
---|
192 | |
---|
193 | <h4 id="_pure_concave_param_y2">y2 |
---|
194 | |
---|
195 | |
---|
196 | |
---|
197 | |
---|
198 | |
---|
199 | |
---|
200 | |
---|
201 | |
---|
202 | </h4> |
---|
203 | |
---|
204 | <div class="comments"></div> |
---|
205 | |
---|
206 | <h4 id="_pure_concave_param_der2">der2 |
---|
207 | |
---|
208 | |
---|
209 | |
---|
210 | |
---|
211 | |
---|
212 | |
---|
213 | |
---|
214 | |
---|
215 | </h4> |
---|
216 | |
---|
217 | <div class="comments"> |
---|
218 | </div> |
---|
219 | |
---|
220 | <h4 id="_pure_concave_param_x">x |
---|
221 | |
---|
222 | |
---|
223 | |
---|
224 | |
---|
225 | |
---|
226 | |
---|
227 | |
---|
228 | |
---|
229 | </h4> |
---|
230 | |
---|
231 | <div class="comments"> |
---|
232 | </div> |
---|
233 | |
---|
234 | |
---|
235 | |
---|
236 | |
---|
237 | |
---|
238 | |
---|
239 | <h3>Examples</h3><div class="preformat"> |
---|
240 | IDL> n = 100L |
---|
241 | IDL> x = (dindgen(n))^2 |
---|
242 | IDL> y = abs(randomn(0, n)) |
---|
243 | IDL> y[n/2:n/2+1] = 0. |
---|
244 | IDL> y[n-n/3] = 0. |
---|
245 | IDL> y[n-n/6:n-n/6+5] = 0. |
---|
246 | IDL> y = total(y, /cumulative, /double) |
---|
247 | IDL> x2 = dindgen((n-1)^2) |
---|
248 | IDL> n2 = n_elements(x2) |
---|
249 | IDL> print, min(y[1:n-1]-y[0:n-2]) LT 0 |
---|
250 | IDL> y2 = spl_incr( x, y, x2) |
---|
251 | IDL> splot, x, y, xstyle = 1, ystyle = 1, ysurx=.25, petit = [1, 2, 1], /land |
---|
252 | IDL> oplot, x2, y2, color = 100 |
---|
253 | IDL> c = y2[1:n2-1] - y2[0:n2-2] |
---|
254 | IDL> print, min(c) LT 0 |
---|
255 | IDL> print, min(c, max = ma), ma |
---|
256 | IDL> splot,c,xstyle=1,ystyle=1, yrange=[-.01,.05], ysurx=.25, petit = [1, 2, 2], /noerase |
---|
257 | IDL> oplot,[0, n_elements(c)], [0, 0], linestyle = 1 |
---|
258 | </div> |
---|
259 | <h3>Version history</h3> |
---|
260 | |
---|
261 | <h4>Version</h4><div class="preformat"> |
---|
262 | $Id: spl_incr.pro 297 2007-09-25 15:09:12Z pinsard $ |
---|
263 | </div> |
---|
264 | <h4>History</h4><div class="preformat"> |
---|
265 | Sebastien Masson (smasson@lodyc.jussieu.fr): May-Dec 2005 |
---|
266 | </div> |
---|
267 | |
---|
268 | |
---|
269 | <h3>Known issues</h3> |
---|
270 | |
---|
271 | |
---|
272 | |
---|
273 | <h4>Restrictions</h4><div class="preformat"> |
---|
274 | It might be possible that y2[i+1]-y2[i] has very small negative |
---|
275 | values (amplitude smaller than 1.e-6)... |
---|
276 | </div> |
---|
277 | |
---|
278 | |
---|
279 | |
---|
280 | |
---|
281 | |
---|
282 | |
---|
283 | |
---|
284 | |
---|
285 | |
---|
286 | <h3>Statistics</h3> |
---|
287 | <table class="statistics"> |
---|
288 | <tr><td>McCabe cyclic</td><td> 1</td></tr> |
---|
289 | <tr><td>McCabe essential</td><td> 1</td></tr> |
---|
290 | <tr><td>McCabe modular design</td><td> 1</td></tr> |
---|
291 | </table> |
---|
292 | |
---|
293 | |
---|
294 | </div> |
---|
295 | |
---|
296 | |
---|
297 | <div class="routine_details" id="_pure_convex"> |
---|
298 | |
---|
299 | <h2><a class="top" href="#container">top</a>pure_convex </h2> |
---|
300 | |
---|
301 | <p class="header"> |
---|
302 | <span class="result">result = </span>pure_convex(<span class="result"><a href="#_pure_convex_param_x1">x1</a>, <a href="#_pure_convex_param_x2">x2</a>, <a href="#_pure_convex_param_y1">y1</a>, <a href="#_pure_convex_param_y2">y2</a>, <a href="#_pure_convex_param_der2">der2</a>, <a href="#_pure_convex_param_x">x</a></span>)</p> |
---|
303 | |
---|
304 | <div class="comments"> |
---|
305 | </div> |
---|
306 | |
---|
307 | |
---|
308 | |
---|
309 | |
---|
310 | <h3>Parameters</h3> |
---|
311 | |
---|
312 | |
---|
313 | <h4 id="_pure_convex_param_x1">x1 |
---|
314 | <span class="attr">in</span> |
---|
315 | |
---|
316 | |
---|
317 | <span class="attr">required</span> |
---|
318 | |
---|
319 | |
---|
320 | |
---|
321 | |
---|
322 | </h4> |
---|
323 | |
---|
324 | <div class="comments"> |
---|
325 | An n-elements (at least 2) input vector that specifies the tabulate points in |
---|
326 | a strict ascending order. |
---|
327 | </div> |
---|
328 | |
---|
329 | <h4 id="_pure_convex_param_x2">x2 |
---|
330 | <span class="attr">in</span> |
---|
331 | |
---|
332 | |
---|
333 | <span class="attr">required</span> |
---|
334 | |
---|
335 | |
---|
336 | |
---|
337 | |
---|
338 | </h4> |
---|
339 | |
---|
340 | <div class="comments"> |
---|
341 | The input values for which the interpolated values are |
---|
342 | desired. Its values must be strictly monotonically increasing. |
---|
343 | </div> |
---|
344 | |
---|
345 | <h4 id="_pure_convex_param_y1">y1 |
---|
346 | <span class="attr">in</span> |
---|
347 | |
---|
348 | |
---|
349 | <span class="attr">required</span> |
---|
350 | |
---|
351 | |
---|
352 | |
---|
353 | |
---|
354 | </h4> |
---|
355 | |
---|
356 | <div class="comments"> |
---|
357 | f(x) = y. An n-elements input vector that specifies the values |
---|
358 | of the tabulated function F(Xi) corresponding to Xi. As f is |
---|
359 | supposed to be monotonically increasing, y values must be |
---|
360 | monotonically increasing. y can have equal consecutive values. |
---|
361 | </div> |
---|
362 | |
---|
363 | <h4 id="_pure_convex_param_y2">y2 |
---|
364 | |
---|
365 | |
---|
366 | |
---|
367 | |
---|
368 | |
---|
369 | |
---|
370 | |
---|
371 | |
---|
372 | </h4> |
---|
373 | |
---|
374 | <div class="comments"></div> |
---|
375 | |
---|
376 | <h4 id="_pure_convex_param_der2">der2 |
---|
377 | |
---|
378 | |
---|
379 | |
---|
380 | |
---|
381 | |
---|
382 | |
---|
383 | |
---|
384 | |
---|
385 | </h4> |
---|
386 | |
---|
387 | <div class="comments"> |
---|
388 | </div> |
---|
389 | |
---|
390 | <h4 id="_pure_convex_param_x">x |
---|
391 | |
---|
392 | |
---|
393 | |
---|
394 | |
---|
395 | |
---|
396 | |
---|
397 | |
---|
398 | |
---|
399 | </h4> |
---|
400 | |
---|
401 | <div class="comments"> |
---|
402 | </div> |
---|
403 | |
---|
404 | |
---|
405 | |
---|
406 | |
---|
407 | |
---|
408 | |
---|
409 | |
---|
410 | |
---|
411 | |
---|
412 | |
---|
413 | |
---|
414 | |
---|
415 | |
---|
416 | |
---|
417 | |
---|
418 | |
---|
419 | |
---|
420 | |
---|
421 | |
---|
422 | |
---|
423 | |
---|
424 | |
---|
425 | |
---|
426 | |
---|
427 | |
---|
428 | |
---|
429 | |
---|
430 | <h3>Statistics</h3> |
---|
431 | <table class="statistics"> |
---|
432 | <tr><td>McCabe cyclic</td><td> 1</td></tr> |
---|
433 | <tr><td>McCabe essential</td><td> 1</td></tr> |
---|
434 | <tr><td>McCabe modular design</td><td> 1</td></tr> |
---|
435 | </table> |
---|
436 | |
---|
437 | |
---|
438 | </div> |
---|
439 | |
---|
440 | |
---|
441 | <div class="routine_details" id="_spl_incr"> |
---|
442 | |
---|
443 | <h2><a class="top" href="#container">top</a>spl_incr </h2> |
---|
444 | |
---|
445 | <p class="header"> |
---|
446 | <span class="result">result = </span>spl_incr(<span class="result"><a href="#_spl_incr_param_x">x</a>, <a href="#_spl_incr_param_y">y</a>, <a href="#_spl_incr_param_x2">x2</a></span>, <a href="#_spl_incr_keyword_YP0">YP0</a>=<span class="result">YP0</span>, <a href="#_spl_incr_keyword_YPN_1">YPN_1</a>=<span class="result">YPN_1</span>)</p> |
---|
447 | |
---|
448 | <div class="comments"> |
---|
449 | </div> |
---|
450 | |
---|
451 | |
---|
452 | |
---|
453 | |
---|
454 | <h3>Parameters</h3> |
---|
455 | |
---|
456 | |
---|
457 | <h4 id="_spl_incr_param_x">x |
---|
458 | |
---|
459 | |
---|
460 | |
---|
461 | |
---|
462 | |
---|
463 | |
---|
464 | |
---|
465 | |
---|
466 | </h4> |
---|
467 | |
---|
468 | <div class="comments"></div> |
---|
469 | |
---|
470 | <h4 id="_spl_incr_param_y">y |
---|
471 | |
---|
472 | |
---|
473 | |
---|
474 | |
---|
475 | |
---|
476 | |
---|
477 | |
---|
478 | |
---|
479 | </h4> |
---|
480 | |
---|
481 | <div class="comments"></div> |
---|
482 | |
---|
483 | <h4 id="_spl_incr_param_x2">x2 |
---|
484 | |
---|
485 | |
---|
486 | |
---|
487 | |
---|
488 | |
---|
489 | |
---|
490 | |
---|
491 | |
---|
492 | </h4> |
---|
493 | |
---|
494 | <div class="comments"></div> |
---|
495 | |
---|
496 | |
---|
497 | |
---|
498 | |
---|
499 | |
---|
500 | |
---|
501 | <h3>Keywords</h3> |
---|
502 | |
---|
503 | <h4 id="_spl_incr_keyword_YP0">YP0 |
---|
504 | |
---|
505 | |
---|
506 | |
---|
507 | |
---|
508 | |
---|
509 | |
---|
510 | |
---|
511 | |
---|
512 | </h4> |
---|
513 | |
---|
514 | <div class="comments"> |
---|
515 | The first derivative of the interpolating function at the |
---|
516 | point X0. If YP0 is omitted, the second derivative at the |
---|
517 | boundary is set to zero, resulting in a "natural spline." |
---|
518 | </div> |
---|
519 | |
---|
520 | <h4 id="_spl_incr_keyword_YPN_1">YPN_1 |
---|
521 | |
---|
522 | |
---|
523 | |
---|
524 | |
---|
525 | |
---|
526 | |
---|
527 | |
---|
528 | |
---|
529 | </h4> |
---|
530 | |
---|
531 | <div class="comments"> |
---|
532 | The first derivative of the interpolating function at the |
---|
533 | point Xn-1. If YPN_1 is omitted, the second derivative at the |
---|
534 | boundary is set to zero, resulting in a "natural spline."</div> |
---|
535 | |
---|
536 | |
---|
537 | |
---|
538 | |
---|
539 | |
---|
540 | |
---|
541 | |
---|
542 | |
---|
543 | |
---|
544 | |
---|
545 | |
---|
546 | |
---|
547 | |
---|
548 | |
---|
549 | |
---|
550 | |
---|
551 | |
---|
552 | |
---|
553 | |
---|
554 | |
---|
555 | |
---|
556 | |
---|
557 | |
---|
558 | |
---|
559 | <h3>Statistics</h3> |
---|
560 | <table class="statistics"> |
---|
561 | <tr><td>McCabe cyclic</td><td> 46</td></tr> |
---|
562 | <tr><td>McCabe essential</td><td> 10</td></tr> |
---|
563 | <tr><td>McCabe modular design</td><td> 1</td></tr> |
---|
564 | </table> |
---|
565 | |
---|
566 | |
---|
567 | </div> |
---|
568 | |
---|
569 | </div> |
---|
570 | |
---|
571 | |
---|
572 | |
---|
573 | <div id="tagline">Produced by IDLdoc 2.0.</div> |
---|
574 | |
---|
575 | </div> |
---|
576 | |
---|
577 | </body> |
---|
578 | </html> |
---|