[163] | 1 | |
---|
| 2 | |
---|
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
| 4 | <head> |
---|
| 5 | <title>strsci.pro (SAXO Documentation Assistant)</title> |
---|
| 6 | </head> |
---|
| 7 | |
---|
| 8 | <body text="#000000" bgcolor="#FFFFFF"> |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | <!-- Navbar template takes a structure with the following fields: |
---|
| 12 | overview_href : |
---|
| 13 | overview_selected : |
---|
| 14 | dir_overview_href : |
---|
| 15 | dir_overview_selected : |
---|
| 16 | categories_href : |
---|
| 17 | categories_selected : |
---|
| 18 | index_href : |
---|
| 19 | index_selected : |
---|
| 20 | search_href : |
---|
| 21 | search_selected : |
---|
| 22 | file_selected : |
---|
| 23 | source_href : |
---|
| 24 | source_selected : |
---|
| 25 | help_href : |
---|
| 26 | help_selected : |
---|
| 27 | etc_selected : |
---|
| 28 | |
---|
| 29 | prev_file_href : |
---|
| 30 | next_file_href : |
---|
| 31 | |
---|
| 32 | view_single_page_href : |
---|
| 33 | view_frames_href : |
---|
| 34 | |
---|
| 35 | summary_fields_href : |
---|
| 36 | summary_routine_href : |
---|
| 37 | details_routine_href : |
---|
| 38 | |
---|
| 39 | title : |
---|
| 40 | subtitle : |
---|
| 41 | user : |
---|
| 42 | --> |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | <table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom"> |
---|
| 46 | <tr> |
---|
| 47 | <td width="10%"> |
---|
| 48 | <a href="strright.html"><img src="./../../prev.gif" border="0" alt="Previous"></a></td> |
---|
| 49 | <td width="80%" align="center" valign="center"> |
---|
| 50 | <font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../../home.html">Overview</a></font></td> |
---|
| 51 | <td width="10%" align="right"> |
---|
[195] | 52 | <a href="strsed.html"><img src="./../../next.gif" border="0" alt="Next"></a></td> |
---|
[163] | 53 | </tr> |
---|
| 54 | </table> |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | <h1><font size="-2">ToBeReviewed/STRING/</font></h1> |
---|
| 58 | <h2>strsci.pro</h2> |
---|
| 59 | |
---|
| 60 | <dl> |
---|
| 61 | </dl> |
---|
| 62 | |
---|
| 63 | |
---|
[402] | 64 | Given a number, returns a string of that B |
---|
| 65 | number in scientific notation format ( e.g. A x 10^B ) |
---|
[163] | 66 | |
---|
| 67 | |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | <a name="#_strsci"></a> |
---|
| 72 | |
---|
| 73 | <h2>strsci <font size="-1" color="#006633"> |
---|
| 74 | String |
---|
| 75 | </font></h2> |
---|
| 76 | |
---|
[290] | 77 | <p><font face="Courier"><i>result = </i>strsci(<i><a href="#_strsci_keyword_data">data</a></i>, <a href="#_strsci_keyword_FORMAT">FORMAT</a>=<i>FORMAT</i>, <a href="#_strsci_keyword_POT_ONLY">POT_ONLY</a>=<i>POT_ONLY</i>, <a href="#_strsci_keyword_MANTISSA_ONLY">MANTISSA_ONLY</a>=<i>MANTISSA_ONLY</i>, <a href="#_strsci_keyword_SHORT">SHORT</a>=<i>SHORT</i>, <a href="#_strsci_keyword_TRIM">TRIM</a>=<i>TRIM</i>)</font></p> |
---|
[163] | 78 | |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | |
---|
| 85 | <h3>Parameters</h3> |
---|
| 86 | |
---|
| 87 | |
---|
[290] | 88 | <a name="#_strsci_keyword_data"></a> |
---|
| 89 | <h4>data |
---|
[163] | 90 | <font size="-1" color="#006633">in</font> |
---|
| 91 | |
---|
| 92 | |
---|
| 93 | <font size="-1" color="#006633">required</font> |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | </h4> |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | A floating point or integer number to be |
---|
| 102 | converted into a power of 10. |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | <h3>Keywords</h3> |
---|
| 109 | |
---|
| 110 | |
---|
[290] | 111 | <a name="#_strsci_keyword_FORMAT"></a> |
---|
| 112 | <h4>FORMAT |
---|
[163] | 113 | |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>'(f12.2)'</i></font> |
---|
| 120 | |
---|
| 121 | </h4> |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | The format specification used in the string |
---|
| 125 | conversion for the mantissa (i.e. the |
---|
| 126 | "A" of "A x 10^B"). |
---|
| 127 | |
---|
| 128 | |
---|
[290] | 129 | <a name="#_strsci_keyword_POT_ONLY"></a> |
---|
| 130 | <h4>POT_ONLY |
---|
[163] | 131 | |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | |
---|
| 139 | </h4> |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | Will return only the "power of 10" part of the |
---|
| 143 | string (i.e. the "10^B"). Default is to return |
---|
| 144 | the entire string (e.g. "A x 10^B" ) |
---|
| 145 | |
---|
| 146 | |
---|
| 147 | <a name="#_strsci_keyword_MANTISSA_ONLY"></a> |
---|
| 148 | <h4>MANTISSA_ONLY |
---|
| 149 | |
---|
| 150 | |
---|
| 151 | |
---|
| 152 | |
---|
| 153 | |
---|
| 154 | |
---|
| 155 | |
---|
| 156 | |
---|
| 157 | </h4> |
---|
| 158 | |
---|
| 159 | |
---|
| 160 | return only mantissa of the string |
---|
| 161 | |
---|
| 162 | |
---|
| 163 | <a name="#_strsci_keyword_SHORT"></a> |
---|
| 164 | <h4>SHORT |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | |
---|
| 173 | </h4> |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | return 10^0 as '1' and 10^1 as '10' |
---|
| 177 | |
---|
| 178 | |
---|
| 179 | <a name="#_strsci_keyword_TRIM"></a> |
---|
| 180 | <h4>TRIM |
---|
| 181 | |
---|
| 182 | |
---|
| 183 | |
---|
| 184 | |
---|
| 185 | |
---|
| 186 | |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | </h4> |
---|
| 190 | |
---|
| 191 | |
---|
| 192 | don't insert blanks (i.e. return Ax10^B) |
---|
| 193 | |
---|
| 194 | |
---|
| 195 | |
---|
| 196 | |
---|
[234] | 197 | <h3>Examples</h3><pre> |
---|
[402] | 198 | |
---|
| 199 | IDL> Result = STRSCI( 2000000, format='(i1)' ) |
---|
| 200 | IDL> print, result |
---|
| 201 | 2 x 10!u6!n |
---|
| 202 | |
---|
| 203 | which gets plotted as 2 x 10 |
---|
[163] | 204 | |
---|
[402] | 205 | IDL> Result = STRSCI( -0.0001 ) |
---|
| 206 | IDL> print, result |
---|
| 207 | -1.00 x 10!u-4!n |
---|
[163] | 208 | |
---|
[402] | 209 | which gets plotted as 1.00 x 10 |
---|
| 210 | |
---|
| 211 | IDL> Result = STRSCI( 0d0, format='(f13.8)' ) |
---|
| 212 | IDL> print, result |
---|
| 213 | 0.00000000 |
---|
[163] | 214 | |
---|
| 215 | |
---|
[234] | 216 | </pre><h3>Version history</h3> |
---|
[163] | 217 | |
---|
| 218 | <h4>Version</h4> |
---|
[402] | 219 | $Id: strsci.pro 374 2008-08-08 15:12:27Z pinsard $ |
---|
[163] | 220 | |
---|
[290] | 221 | Copyright (C) 1998, 1999 Bob Yantosca and Martin Schultz, |
---|
| 222 | Harvard University |
---|
| 223 | This software is provided as is without any warranty |
---|
| 224 | whatsoever. It may be freely used, copied or distributed |
---|
| 225 | for non-commercial purposes. This copyright notice must be |
---|
| 226 | kept with any copy of this software. If this software shall |
---|
| 227 | be used commercially or sold as part of a larger package, |
---|
| 228 | please contact the author to arrange payment. |
---|
| 229 | Bugs and comments should be directed to bmy@io.harvard.edu |
---|
| 230 | or mgs@io.harvard.edu with subject "IDL routine strsci" |
---|
[163] | 231 | <h4>History</h4> |
---|
| 232 | bmy, 28 May 1998: VERSION 1.00 B |
---|
| 233 | - now returns string of the form A x 10 |
---|
| 234 | mgs, 29 May 1998: |
---|
| 235 | - bug fix: now allows negative numbers |
---|
| 236 | - keyword MANTISSA_ONLY added |
---|
| 237 | - default format changed to f12.2 |
---|
| 238 | bmy, 02 Jun 1998: |
---|
| 239 | - renamed to STRSCI ("STRing SCIentific notation"), |
---|
| 240 | mgs, 03 Jun 1998: |
---|
| 241 | - added TRIM keyword |
---|
| 242 | mgs, 22 Sep 1998: |
---|
| 243 | - added SHORT keyword |
---|
| 244 | - modified handling of TRIM keyword |
---|
| 245 | mgs, 24 Sep 1998: |
---|
| 246 | - bug fix with SHORT flag |
---|
| 247 | bmy & mgs, 02 Jun 1999: |
---|
| 248 | - now can handle DATA=0.0 correctly |
---|
| 249 | - updated comments |
---|
| 250 | mgs, 03 Jun 1999: |
---|
| 251 | - can now also handle values lt 1 ;-) |
---|
| 252 | - and doesn't choke on arrays |
---|
| 253 | |
---|
| 254 | |
---|
| 255 | |
---|
| 256 | <h3>Known issues</h3> |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | |
---|
| 260 | <h4>Restrictions</h4> |
---|
| 261 | This function does not "evaluate" the format statement thoroughly |
---|
| 262 | which can result in somewhat quirky strings. Example: |
---|
| 263 | print,strsci(-9.999) results in -10.0x10^0 instead of -1.0x10^1. |
---|
| 264 | |
---|
| 265 | Need a better symbol than the 'x' for the multiplier... |
---|
| 266 | |
---|
| 267 | |
---|
| 268 | |
---|
| 269 | |
---|
| 270 | |
---|
| 271 | |
---|
| 272 | |
---|
| 273 | |
---|
| 274 | |
---|
| 275 | |
---|
| 276 | <font size="-3"><p> </p></font> |
---|
| 277 | <hr size="1" color="#CCCCCC"/> |
---|
| 278 | |
---|
| 279 | |
---|
| 280 | |
---|
| 281 | |
---|
[187] | 282 | <p><font color="gray" size="-3"> Produced by IDLdoc 2.0.</font></p> |
---|
[163] | 283 | |
---|
| 284 | </body> |
---|
[249] | 285 | </html> |
---|