gphys 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +7 -0
  2. data/ChangeLog +7414 -0
  3. data/LICENSE.txt +1 -1
  4. data/Rakefile +0 -2
  5. data/doc/derivative/math-doc/document/images.log +385 -0
  6. data/doc/ep_flux/math-doc/document/images.log +1375 -0
  7. data/doc/ganalysis/doc/NumRu.html +203 -0
  8. data/doc/ganalysis/doc/NumRu/GAnalysis.html +931 -0
  9. data/doc/ganalysis/doc/NumRu/GAnalysis/BetaPlane.html +574 -0
  10. data/doc/ganalysis/doc/NumRu/GAnalysis/Fitting.html +576 -0
  11. data/doc/ganalysis/doc/NumRu/GAnalysis/LogP.html +425 -0
  12. data/doc/ganalysis/doc/NumRu/GAnalysis/Met.html +2021 -0
  13. data/doc/ganalysis/doc/NumRu/GAnalysis/MetZ.html +524 -0
  14. data/doc/ganalysis/doc/NumRu/GAnalysis/Planet.html +1047 -0
  15. data/doc/ganalysis/doc/NumRu/GAnalysis/QG.html +794 -0
  16. data/doc/ganalysis/doc/NumRu/GAnalysis/QG/Uninitialized.html +215 -0
  17. data/doc/ganalysis/doc/NumRu/GAnalysis/QG_common.html +603 -0
  18. data/doc/ganalysis/doc/NumRu/GAnalysis/QG_sphere.html +760 -0
  19. data/doc/ganalysis/doc/NumRu/GAnalysis/QG_sphere_common.html +251 -0
  20. data/doc/ganalysis/doc/NumRu/GAnalysis/QG_sphere_div.html +424 -0
  21. data/doc/ganalysis/doc/NumRu/GAnalysis/SigmaCoord.html +321 -0
  22. data/doc/ganalysis/doc/NumRu/GGraph.html +334 -0
  23. data/doc/ganalysis/doc/NumRu/GPhys.html +579 -0
  24. data/doc/ganalysis/doc/Object.html +210 -0
  25. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/beta_plane_rb.html +60 -0
  26. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/covariance_rb.html +56 -0
  27. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/eof_rb.html +64 -0
  28. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/fitting_rb.html +54 -0
  29. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/histogram_rb.html +58 -0
  30. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/log_p_rb.html +60 -0
  31. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/met_rb.html +60 -0
  32. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/met_z_rb.html +58 -0
  33. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/planet_rb.html +58 -0
  34. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/qg_rb.html +64 -0
  35. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/sigma_coord_rb.html +56 -0
  36. data/doc/ganalysis/doc/__/__/lib/numru/ganalysis_rb.html +98 -0
  37. data/doc/ganalysis/doc/created.rid +13 -0
  38. data/doc/ganalysis/doc/images/brick.png +0 -0
  39. data/doc/ganalysis/doc/images/brick_link.png +0 -0
  40. data/doc/ganalysis/doc/images/bug.png +0 -0
  41. data/doc/ganalysis/doc/images/bullet_black.png +0 -0
  42. data/doc/ganalysis/doc/images/bullet_toggle_minus.png +0 -0
  43. data/doc/ganalysis/doc/images/bullet_toggle_plus.png +0 -0
  44. data/doc/ganalysis/doc/images/date.png +0 -0
  45. data/doc/ganalysis/doc/images/find.png +0 -0
  46. data/doc/ganalysis/doc/images/loadingAnimation.gif +0 -0
  47. data/doc/ganalysis/doc/images/macFFBgHack.png +0 -0
  48. data/doc/ganalysis/doc/images/package.png +0 -0
  49. data/doc/ganalysis/doc/images/page_green.png +0 -0
  50. data/doc/ganalysis/doc/images/page_white_text.png +0 -0
  51. data/doc/ganalysis/doc/images/page_white_width.png +0 -0
  52. data/doc/ganalysis/doc/images/plugin.png +0 -0
  53. data/doc/ganalysis/doc/images/ruby.png +0 -0
  54. data/doc/ganalysis/doc/images/tag_green.png +0 -0
  55. data/doc/ganalysis/doc/images/wrench.png +0 -0
  56. data/doc/ganalysis/doc/images/wrench_orange.png +0 -0
  57. data/doc/ganalysis/doc/images/zoom.png +0 -0
  58. data/doc/ganalysis/doc/index.html +383 -0
  59. data/doc/ganalysis/doc/js/darkfish.js +118 -0
  60. data/doc/ganalysis/doc/js/jquery.js +32 -0
  61. data/doc/ganalysis/doc/js/quicksearch.js +114 -0
  62. data/doc/ganalysis/doc/js/thickbox-compressed.js +10 -0
  63. data/doc/ganalysis/doc/rdoc.css +763 -0
  64. data/ext/numru/gphys/ext_init.c +1 -0
  65. data/ext/numru/gphys/quad_mesh_sample.c +478 -0
  66. data/gphys.gemspec +2 -2
  67. data/lib/numru/dclext.rb +394 -14
  68. data/lib/numru/derivative.rb +6 -0
  69. data/lib/numru/ganalysis/qg.rb +6 -4
  70. data/lib/numru/ggraph.rb +41 -8
  71. data/lib/numru/gphys/gphys.rb +62 -14
  72. data/lib/numru/gphys/gphys_io.rb +4 -4
  73. data/lib/numru/gphys/version.rb +2 -2
  74. metadata +84 -79
  75. data/.gitignore +0 -14
  76. data/TODO_ep_flux +0 -6
  77. data/gphys-bigmem.gemspec +0 -44
  78. data/install.rb +0 -130
  79. data/sample/cira86_to_nc.rb +0 -122
  80. data/sample/druby_cli1.rb +0 -23
  81. data/sample/druby_cli2.rb +0 -28
  82. data/sample/druby_serv1.rb +0 -30
  83. data/sample/druby_serv2.rb +0 -51
  84. data/sample/ep_flux/demo_NCEP_1.rb +0 -48
  85. data/sample/ep_flux/demo_NCEP_2.rb +0 -57
  86. data/sample/ep_flux/demo_NCEP_3.rb +0 -81
  87. data/sample/ggraph_latlon_labelling_dr002690.rb +0 -159
  88. data/sample/ggraph_mapfit-axes_dr002687.rb +0 -131
  89. data/sample/map_projection.rb +0 -121
  90. data/sample/ncep_theta_coord.rb +0 -79
  91. data/test_old/eof_slp.rb +0 -28
  92. data/test_old/mltbit.dat +0 -0
  93. data/test_old/test_ep_flux.rb +0 -533
  94. data/test_old/test_multibitIO.rb +0 -19
