[89] | 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> |
---|
[104] | 9 | <title>strsci.pro (SAXO Documentation)</title> |
---|
[89] | 10 | |
---|
| 11 | |
---|
[191] | 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" /> |
---|
[89] | 14 | |
---|
| 15 | |
---|
| 16 | <script type="text/javascript"> |
---|
| 17 | function setTitle() { |
---|
[104] | 18 | parent.document.title="strsci.pro (SAXO Documentation)"; |
---|
[89] | 19 | } |
---|
| 20 | </script> |
---|
| 21 | </head> |
---|
| 22 | |
---|
| 23 | <body onload="setTitle();"> |
---|
| 24 | |
---|
| 25 | <div id="navbar_title"> |
---|
[104] | 26 | <h1>SAXO Documentation</h1> |
---|
[89] | 27 | </div> |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | <div id="main_navbar"> |
---|
| 31 | |
---|
| 32 | <table cellspacing="0"> |
---|
| 33 | <tr> |
---|
| 34 | |
---|
[189] | 35 | <td><a href="./../../overview.html" title="Overview of library">Overview</a></td> |
---|
[89] | 36 | |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | <td >Directory</td> |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | |
---|
[189] | 43 | <td><a href="./../../idldoc-categories.html" title="Browse library by category">Categories</a></td> |
---|
[89] | 44 | |
---|
| 45 | |
---|
| 46 | |
---|
[189] | 47 | <td><a href="./../../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td> |
---|
[89] | 48 | |
---|
| 49 | |
---|
| 50 | |
---|
[189] | 51 | <td><a href="./../../search-page.html" title="Search library">Search</a></td> |
---|
[89] | 52 | |
---|
| 53 | |
---|
| 54 | <td id="selected">File</td> |
---|
| 55 | |
---|
| 56 | |
---|
[189] | 57 | <td><a href="../../../../ToBeReviewed/STRING//strsci.pro" title="Source code of a file">Source</a></td> |
---|
[89] | 58 | |
---|
| 59 | |
---|
| 60 | |
---|
[189] | 61 | <td><a href="./../../idldoc-help.html" title="Help on IDLdoc">Help</a></td> |
---|
[89] | 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 | |
---|
[195] | 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> |
---|
[89] | 75 | |
---|
| 76 | </div> |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | <div id="container"> |
---|
| 80 | |
---|
[189] | 81 | <h1 class="directory"><a href="directory-overview.html">ToBeReviewed/STRING/</a></h1> |
---|
[89] | 82 | <h2 class="pro_file">strsci.pro</h2> |
---|
| 83 | |
---|
| 84 | <div id="file_attr"> |
---|
| 85 | <dl> |
---|
| 86 | </dl> |
---|
| 87 | </div> |
---|
| 88 | |
---|
[142] | 89 | <div id="file_comments"> |
---|
[402] | 90 | Given a number, returns a string of that B |
---|
| 91 | number in scientific notation format ( e.g. A x 10^B ) |
---|
[142] | 92 | </div> |
---|
[89] | 93 | |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | <div id="routine_details"> |
---|
| 103 | |
---|
| 104 | |
---|
[163] | 105 | <div class="routine_details" id="_strsci"> |
---|
[89] | 106 | |
---|
[163] | 107 | <h2><a class="top" href="#container">top</a>strsci <span class="categories"> |
---|
[157] | 108 | String |
---|
[142] | 109 | </span></h2> |
---|
[89] | 110 | |
---|
| 111 | <p class="header"> |
---|
[290] | 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> |
---|
[89] | 113 | |
---|
| 114 | <div class="comments"> |
---|
| 115 | </div> |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | <h3>Parameters</h3> |
---|
| 121 | |
---|
| 122 | |
---|
[290] | 123 | <h4 id="_strsci_param_data">data |
---|
[142] | 124 | <span class="attr">in</span> |
---|
[89] | 125 | |
---|
| 126 | |
---|
[142] | 127 | <span class="attr">required</span> |
---|
[89] | 128 | |
---|
| 129 | |
---|
| 130 | |
---|
| 131 | |
---|
| 132 | </h4> |
---|
| 133 | |
---|
[142] | 134 | <div class="comments"> |
---|
| 135 | A floating point or integer number to be |
---|
| 136 | converted into a power of 10. |
---|
| 137 | </div> |
---|
[89] | 138 | |
---|
| 139 | |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | |
---|
| 143 | |
---|
| 144 | <h3>Keywords</h3> |
---|
| 145 | |
---|
[290] | 146 | <h4 id="_strsci_keyword_FORMAT">FORMAT |
---|
[89] | 147 | |
---|
| 148 | |
---|
| 149 | |
---|
| 150 | |
---|
| 151 | |
---|
| 152 | |
---|
[163] | 153 | <span class="attr">default:</span> <span class="value">'(f12.2)'</span> |
---|
[89] | 154 | |
---|
| 155 | </h4> |
---|
| 156 | |
---|
[142] | 157 | <div class="comments"> |
---|
| 158 | The format specification used in the string |
---|
| 159 | conversion for the mantissa (i.e. the |
---|
[163] | 160 | "A" of "A x 10^B"). |
---|
[142] | 161 | </div> |
---|
[89] | 162 | |
---|
[290] | 163 | <h4 id="_strsci_keyword_POT_ONLY">POT_ONLY |
---|
[89] | 164 | |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | </h4> |
---|
| 173 | |
---|
[142] | 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> |
---|
[89] | 179 | |
---|
[163] | 180 | <h4 id="_strsci_keyword_MANTISSA_ONLY">MANTISSA_ONLY |
---|
[89] | 181 | |
---|
| 182 | |
---|
| 183 | |
---|
| 184 | |
---|
| 185 | |
---|
| 186 | |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | </h4> |
---|
| 190 | |
---|
[142] | 191 | <div class="comments"> |
---|
| 192 | return only mantissa of the string |
---|
| 193 | </div> |
---|
[89] | 194 | |
---|
[163] | 195 | <h4 id="_strsci_keyword_SHORT">SHORT |
---|
[89] | 196 | |
---|
| 197 | |
---|
| 198 | |
---|
| 199 | |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | |
---|
| 203 | |
---|
| 204 | </h4> |
---|
| 205 | |
---|
[142] | 206 | <div class="comments"> |
---|
| 207 | return 10^0 as '1' and 10^1 as '10' |
---|
| 208 | </div> |
---|
[89] | 209 | |
---|
[163] | 210 | <h4 id="_strsci_keyword_TRIM">TRIM |
---|
[89] | 211 | |
---|
| 212 | |
---|
| 213 | |
---|
| 214 | |
---|
| 215 | |
---|
| 216 | |
---|
| 217 | |
---|
| 218 | |
---|
| 219 | </h4> |
---|
| 220 | |
---|
[142] | 221 | <div class="comments"> |
---|
| 222 | don't insert blanks (i.e. return Ax10^B) |
---|
| 223 | </div> |
---|
[89] | 224 | |
---|
| 225 | |
---|
| 226 | |
---|
[142] | 227 | <h3>Examples</h3><div class="preformat"> |
---|
[402] | 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 |
---|
[142] | 234 | |
---|
[402] | 235 | IDL> Result = STRSCI( -0.0001 ) |
---|
| 236 | IDL> print, result |
---|
| 237 | -1.00 x 10!u-4!n |
---|
[142] | 238 | |
---|
[402] | 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 |
---|
[142] | 244 | |
---|
| 245 | </div> |
---|
| 246 | <h3>Version history</h3> |
---|
[89] | 247 | |
---|
[142] | 248 | <h4>Version</h4><div class="preformat"> |
---|
[402] | 249 | $Id: strsci.pro 374 2008-08-08 15:12:27Z pinsard $ |
---|
[290] | 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> |
---|
[142] | 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> |
---|
[89] | 284 | |
---|
| 285 | |
---|
[142] | 286 | <h3>Known issues</h3> |
---|
[89] | 287 | |
---|
| 288 | |
---|
| 289 | |
---|
[142] | 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> |
---|
[89] | 297 | |
---|
| 298 | |
---|
| 299 | |
---|
| 300 | |
---|
| 301 | |
---|
| 302 | |
---|
| 303 | |
---|
| 304 | |
---|
| 305 | |
---|
[163] | 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> |
---|
[89] | 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> |
---|
[249] | 325 | </html> |
---|