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>strsci.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="strsci.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="../../../../ToBeReviewed/STRING//strsci.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="strright.html"><<prev file</a> | <a href="strsed.html">next file >></a> <a href="strsci.html" target="_TOP">view single page</a> | <a href="./../../index.html" target="_TOP">view frames</a> summary: fields | routine 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">ToBeReviewed/STRING/</a></h1> |
---|
82 | <h2 class="pro_file">strsci.pro</h2> |
---|
83 | |
---|
84 | <div id="file_attr"> |
---|
85 | <dl> |
---|
86 | </dl> |
---|
87 | </div> |
---|
88 | |
---|
89 | <div id="file_comments"> |
---|
90 | Given a number, returns a string of that B |
---|
91 | number in scientific notation format ( e.g. A x 10^B ) |
---|
92 | </div> |
---|
93 | |
---|
94 | |
---|
95 | |
---|
96 | |
---|
97 | |
---|
98 | |
---|
99 | |
---|
100 | |
---|
101 | |
---|
102 | <div id="routine_details"> |
---|
103 | |
---|
104 | |
---|
105 | <div class="routine_details" id="_strsci"> |
---|
106 | |
---|
107 | <h2><a class="top" href="#container">top</a>strsci <span class="categories"> |
---|
108 | String |
---|
109 | </span></h2> |
---|
110 | |
---|
111 | <p class="header"> |
---|
112 | <span class="result">result = </span>strsci(<span class="result"><a href="#_strsci_param_data">data</a></span>, <a href="#_strsci_keyword_FORMAT">FORMAT</a>=<span class="result">FORMAT</span>, <a href="#_strsci_keyword_POT_ONLY">POT_ONLY</a>=<span class="result">POT_ONLY</span>, <a href="#_strsci_keyword_MANTISSA_ONLY">MANTISSA_ONLY</a>=<span class="result">MANTISSA_ONLY</span>, <a href="#_strsci_keyword_SHORT">SHORT</a>=<span class="result">SHORT</span>, <a href="#_strsci_keyword_TRIM">TRIM</a>=<span class="result">TRIM</span>)</p> |
---|
113 | |
---|
114 | <div class="comments"> |
---|
115 | </div> |
---|
116 | |
---|
117 | |
---|
118 | |
---|
119 | |
---|
120 | <h3>Parameters</h3> |
---|
121 | |
---|
122 | |
---|
123 | <h4 id="_strsci_param_data">data |
---|
124 | <span class="attr">in</span> |
---|
125 | |
---|
126 | |
---|
127 | <span class="attr">required</span> |
---|
128 | |
---|
129 | |
---|
130 | |
---|
131 | |
---|
132 | </h4> |
---|
133 | |
---|
134 | <div class="comments"> |
---|
135 | A floating point or integer number to be |
---|
136 | converted into a power of 10. |
---|
137 | </div> |
---|
138 | |
---|
139 | |
---|
140 | |
---|
141 | |
---|
142 | |
---|
143 | |
---|
144 | <h3>Keywords</h3> |
---|
145 | |
---|
146 | <h4 id="_strsci_keyword_FORMAT">FORMAT |
---|
147 | |
---|
148 | |
---|
149 | |
---|
150 | |
---|
151 | |
---|
152 | |
---|
153 | <span class="attr">default:</span> <span class="value">'(f12.2)'</span> |
---|
154 | |
---|
155 | </h4> |
---|
156 | |
---|
157 | <div class="comments"> |
---|
158 | The format specification used in the string |
---|
159 | conversion for the mantissa (i.e. the |
---|
160 | "A" of "A x 10^B"). |
---|
161 | </div> |
---|
162 | |
---|
163 | <h4 id="_strsci_keyword_POT_ONLY">POT_ONLY |
---|
164 | |
---|
165 | |
---|
166 | |
---|
167 | |
---|
168 | |
---|
169 | |
---|
170 | |
---|
171 | |
---|
172 | </h4> |
---|
173 | |
---|
174 | <div class="comments"> |
---|
175 | Will return only the "power of 10" part of the |
---|
176 | string (i.e. the "10^B"). Default is to return |
---|
177 | the entire string (e.g. "A x 10^B" ) |
---|
178 | </div> |
---|
179 | |
---|
180 | <h4 id="_strsci_keyword_MANTISSA_ONLY">MANTISSA_ONLY |
---|
181 | |
---|
182 | |
---|
183 | |
---|
184 | |
---|
185 | |
---|
186 | |
---|
187 | |
---|
188 | |
---|
189 | </h4> |
---|
190 | |
---|
191 | <div class="comments"> |
---|
192 | return only mantissa of the string |
---|
193 | </div> |
---|
194 | |
---|
195 | <h4 id="_strsci_keyword_SHORT">SHORT |
---|
196 | |
---|
197 | |
---|
198 | |
---|
199 | |
---|
200 | |
---|
201 | |
---|
202 | |
---|
203 | |
---|
204 | </h4> |
---|
205 | |
---|
206 | <div class="comments"> |
---|
207 | return 10^0 as '1' and 10^1 as '10' |
---|
208 | </div> |
---|
209 | |
---|
210 | <h4 id="_strsci_keyword_TRIM">TRIM |
---|
211 | |
---|
212 | |
---|
213 | |
---|
214 | |
---|
215 | |
---|
216 | |
---|
217 | |
---|
218 | |
---|
219 | </h4> |
---|
220 | |
---|
221 | <div class="comments"> |
---|
222 | don't insert blanks (i.e. return Ax10^B) |
---|
223 | </div> |
---|
224 | |
---|
225 | |
---|
226 | |
---|
227 | <h3>Examples</h3><div class="preformat"> |
---|
228 | |
---|
229 | IDL> Result = STRSCI( 2000000, format='(i1)' ) |
---|
230 | IDL> print, result |
---|
231 | 2 x 10!u6!n |
---|
232 | |
---|
233 | which gets plotted as 2 x 10 |
---|
234 | |
---|
235 | IDL> Result = STRSCI( -0.0001 ) |
---|
236 | IDL> print, result |
---|
237 | -1.00 x 10!u-4!n |
---|
238 | |
---|
239 | which gets plotted as 1.00 x 10 |
---|
240 | |
---|
241 | IDL> Result = STRSCI( 0d0, format='(f13.8)' ) |
---|
242 | IDL> print, result |
---|
243 | 0.00000000 |
---|
244 | |
---|
245 | </div> |
---|
246 | <h3>Version history</h3> |
---|
247 | |
---|
248 | <h4>Version</h4><div class="preformat"> |
---|
249 | $Id: strsci.pro 374 2008-08-08 15:12:27Z pinsard $ |
---|
250 | |
---|
251 | Copyright (C) 1998, 1999 Bob Yantosca and Martin Schultz, |
---|
252 | Harvard University |
---|
253 | This software is provided as is without any warranty |
---|
254 | whatsoever. It may be freely used, copied or distributed |
---|
255 | for non-commercial purposes. This copyright notice must be |
---|
256 | kept with any copy of this software. If this software shall |
---|
257 | be used commercially or sold as part of a larger package, |
---|
258 | please contact the author to arrange payment. |
---|
259 | Bugs and comments should be directed to bmy@io.harvard.edu |
---|
260 | or mgs@io.harvard.edu with subject "IDL routine strsci"</div> |
---|
261 | <h4>History</h4><div class="preformat"> |
---|
262 | bmy, 28 May 1998: VERSION 1.00 B |
---|
263 | - now returns string of the form A x 10 |
---|
264 | mgs, 29 May 1998: |
---|
265 | - bug fix: now allows negative numbers |
---|
266 | - keyword MANTISSA_ONLY added |
---|
267 | - default format changed to f12.2 |
---|
268 | bmy, 02 Jun 1998: |
---|
269 | - renamed to STRSCI ("STRing SCIentific notation"), |
---|
270 | mgs, 03 Jun 1998: |
---|
271 | - added TRIM keyword |
---|
272 | mgs, 22 Sep 1998: |
---|
273 | - added SHORT keyword |
---|
274 | - modified handling of TRIM keyword |
---|
275 | mgs, 24 Sep 1998: |
---|
276 | - bug fix with SHORT flag |
---|
277 | bmy & mgs, 02 Jun 1999: |
---|
278 | - now can handle DATA=0.0 correctly |
---|
279 | - updated comments |
---|
280 | mgs, 03 Jun 1999: |
---|
281 | - can now also handle values lt 1 ;-) |
---|
282 | - and doesn't choke on arrays |
---|
283 | </div> |
---|
284 | |
---|
285 | |
---|
286 | <h3>Known issues</h3> |
---|
287 | |
---|
288 | |
---|
289 | |
---|
290 | <h4>Restrictions</h4><div class="preformat"> |
---|
291 | This function does not "evaluate" the format statement thoroughly |
---|
292 | which can result in somewhat quirky strings. Example: |
---|
293 | print,strsci(-9.999) results in -10.0x10^0 instead of -1.0x10^1. |
---|
294 | |
---|
295 | Need a better symbol than the 'x' for the multiplier... |
---|
296 | </div> |
---|
297 | |
---|
298 | |
---|
299 | |
---|
300 | |
---|
301 | |
---|
302 | |
---|
303 | |
---|
304 | |
---|
305 | |
---|
306 | <h3>Statistics</h3> |
---|
307 | <table class="statistics"> |
---|
308 | <tr><td>McCabe cyclic</td><td> 15</td></tr> |
---|
309 | <tr><td>McCabe essential</td><td> 1</td></tr> |
---|
310 | <tr><td>McCabe modular design</td><td> 1</td></tr> |
---|
311 | </table> |
---|
312 | |
---|
313 | |
---|
314 | </div> |
---|
315 | |
---|
316 | </div> |
---|
317 | |
---|
318 | |
---|
319 | |
---|
320 | <div id="tagline">Produced by IDLdoc 2.0.</div> |
---|
321 | |
---|
322 | </div> |
---|
323 | |
---|
324 | </body> |
---|
325 | </html> |
---|