source: trunk/SRC/Documentation/idldoc_html_output/Interpolation/inquad.html

Last change on this file was 402, checked in by smasson, 15 years ago

update documentation

File size: 9.5 KB
Line 
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>inquad.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="inquad.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//inquad.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&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
74<a href="imoms3.html">&lt;&lt;prev file</a> | <a href="inrecgrid.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="inquad.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;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">inquad.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments">
90 to find if an (x,y) point is in a quadrilateral (x1,x2,x3,x4)
91</div>
92
93     
94
95     
96
97     
98
99     
100
101      <div id="routine_details">
102       
103
104        <div class="routine_details" id="_inquad">
105
106          <h2><a class="top" href="#container">top</a>inquad <span class="categories">
107 Grid
108</span></h2>
109       
110          <p class="header">
111            <span class="result">result = </span>inquad(<span class="result"><a href="#_inquad_param_x">x</a>, <a href="#_inquad_param_y">y</a>, <a href="#_inquad_param_x1">x1</a>, <a href="#_inquad_param_y1">y1</a>, <a href="#_inquad_param_x2">x2</a>, <a href="#_inquad_param_y2">y2</a>, <a href="#_inquad_param_x3">x3</a>, <a href="#_inquad_param_y3">y3</a>, <a href="#_inquad_param_x4">x4</a>, <a href="#_inquad_param_y4">y4</a></span>, <a href="#_inquad_keyword_ONSPHERE">ONSPHERE</a>=<span class="result">ONSPHERE</span>, <a href="#_inquad_keyword_DOUBLE">DOUBLE</a>=<span class="result">DOUBLE</span>, <a href="#_inquad_keyword_DELTA">DELTA</a>=<span class="result">DELTA</span>, <a href="#_inquad_keyword_NOPRINT">NOPRINT</a>=<span class="result">NOPRINT</span>, <a href="#_inquad_keyword_NEWCOORD">NEWCOORD</a>=<span class="result">NEWCOORD</span>)</p>
112       
113          <div class="comments">
114</div>
115
116          <h3>Return value</h3><div class="preformat">
117 a n elements vector where n is the number of elements of
118 x. res[i]=j means that the point number i is located in the
119 quadrilateral number j with (0 <= j <= n_elements(x0)-1)
120</div>
121
122         
123            <h3>Parameters</h3>
124       
125           
126            <h4 id="_inquad_param_x">x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
127              <span class="attr">in</span>
128             
129             
130              <span class="attr">required</span>
131             
132             
133             
134             
135            </h4>
136       
137          <div class="comments"></div>
138           
139            <h4 id="_inquad_param_y">y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
140              <span class="attr">in</span>
141             
142             
143              <span class="attr">required</span>
144             
145             
146             
147             
148            </h4>
149       
150          <div class="comments">
151 the coordinates of the point we want to know where it is.
152 Must be a scalar if /ONSPHERE activated else can be scalar or array.
153</div>
154           
155            <h4 id="_inquad_param_x1">x1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
156              <span class="attr">in</span>
157             
158             
159              <span class="attr">required</span>
160             
161             
162             
163             
164            </h4>
165       
166          <div class="comments"></div>
167           
168            <h4 id="_inquad_param_y1">y1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
169              <span class="attr">in</span>
170             
171             
172              <span class="attr">required</span>
173             
174             
175             
176             
177            </h4>
178       
179          <div class="comments"></div>
180           
181            <h4 id="_inquad_param_x2">x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
182              <span class="attr">in</span>
183             
184             
185              <span class="attr">required</span>
186             
187             
188             
189             
190            </h4>
191       
192          <div class="comments"></div>
193           
194            <h4 id="_inquad_param_y2">y2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
195              <span class="attr">in</span>
196             
197             
198              <span class="attr">required</span>
199             
200             
201             
202             
203            </h4>
204       
205          <div class="comments"></div>
206           
207            <h4 id="_inquad_param_x3">x3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
208              <span class="attr">in</span>
209             
210             
211              <span class="attr">required</span>
212             
213             
214             
215             
216            </h4>
217       
218          <div class="comments"></div>
219           
220            <h4 id="_inquad_param_y3">y3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
221              <span class="attr">in</span>
222             
223             
224              <span class="attr">required</span>
225             
226             
227             
228             
229            </h4>
230       
231          <div class="comments"></div>
232           
233            <h4 id="_inquad_param_x4">x4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
234              <span class="attr">in</span>
235             
236             
237              <span class="attr">required</span>
238             
239             
240             
241             
242            </h4>
243       
244          <div class="comments"></div>
245           
246            <h4 id="_inquad_param_y4">y4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
247              <span class="attr">in</span>
248             
249             
250              <span class="attr">required</span>
251             
252             
253             
254             
255            </h4>
256       
257          <div class="comments">
258 the coordinates of the quadrilateral given in the CLOCKWISE order.
259 Scalar or array.
260</div>
261           
262
263         
264
265         
266
267            <h3>Keywords</h3>
268           
269            <h4 id="_inquad_keyword_ONSPHERE">ONSPHERE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
270             
271             
272             
273             
274             
275             
276             
277             
278            </h4>
279       
280            <div class="comments">
281 to specify that the quadrilateral are on a sphere and
282 that their coordinates are longitude-latitude coordinates. In this
283 case, east-west periodicity, poles singularity and other pbs
284 related to longitude-latitude coordinates are managed
285 automatically.
286</div>
287           
288            <h4 id="_inquad_keyword_DOUBLE">DOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
289             
290             
291             
292             
293             
294             
295             
296             
297            </h4>
298       
299            <div class="comments">
300 use double precision to perform the computation
301</div>
302           
303            <h4 id="_inquad_keyword_DELTA">DELTA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
304             
305             
306             
307             
308             
309             
310              <span class="attr">default:</span> <span class="value">4</span>
311             
312            </h4>
313       
314            <div class="comments">
315 to speed up the program, we reduce the aera where we look for potential
316 quadrilaterals containing (x,y). Delta defines the limit of the box
317 centred on (x,y) with a zonal and meridional extent of delta degrees.
318</div>
319           
320            <h4 id="_inquad_keyword_NOPRINT">NOPRINT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
321             
322             
323             
324             
325             
326             
327             
328             
329            </h4>
330       
331            <div class="comments">
332 to suppress the print messages.
333</div>
334           
335            <h4 id="_inquad_keyword_NEWCOORD">NEWCOORD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
336             
337             
338             
339             
340             
341             
342             
343             
344            </h4>
345       
346            <div class="comments">
347</div>
348           
349         
350
351          <h3>Examples</h3><div class="preformat">
352
353   IDL> x = 1.*[1, 2, 6, 7, 3]
354   IDL> y = 1.*[1, 3, 3, 4, 7]
355   IDL> x1 = 1.*[0,4,2]
356   IDL> y1 = 1.*[1,4,8]
357   IDL> x2 = 1.*[1,6,4]
358   IDL> y2 = 1.*[5,6,8]
359   IDL> x3 = 1.*[3,8,4]
360   IDL> y3 = 1.*[4,4,6]
361   IDL> x4 = 1.*[2,6,2]
362   IDL> y4 = 1.*[0,2,6]
363   IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata
364   IDL> for i=0,2 do oplot, [x4[i],x1[i],x2[i],x3[i],x4[i]],[y4[i],y1[i],y2[i],y3[i],y4[i]]
365   IDL> oplot, x, y, color = 20, psym = 1, thick = 2
366   IDL> print, inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4)
367
368 On a sphere see
369 <a href="..//Interpolation/clickincell.html">clickincell</a> ...
370</div>
371          <h3>Version history</h3>
372         
373          <h4>Version</h4><div class="preformat">
374 $Id: inquad.pro 371 2008-08-07 09:32:02Z pinsard $
375</div>
376          <h4>History</h4><div class="preformat">
377      Sebastien Masson (smasson@lodyc.jussieu.fr)
378      August 2003
379      Based on Convert_clic_ij.pro written by Gurvan Madec
380</div>
381         
382         
383          <h3>Known issues</h3>
384         
385         
386         
387          <h4>Restrictions</h4><div class="preformat">
388 I think degenerated quadrilateral (e.g. flat of twisted) is not work.
389 This has to be tested.
390</div>
391       
392         
393         
394         
395         
396         
397         
398         
399       
400          <h3>Statistics</h3>
401          <table class="statistics">
402            <tr><td>McCabe cyclic</td><td>          22</td></tr>
403            <tr><td>McCabe essential</td><td>           1</td></tr>
404            <tr><td>McCabe modular design</td><td>           1</td></tr>
405          </table>
406         
407       
408        </div>
409       
410      </div>
411
412     
413
414      <div id="tagline">Produced by IDLdoc 2.0.</div>
415
416    </div>
417
418  </body>
419</html>
Note: See TracBrowser for help on using the repository browser.