@@ -0,0 +1,579 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: NumRu::GPhys</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
+
17
+ </head>
18
+ <body id="top" class="class">
19
+
20
+ <div id="metadata">
21
+ <div id="home-metadata">
22
+ <div id="home-section" class="section">
23
+ <h3 class="section-header">
24
+ <a href="../index.html">Home</a>
25
+ <a href="../index.html#classes">Classes</a>
26
+ <a href="../index.html#methods">Methods</a>
27
+ </h3>
28
+ </div>
29
+ </div>
30
+
31
+ <div id="file-metadata">
32
+ <div id="file-list-section" class="section">
33
+ <h3 class="section-header">In Files</h3>
34
+ <div class="section-body">
35
+ <ul>
36
+
37
+ <li><a href="../__/__/lib/numru/ganalysis/covariance_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="../../lib/numru/ganalysis/covariance.rb">../../lib/numru/ganalysis/covariance.rb</a></li>
39
+
40
+ <li><a href="../__/__/lib/numru/ganalysis/eof_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
41
+ class="thickbox" title="../../lib/numru/ganalysis/eof.rb">../../lib/numru/ganalysis/eof.rb</a></li>
42
+
43
+ <li><a href="../__/__/lib/numru/ganalysis/fitting_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
44
+ class="thickbox" title="../../lib/numru/ganalysis/fitting.rb">../../lib/numru/ganalysis/fitting.rb</a></li>
45
+
46
+ <li><a href="../__/__/lib/numru/ganalysis/histogram_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
47
+ class="thickbox" title="../../lib/numru/ganalysis/histogram.rb">../../lib/numru/ganalysis/histogram.rb</a></li>
48
+
49
+ <li><a href="../__/__/lib/numru/ganalysis/log_p_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
50
+ class="thickbox" title="../../lib/numru/ganalysis/log_p.rb">../../lib/numru/ganalysis/log_p.rb</a></li>
51
+
52
+ <li><a href="../__/__/lib/numru/ganalysis/met_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
53
+ class="thickbox" title="../../lib/numru/ganalysis/met.rb">../../lib/numru/ganalysis/met.rb</a></li>
54
+
55
+ </ul>
56
+ </div>
57
+ </div>
58
+
59
+
60
+ </div>
61
+
62
+ <div id="class-metadata">
63
+
64
+ <!-- Parent Class -->
65
+ <div id="parent-class-section" class="section">
66
+ <h3 class="section-header">Parent</h3>
67
+
68
+ <p class="link"><a href="../Object.html">Object</a></p>
69
+
70
+ </div>
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+ <!-- Method Quickref -->
79
+ <div id="method-list-section" class="section">
80
+ <h3 class="section-header">Methods</h3>
81
+ <ul class="link-list">
82
+
83
+ <li><a href="#method-i-corelation">#corelation</a></li>
84
+
85
+ <li><a href="#method-i-correlation">#correlation</a></li>
86
+
87
+ <li><a href="#method-i-covariance">#covariance</a></li>
88
+
89
+ <li><a href="#method-i-eof">#eof</a></li>
90
+
91
+ <li><a href="#method-i-histogram">#histogram</a></li>
92
+
93
+ <li><a href="#method-i-histogram1D">#histogram1D</a></li>
94
+
95
+ <li><a href="#method-i-least_square_fit">#least_square_fit</a></li>
96
+
97
+ <li><a href="#method-i-logp_coord_p2z">#logp_coord_p2z</a></li>
98
+
99
+ </ul>
100
+ </div>
101
+
102
+
103
+
104
+ </div>
105
+
106
+ <div id="project-metadata">
107
+
108
+
109
+
110
+ <div id="classindex-section" class="section project-section">
111
+ <h3 class="section-header">Class/Module Index
112
+ <span class="search-toggle"><img src="../images/find.png"
113
+ height="16" width="16" alt="[+]"
114
+ title="show/hide quicksearch" /></span></h3>
115
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
116
+ <fieldset>
117
+ <legend>Quicksearch</legend>
118
+ <input type="text" name="quicksearch" value=""
119
+ class="quicksearch-field" />
120
+ </fieldset>
121
+ </form>
122
+
123
+ <ul class="link-list">
124
+
125
+ <li><a href="../NumRu.html">NumRu</a></li>
126
+
127
+ <li><a href="../NumRu/GAnalysis.html">NumRu::GAnalysis</a></li>
128
+
129
+ <li><a href="../NumRu/GAnalysis/BetaPlane.html">NumRu::GAnalysis::BetaPlane</a></li>
130
+
131
+ <li><a href="../NumRu/GAnalysis/Fitting.html">NumRu::GAnalysis::Fitting</a></li>
132
+
133
+ <li><a href="../NumRu/GAnalysis/LogP.html">NumRu::GAnalysis::LogP</a></li>
134
+
135
+ <li><a href="../NumRu/GAnalysis/Met.html">NumRu::GAnalysis::Met</a></li>
136
+
137
+ <li><a href="../NumRu/GAnalysis/MetZ.html">NumRu::GAnalysis::MetZ</a></li>
138
+
139
+ <li><a href="../NumRu/GAnalysis/Planet.html">NumRu::GAnalysis::Planet</a></li>
140
+
141
+ <li><a href="../NumRu/GAnalysis/QG.html">NumRu::GAnalysis::QG</a></li>
142
+
143
+ <li><a href="../NumRu/GAnalysis/QG/Uninitialized.html">NumRu::GAnalysis::QG::Uninitialized</a></li>
144
+
145
+ <li><a href="../NumRu/GAnalysis/QG_common.html">NumRu::GAnalysis::QG_common</a></li>
146
+
147
+ <li><a href="../NumRu/GAnalysis/QG_sphere.html">NumRu::GAnalysis::QG_sphere</a></li>
148
+
149
+ <li><a href="../NumRu/GAnalysis/QG_sphere_common.html">NumRu::GAnalysis::QG_sphere_common</a></li>
150
+
151
+ <li><a href="../NumRu/GAnalysis/QG_sphere_div.html">NumRu::GAnalysis::QG_sphere_div</a></li>
152
+
153
+ <li><a href="../NumRu/GAnalysis/SigmaCoord.html">NumRu::GAnalysis::SigmaCoord</a></li>
154
+
155
+ <li><a href="../NumRu/GGraph.html">NumRu::GGraph</a></li>
156
+
157
+ <li><a href="../NumRu/GPhys.html">NumRu::GPhys</a></li>
158
+
159
+ <li><a href="../Object.html">Object</a></li>
160
+
161
+ </ul>
162
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
163
+ </div>
164
+
165
+
166
+ </div>
167
+ </div>
168
+
169
+ <div id="documentation">
170
+ <h1 class="class">NumRu::GPhys</h1>
171
+
172
+ <div id="description" class="description">
173
+
174
+ <p><a href="GPhys.html">GPhys</a> extension with <a
175
+ href="GAnalysis/Fitting.html">GAnalysis::Fitting</a></p>
176
+
177
+ </div><!-- description -->
178
+
179
+
180
+
181
+
182
+ <div id="5Buntitled-5D" class="documentation-section">
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+ <!-- Methods -->
192
+
193
+ <div id="public-instance-method-details" class="method-section section">
194
+ <h3 class="section-header">Public Instance Methods</h3>
195
+
196
+
197
+ <div id="corelation-method" class="method-detail ">
198
+ <a name="method-i-corelation"></a>
199
+
200
+
201
+ <div class="method-heading">
202
+ <span class="method-name">corelation</span><span
203
+ class="method-args">(other, *dims)</span>
204
+ <span class="method-click-advice">click to toggle source</span>
205
+ </div>
206
+
207
+
208
+ <div class="method-description">
209
+
210
+
211
+
212
+
213
+
214
+ <div class="method-source-code" id="corelation-source">
215
+ <pre>
216
+ <span class="ruby-comment"># File ../../lib/numru/ganalysis/covariance.rb, line 93</span>
217
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">corelation</span>(<span class="ruby-identifier">other</span>, *<span class="ruby-identifier">dims</span>)
218
+ <span class="ruby-constant">GAnalysis</span>.<span class="ruby-identifier">corelation</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">other</span>, *<span class="ruby-identifier">dims</span>)
219
+ <span class="ruby-keyword">end</span></pre>
220
+ </div><!-- corelation-source -->
221
+
222
+ </div>
223
+
224
+
225
+ <div class="aliases">
226
+ Also aliased as: <a href="GPhys.html#method-i-correlation">correlation</a>
227
+ </div>
228
+
229
+
230
+
231
+ </div><!-- corelation-method -->
232
+
233
+
234
+ <div id="correlation-method" class="method-detail method-alias">
235
+ <a name="method-i-correlation"></a>
236
+
237
+
238
+ <div class="method-heading">
239
+ <span class="method-name">correlation</span><span
240
+ class="method-args">(other, *dims)</span>
241
+ <span class="method-click-advice">click to toggle source</span>
242
+ </div>
243
+
244
+
245
+ <div class="method-description">
246
+
247
+
248
+
249
+
250
+
251
+ </div>
252
+
253
+
254
+
255
+
256
+ <div class="aliases">
257
+ Alias for: <a href="GPhys.html#method-i-corelation">corelation</a>
258
+ </div>
259
+
260
+ </div><!-- correlation-method -->
261
+
262
+
263
+ <div id="covariance-method" class="method-detail ">
264
+ <a name="method-i-covariance"></a>
265
+
266
+
267
+ <div class="method-heading">
268
+ <span class="method-name">covariance</span><span
269
+ class="method-args">(other, *dims)</span>
270
+ <span class="method-click-advice">click to toggle source</span>
271
+ </div>
272
+
273
+
274
+ <div class="method-description">
275
+
276
+
277
+
278
+
279
+
280
+ <div class="method-source-code" id="covariance-source">
281
+ <pre>
282
+ <span class="ruby-comment"># File ../../lib/numru/ganalysis/covariance.rb, line 89</span>
283
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">covariance</span>(<span class="ruby-identifier">other</span>, *<span class="ruby-identifier">dims</span>)
284
+ <span class="ruby-constant">GAnalysis</span>.<span class="ruby-identifier">covariance</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">other</span>, *<span class="ruby-identifier">dims</span>)
285
+ <span class="ruby-keyword">end</span></pre>
286
+ </div><!-- covariance-source -->
287
+
288
+ </div>
289
+
290
+
291
+
292
+
293
+ </div><!-- covariance-method -->
294
+
295
+
296
+ <div id="eof-method" class="method-detail ">
297
+ <a name="method-i-eof"></a>
298
+
299
+
300
+ <div class="method-heading">
301
+ <span class="method-name">eof</span><span
302
+ class="method-args">(*args)</span>
303
+ <span class="method-click-advice">click to toggle source</span>
304
+ </div>
305
+
306
+
307
+ <div class="method-description">
308
+
309
+
310
+
311
+
312
+
313
+ <div class="method-source-code" id="eof-source">
314
+ <pre>
315
+ <span class="ruby-comment"># File ../../lib/numru/ganalysis/eof.rb, line 229</span>
316
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">eof</span>(*<span class="ruby-identifier">args</span>)
317
+ <span class="ruby-constant">GAnalysis</span>.<span class="ruby-identifier">eof</span>(<span class="ruby-keyword">self</span>, *<span class="ruby-identifier">args</span>)
318
+ <span class="ruby-keyword">end</span></pre>
319
+ </div><!-- eof-source -->
320
+
321
+ </div>
322
+
323
+
324
+
325
+
326
+ </div><!-- eof-method -->
327
+
328
+
329
+ <div id="histogram-method" class="method-detail ">
330
+ <a name="method-i-histogram"></a>
331
+
332
+
333
+ <div class="method-heading">
334
+ <span class="method-name">histogram</span><span
335
+ class="method-args">(opts=Hash.new)</span>
336
+ <span class="method-click-advice">click to toggle source</span>
337
+ </div>
338
+
339
+
340
+ <div class="method-description">
341
+
342
+
343
+
344
+
345
+
346
+ <div class="method-source-code" id="histogram-source">
347
+ <pre>
348
+ <span class="ruby-comment"># File ../../lib/numru/ganalysis/histogram.rb, line 155</span>
349
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">histogram</span>(<span class="ruby-identifier">opts</span>=<span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>)
350
+ <span class="ruby-constant">GAnalysis</span>.<span class="ruby-identifier">histogram</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">opts</span>)
351
+ <span class="ruby-keyword">end</span></pre>
352
+ </div><!-- histogram-source -->
353
+
354
+ </div>
355
+
356
+
357
+ <div class="aliases">
358
+ Also aliased as: <a href="GPhys.html#method-i-histogram1D">histogram1D</a>
359
+ </div>
360
+
361
+
362
+
363
+ </div><!-- histogram-method -->
364
+
365
+
366
+ <div id="histogram1D-method" class="method-detail method-alias">
367
+ <a name="method-i-histogram1D"></a>
368
+
369
+
370
+ <div class="method-heading">
371
+ <span class="method-name">histogram1D</span><span
372
+ class="method-args">(opts=Hash.new)</span>
373
+ <span class="method-click-advice">click to toggle source</span>
374
+ </div>
375
+
376
+
377
+ <div class="method-description">
378
+
379
+
380
+
381
+
382
+
383
+ </div>
384
+
385
+
386
+
387
+
388
+ <div class="aliases">
389
+ Alias for: <a href="GPhys.html#method-i-histogram">histogram</a>
390
+ </div>
391
+
392
+ </div><!-- histogram1D-method -->
393
+
394
+
395
+ <div id="least_square_fit-method" class="method-detail ">
396
+ <a name="method-i-least_square_fit"></a>
397
+
398
+
399
+ <div class="method-heading">
400
+ <span class="method-name">least_square_fit</span><span
401
+ class="method-args">(functions, ensemble_dims=nil, indep_dims=nil)</span>
402
+ <span class="method-click-advice">click to toggle source</span>
403
+ </div>
404
+
405
+
406
+ <div class="method-description">
407
+
408
+ <p>Least square fit of a linear combination of any functions (<a
409
+ href="GPhys.html">GPhys</a> version).</p>
410
+
411
+ <p>This method calls <a
412
+ href="GAnalysis/Fitting.html#method-i-least_square_fit">GAnalysis::Fitting.least_square_fit</a>
413
+ in the <a href="GAnalysis/Fitting.html">GAnalysis::Fitting</a> module. See
414
+ its document for the details, usage, and predifined functions.</p>
415
+
416
+ <h3>ARGUMENTS</h3>
417
+
418
+ <p>The arguments are the same as the third to fifth arguemnts of <a
419
+ href="GAnalysis/Fitting.html#method-i-least_square_fit">GAnalysis::Fitting.least_square_fit</a>
420
+ except that <tt>ensemble_dims</tt> and <tt>indep_dims</tt> accept dimension
421
+ specification by names (in Strings).</p>
422
+ <ul><li>
423
+ <p><tt>functions</tt> [Array of Procs] Proc objects to represent the
424
+ functions, which accept the elements of <tt>grid_locs</tt> as the arguments
425
+ (so the number of arguments fed is equal to the length of
426
+ <tt>grid_locs</tt>). (Some predifined functions are available in <a
427
+ href="GAnalysis/Fitting.html">GAnalysis::Fitting</a>).</p>
428
+ </li><li>
429
+ <p><tt>ensemble_dims</tt> (optional) [nil (defualt) or Array of Integers or
430
+ Strings] When <tt>grid_locs.length &lt; data.rank</tt>, this argument can
431
+ be used to specify the dimensions that are not included in grid_locs and
432
+ are used for ensemble averaging</p>
433
+ </li><li>
434
+ <p><tt>indep_dims</tt> (optional) [nil (defualt) or Array of Integers or
435
+ Strings] When <tt>grid_locs.length &lt; data.rank</tt>, this argument can
436
+ be used to specify the dimensions that are not included in
437
+ <tt>grid_locs</tt> and are treated as independent, so the fitting is made
438
+ for each of their component.</p>
439
+ </li></ul>
440
+
441
+ <h3>RETURN VALUES</h3>
442
+
443
+ <pre>[ c, bf, diff ]</pre>
444
+
445
+ <p>where</p>
446
+ <ul><li>
447
+ <p><tt>c</tt> is a NArray containing the coefficients of the functions and the
448
+ constant offset; its length is one greater than the number of
449
+ <tt>functions</tt> because of the offset. It is 1D unless the
450
+ <tt>indep_dims</tt> argument is used (see the examples below).</p>
451
+ </li><li>
452
+ <p><tt>bf</tt> is a <a href="GPhys.html">GPhys</a> having the best fit grid
453
+ point values. Its rank is equal to data.rank unless ensemble_dims are
454
+ given; ensemble_dims are deleted unlike the return value of <a
455
+ href="GAnalysis/Fitting.html#method-i-least_square_fit">GAnalysis::Fitting.least_square_fit</a>.</p>
456
+ </li><li>
457
+ <p>rms of the difference between the data and best fit</p>
458
+ </li></ul>
459
+
460
+ <h3>USAGE</h3>
461
+
462
+ <p>See <a
463
+ href="GAnalysis/Fitting.html#method-i-least_square_fit">GAnalysis::Fitting.least_square_fit</a>.</p>
464
+
465
+
466
+
467
+ <div class="method-source-code" id="least_square_fit-source">
468
+ <pre>
469
+ <span class="ruby-comment"># File ../../lib/numru/ganalysis/fitting.rb, line 460</span>
470
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">least_square_fit</span>(<span class="ruby-identifier">functions</span>, <span class="ruby-identifier">ensemble_dims</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">indep_dims</span>=<span class="ruby-keyword">nil</span>)
471
+
472
+ <span class="ruby-comment">#&lt; preparation &gt;</span>
473
+
474
+ <span class="ruby-identifier">no_fitting_dims</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
475
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">ensemble_dims</span>
476
+ <span class="ruby-identifier">ensemble_dims</span> = <span class="ruby-identifier">ensemble_dims</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@grid</span>.<span class="ruby-identifier">dim_index</span>(<span class="ruby-identifier">d</span>)}
477
+ <span class="ruby-identifier">no_fitting_dims</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">ensemble_dims</span>
478
+ <span class="ruby-keyword">end</span>
479
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">indep_dims</span>
480
+ <span class="ruby-identifier">indep_dims</span> = <span class="ruby-identifier">indep_dims</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@grid</span>.<span class="ruby-identifier">dim_index</span>(<span class="ruby-identifier">d</span>)}
481
+ <span class="ruby-identifier">no_fitting_dims</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">indep_dims</span>
482
+ <span class="ruby-keyword">end</span>
483
+ <span class="ruby-identifier">fitting_dims</span> = (<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">rank</span>).<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">i</span>} <span class="ruby-operator">-</span> <span class="ruby-identifier">no_fitting_dims</span>
484
+ <span class="ruby-identifier">grid_locs</span> = <span class="ruby-identifier">fitting_dims</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">coord</span>(<span class="ruby-identifier">d</span>).<span class="ruby-identifier">val</span>}
485
+ <span class="ruby-identifier">data</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">val</span>
486
+
487
+ <span class="ruby-comment">#&lt; fitting &gt;</span>
488
+ <span class="ruby-identifier">c</span>, <span class="ruby-identifier">bf</span>, <span class="ruby-identifier">diff</span> = <span class="ruby-constant">GAnalysis</span><span class="ruby-operator">::</span><span class="ruby-constant">Fitting</span>.<span class="ruby-identifier">least_square_fit</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">grid_locs</span>,
489
+ <span class="ruby-identifier">functions</span>, <span class="ruby-identifier">ensemble_dims</span>, <span class="ruby-identifier">indep_dims</span>)
490
+
491
+ <span class="ruby-comment">#&lt; make a GPhys of the best fit &gt;</span>
492
+
493
+ <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">ensemble_dims</span>
494
+ <span class="ruby-identifier">grid</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">grid</span>
495
+ <span class="ruby-keyword">else</span>
496
+ <span class="ruby-identifier">axes</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
497
+ (<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">rank</span>).<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span>
498
+ <span class="ruby-identifier">axes</span>.<span class="ruby-identifier">push</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">axis</span>(<span class="ruby-identifier">d</span>)) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">ensemble_dims</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">d</span>)
499
+ }
500
+ <span class="ruby-identifier">grid</span> = <span class="ruby-constant">Grid</span>.<span class="ruby-identifier">new</span>(*<span class="ruby-identifier">axes</span>)
501
+ <span class="ruby-identifier">shape</span> = <span class="ruby-identifier">bf</span>.<span class="ruby-identifier">shape</span>
502
+ <span class="ruby-identifier">ensemble_dims</span>.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">reverse_each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">shape</span>.<span class="ruby-identifier">delete_at</span>(<span class="ruby-identifier">d</span>)}
503
+ <span class="ruby-identifier">bf</span> = <span class="ruby-identifier">bf</span>.<span class="ruby-identifier">reshape</span>(*<span class="ruby-identifier">shape</span>)
504
+ <span class="ruby-keyword">end</span>
505
+
506
+ <span class="ruby-identifier">va</span> = <span class="ruby-constant">VArray</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">bf</span>, <span class="ruby-keyword">self</span>.<span class="ruby-identifier">data</span>, <span class="ruby-keyword">self</span>.<span class="ruby-identifier">name</span>)
507
+ <span class="ruby-identifier">bf</span> = <span class="ruby-constant">GPhys</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">grid</span>, <span class="ruby-identifier">va</span>)
508
+
509
+ [<span class="ruby-identifier">c</span>, <span class="ruby-identifier">bf</span>, <span class="ruby-identifier">diff</span>]
510
+ <span class="ruby-keyword">end</span></pre>
511
+ </div><!-- least_square_fit-source -->
512
+
513
+ </div>
514
+
515
+
516
+
517
+
518
+ </div><!-- least_square_fit-method -->
519
+
520
+
521
+ <div id="logp_coord_p2z-method" class="method-detail ">
522
+ <a name="method-i-logp_coord_p2z"></a>
523
+
524
+
525
+ <div class="method-heading">
526
+ <span class="method-name">logp_coord_p2z</span><span
527
+ class="method-args">(pdim=nil)</span>
528
+ <span class="method-click-advice">click to toggle source</span>
529
+ </div>
530
+
531
+
532
+ <div class="method-description">
533
+
534
+ <p>Convert the pressure coordinate in self to log-pressure height (after
535
+ duplicating self)</p>
536
+
537
+ <p>Return value: a <a href="GPhys.html">GPhys</a></p>
538
+
539
+
540
+
541
+ <div class="method-source-code" id="logp_coord_p2z-source">
542
+ <pre>
543
+ <span class="ruby-comment"># File ../../lib/numru/ganalysis/log_p.rb, line 84</span>
544
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">logp_coord_p2z</span>(<span class="ruby-identifier">pdim</span>=<span class="ruby-keyword">nil</span>)
545
+ <span class="ruby-identifier">pdim</span> = <span class="ruby-constant">GAnalysis</span><span class="ruby-operator">::</span><span class="ruby-constant">Met</span>.<span class="ruby-identifier">find_prs_d</span>(<span class="ruby-keyword">self</span>) <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">pdim</span>
546
+ <span class="ruby-identifier">p</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">coord</span>(<span class="ruby-identifier">pdim</span>)
547
+ <span class="ruby-identifier">z</span> = <span class="ruby-constant">GAnalysis</span><span class="ruby-operator">::</span><span class="ruby-constant">LogP</span>.<span class="ruby-identifier">p2z</span>(<span class="ruby-identifier">p</span>)
548
+ <span class="ruby-identifier">ax</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">axis</span>(<span class="ruby-identifier">pdim</span>).<span class="ruby-identifier">copy</span>
549
+ <span class="ruby-identifier">ax</span>.<span class="ruby-identifier">set_pos</span>(<span class="ruby-identifier">z</span>)
550
+ <span class="ruby-identifier">ax</span>.<span class="ruby-identifier">name</span> = <span class="ruby-identifier">z</span>.<span class="ruby-identifier">name</span>
551
+ <span class="ruby-identifier">grid</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">grid</span>.<span class="ruby-identifier">copy</span>.<span class="ruby-identifier">set_axis</span>(<span class="ruby-identifier">pdim</span>, <span class="ruby-identifier">ax</span>)
552
+ <span class="ruby-constant">GPhys</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">grid</span>,<span class="ruby-keyword">self</span>.<span class="ruby-identifier">data</span>)
553
+ <span class="ruby-keyword">end</span></pre>
554
+ </div><!-- logp_coord_p2z-source -->
555
+
556
+ </div>
557
+
558
+
559
+
560
+
561
+ </div><!-- logp_coord_p2z-method -->
562
+
563
+
564
+ </div><!-- public-instance-method-details -->
565
+
566
+ </div><!-- 5Buntitled-5D -->
567
+
568
+
569
+ </div><!-- documentation -->
570
+
571
+ <div id="validator-badges">
572
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
573
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
574
+ Rdoc Generator</a> 2</small>.</p>
575
+ </div>
576
+
577
+ </body>
578
+ </html>
579
+