Changes in / [b5e9ce26:68adf86] in sasview
- Files:
-
- 1 added
- 1 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r51f1c347 r5dd7499 14 14 .vagrant 15 15 .idea 16 .settings/17 16 build 18 17 dist -
docs/sphinx-docs/source/conf.py
r220b1e7 r9a182b2 53 53 # General information about the project. 54 54 project = u'SasView' 55 copyright = u'201 7, The SasView Project'55 copyright = u'2015, The SasView Project' 56 56 57 57 # The version info for the project you're documenting, acts as replacement for … … 60 60 # 61 61 # The short X.Y version. 62 version = '4. 1'62 version = '4.0' 63 63 # The full version, including alpha/beta/rc tags. 64 release = '4. 1.0'64 release = '4.0.0' 65 65 66 66 # The language for content autogenerated by Sphinx. Refer to documentation -
sasview/README.txt
r220b1e7 r9a182b2 4 4 1- Features 5 5 =========== 6 - New in Version 4.0.17 ------------------8 This release fixes the critical bug #750 in P(Q)*S(Q). Most damaging9 it appears that the background term was being added to S(Q) prior to10 multiplication by P(Q).11 12 13 6 - New in Version 4.0 14 7 ------------------ -
sasview/__init__.py
r220b1e7 r9a182b2 1 __version__ = "4. 1"1 __version__ = "4.0" 2 2 __build__ = "GIT_COMMIT" 3 3 try: -
sasview/test/save_states/fitstate.fitv
r406644a rbbb8a56 2 2 <SASroot version="1.0" xmlns="cansas1d/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd"> 3 3 <SASentry> 4 <Title>latex particles 0.5micron diameter in D2O slit</Title> 5 <Run>latex_smeared.xml </Run> 4 <Title> 5 1000A Sphere Desmeared Simulated USANS Data 6 </Title> 7 <Run> 8 1000A_sphere_dsm.xml 9 </Run> 6 10 <SASdata> 7 11 <Idata> 8 <Q unit="1/A">7.7457e-05</Q> 9 <I unit="1/cm">8432.04</I> 10 <Idev unit="1/cm">153.745</Idev> 11 <dQw unit="1/A">0.0</dQw> 12 <dQl unit="1/A">0.117</dQl> 13 </Idata> 14 <Idata> 15 <Q unit="1/A">8.3007e-05</Q> 16 <I unit="1/cm">8298.38</I> 17 <Idev unit="1/cm">152.01</Idev> 18 <dQw unit="1/A">0.0</dQw> 19 <dQl unit="1/A">0.117</dQl> 20 </Idata> 21 <Idata> 22 <Q unit="1/A">8.8557e-05</Q> 23 <I unit="1/cm">8091.51</I> 24 <Idev unit="1/cm">149.908</Idev> 25 <dQw unit="1/A">0.0</dQw> 26 <dQl unit="1/A">0.117</dQl> 27 </Idata> 28 <Idata> 29 <Q unit="1/A">9.4107e-05</Q> 30 <I unit="1/cm">7947.7</I> 31 <Idev unit="1/cm">148.184</Idev> 32 <dQw unit="1/A">0.0</dQw> 33 <dQl unit="1/A">0.117</dQl> 34 </Idata> 35 <Idata> 36 <Q unit="1/A">9.9657e-05</Q> 37 <I unit="1/cm">8174.04</I> 38 <Idev unit="1/cm">149.824</Idev> 39 <dQw unit="1/A">0.0</dQw> 40 <dQl unit="1/A">0.117</dQl> 41 </Idata> 42 <Idata> 43 <Q unit="1/A">0.000105207</Q> 44 <I unit="1/cm">7890.52</I> 45 <Idev unit="1/cm">147.061</Idev> 46 <dQw unit="1/A">0.0</dQw> 47 <dQl unit="1/A">0.117</dQl> 48 </Idata> 49 <Idata> 50 <Q unit="1/A">0.000110757</Q> 51 <I unit="1/cm">8067.04</I> 52 <Idev unit="1/cm">74.9155</Idev> 53 <dQw unit="1/A">0.0</dQw> 54 <dQl unit="1/A">0.117</dQl> 55 </Idata> 56 <Idata> 57 <Q unit="1/A">0.000121857</Q> 58 <I unit="1/cm">7995.24</I> 59 <Idev unit="1/cm">74.0244</Idev> 60 <dQw unit="1/A">0.0</dQw> 61 <dQl unit="1/A">0.117</dQl> 62 </Idata> 63 <Idata> 64 <Q unit="1/A">0.000132957</Q> 65 <I unit="1/cm">7969.3</I> 66 <Idev unit="1/cm">73.7818</Idev> 67 <dQw unit="1/A">0.0</dQw> 68 <dQl unit="1/A">0.117</dQl> 69 </Idata> 70 <Idata> 71 <Q unit="1/A">0.000144057</Q> 72 <I unit="1/cm">7953.56</I> 73 <Idev unit="1/cm">73.6532</Idev> 74 <dQw unit="1/A">0.0</dQw> 75 <dQl unit="1/A">0.117</dQl> 76 </Idata> 77 <Idata> 78 <Q unit="1/A">0.000155157</Q> 79 <I unit="1/cm">7896.35</I> 80 <Idev unit="1/cm">73.3392</Idev> 81 <dQw unit="1/A">0.0</dQw> 82 <dQl unit="1/A">0.117</dQl> 83 </Idata> 84 <Idata> 85 <Q unit="1/A">0.000166257</Q> 86 <I unit="1/cm">7877.91</I> 87 <Idev unit="1/cm">73.1936</Idev> 88 <dQw unit="1/A">0.0</dQw> 89 <dQl unit="1/A">0.117</dQl> 90 </Idata> 91 <Idata> 92 <Q unit="1/A">0.000177357</Q> 93 <I unit="1/cm">7769.46</I> 94 <Idev unit="1/cm">72.6739</Idev> 95 <dQw unit="1/A">0.0</dQw> 96 <dQl unit="1/A">0.117</dQl> 97 </Idata> 98 <Idata> 99 <Q unit="1/A">0.000188457</Q> 100 <I unit="1/cm">7746.93</I> 101 <Idev unit="1/cm">72.5899</Idev> 102 <dQw unit="1/A">0.0</dQw> 103 <dQl unit="1/A">0.117</dQl> 104 </Idata> 105 <Idata> 106 <Q unit="1/A">0.000199557</Q> 107 <I unit="1/cm">7820.8</I> 108 <Idev unit="1/cm">72.9063</Idev> 109 <dQw unit="1/A">0.0</dQw> 110 <dQl unit="1/A">0.117</dQl> 111 </Idata> 112 <Idata> 113 <Q unit="1/A">0.000210657</Q> 114 <I unit="1/cm">7656.83</I> 115 <Idev unit="1/cm">72.1007</Idev> 116 <dQw unit="1/A">0.0</dQw> 117 <dQl unit="1/A">0.117</dQl> 118 </Idata> 119 <Idata> 120 <Q unit="1/A">0.000221757</Q> 121 <I unit="1/cm">7777.33</I> 122 <Idev unit="1/cm">72.6551</Idev> 123 <dQw unit="1/A">0.0</dQw> 124 <dQl unit="1/A">0.117</dQl> 125 </Idata> 126 <Idata> 127 <Q unit="1/A">0.000232857</Q> 128 <I unit="1/cm">7613.01</I> 129 <Idev unit="1/cm">71.8768</Idev> 130 <dQw unit="1/A">0.0</dQw> 131 <dQl unit="1/A">0.117</dQl> 132 </Idata> 133 <Idata> 134 <Q unit="1/A">0.000243957</Q> 135 <I unit="1/cm">7498.28</I> 136 <Idev unit="1/cm">71.316</Idev> 137 <dQw unit="1/A">0.0</dQw> 138 <dQl unit="1/A">0.117</dQl> 139 </Idata> 140 <Idata> 141 <Q unit="1/A">0.000255057</Q> 142 <I unit="1/cm">7494.75</I> 143 <Idev unit="1/cm">71.2836</Idev> 144 <dQw unit="1/A">0.0</dQw> 145 <dQl unit="1/A">0.117</dQl> 146 </Idata> 147 <Idata> 148 <Q unit="1/A">0.000266157</Q> 149 <I unit="1/cm">7266.92</I> 150 <Idev unit="1/cm">70.182</Idev> 151 <dQw unit="1/A">0.0</dQw> 152 <dQl unit="1/A">0.117</dQl> 153 </Idata> 154 <Idata> 155 <Q unit="1/A">0.000277257</Q> 156 <I unit="1/cm">7292.37</I> 157 <Idev unit="1/cm">57.4236</Idev> 158 <dQw unit="1/A">0.0</dQw> 159 <dQl unit="1/A">0.117</dQl> 160 </Idata> 161 <Idata> 162 <Q unit="1/A">0.000305007</Q> 163 <I unit="1/cm">7214.55</I> 164 <Idev unit="1/cm">57.0526</Idev> 165 <dQw unit="1/A">0.0</dQw> 166 <dQl unit="1/A">0.117</dQl> 167 </Idata> 168 <Idata> 169 <Q unit="1/A">0.000332757</Q> 170 <I unit="1/cm">7103.18</I> 171 <Idev unit="1/cm">56.5915</Idev> 172 <dQw unit="1/A">0.0</dQw> 173 <dQl unit="1/A">0.117</dQl> 174 </Idata> 175 <Idata> 176 <Q unit="1/A">0.000360507</Q> 177 <I unit="1/cm">6883.81</I> 178 <Idev unit="1/cm">55.7205</Idev> 179 <dQw unit="1/A">0.0</dQw> 180 <dQl unit="1/A">0.117</dQl> 181 </Idata> 182 <Idata> 183 <Q unit="1/A">0.000388257</Q> 184 <I unit="1/cm">6818.14</I> 185 <Idev unit="1/cm">55.4232</Idev> 186 <dQw unit="1/A">0.0</dQw> 187 <dQl unit="1/A">0.117</dQl> 188 </Idata> 189 <Idata> 190 <Q unit="1/A">0.000416007</Q> 191 <I unit="1/cm">6591.98</I> 192 <Idev unit="1/cm">54.4991</Idev> 193 <dQw unit="1/A">0.0</dQw> 194 <dQl unit="1/A">0.117</dQl> 195 </Idata> 196 <Idata> 197 <Q unit="1/A">0.000443757</Q> 198 <I unit="1/cm">6420.5</I> 199 <Idev unit="1/cm">53.7756</Idev> 200 <dQw unit="1/A">0.0</dQw> 201 <dQl unit="1/A">0.117</dQl> 202 </Idata> 203 <Idata> 204 <Q unit="1/A">0.000471507</Q> 205 <I unit="1/cm">6120.15</I> 206 <Idev unit="1/cm">52.5042</Idev> 207 <dQw unit="1/A">0.0</dQw> 208 <dQl unit="1/A">0.117</dQl> 209 </Idata> 210 <Idata> 211 <Q unit="1/A">0.000499257</Q> 212 <I unit="1/cm">5950.12</I> 213 <Idev unit="1/cm">51.7582</Idev> 214 <dQw unit="1/A">0.0</dQw> 215 <dQl unit="1/A">0.117</dQl> 216 </Idata> 217 <Idata> 218 <Q unit="1/A">0.000527007</Q> 219 <I unit="1/cm">5792.76</I> 220 <Idev unit="1/cm">51.0591</Idev> 221 <dQw unit="1/A">0.0</dQw> 222 <dQl unit="1/A">0.117</dQl> 223 </Idata> 224 <Idata> 225 <Q unit="1/A">0.000554757</Q> 226 <I unit="1/cm">5524.39</I> 227 <Idev unit="1/cm">43.2058</Idev> 228 <dQw unit="1/A">0.0</dQw> 229 <dQl unit="1/A">0.117</dQl> 230 </Idata> 231 <Idata> 232 <Q unit="1/A">0.000610257</Q> 233 <I unit="1/cm">5127.92</I> 234 <Idev unit="1/cm">41.599</Idev> 235 <dQw unit="1/A">0.0</dQw> 236 <dQl unit="1/A">0.117</dQl> 237 </Idata> 238 <Idata> 239 <Q unit="1/A">0.000665757</Q> 240 <I unit="1/cm">4753.49</I> 241 <Idev unit="1/cm">40.0733</Idev> 242 <dQw unit="1/A">0.0</dQw> 243 <dQl unit="1/A">0.117</dQl> 244 </Idata> 245 <Idata> 246 <Q unit="1/A">0.000721257</Q> 247 <I unit="1/cm">4355.25</I> 248 <Idev unit="1/cm">38.3487</Idev> 249 <dQw unit="1/A">0.0</dQw> 250 <dQl unit="1/A">0.117</dQl> 251 </Idata> 252 <Idata> 253 <Q unit="1/A">0.000776757</Q> 254 <I unit="1/cm">3878.25</I> 255 <Idev unit="1/cm">36.2076</Idev> 256 <dQw unit="1/A">0.0</dQw> 257 <dQl unit="1/A">0.117</dQl> 258 </Idata> 259 <Idata> 260 <Q unit="1/A">0.000832257</Q> 261 <I unit="1/cm">3471.25</I> 262 <Idev unit="1/cm">34.2637</Idev> 263 <dQw unit="1/A">0.0</dQw> 264 <dQl unit="1/A">0.117</dQl> 265 </Idata> 266 <Idata> 267 <Q unit="1/A">0.000887757</Q> 268 <I unit="1/cm">3022.77</I> 269 <Idev unit="1/cm">31.9597</Idev> 270 <dQw unit="1/A">0.0</dQw> 271 <dQl unit="1/A">0.117</dQl> 272 </Idata> 273 <Idata> 274 <Q unit="1/A">0.000943257</Q> 275 <I unit="1/cm">2600.33</I> 276 <Idev unit="1/cm">29.6463</Idev> 277 <dQw unit="1/A">0.0</dQw> 278 <dQl unit="1/A">0.117</dQl> 279 </Idata> 280 <Idata> 281 <Q unit="1/A">0.000998757</Q> 282 <I unit="1/cm">2309.11</I> 283 <Idev unit="1/cm">27.9459</Idev> 284 <dQw unit="1/A">0.0</dQw> 285 <dQl unit="1/A">0.117</dQl> 286 </Idata> 287 <Idata> 288 <Q unit="1/A">0.00105426</Q> 289 <I unit="1/cm">1975.45</I> 290 <Idev unit="1/cm">25.8603</Idev> 291 <dQw unit="1/A">0.0</dQw> 292 <dQl unit="1/A">0.117</dQl> 293 </Idata> 294 <Idata> 295 <Q unit="1/A">0.00110976</Q> 296 <I unit="1/cm">1701.57</I> 297 <Idev unit="1/cm">21.4532</Idev> 298 <dQw unit="1/A">0.0</dQw> 299 <dQl unit="1/A">0.117</dQl> 300 </Idata> 301 <Idata> 302 <Q unit="1/A">0.00122076</Q> 303 <I unit="1/cm">1156.72</I> 304 <Idev unit="1/cm">17.7038</Idev> 305 <dQw unit="1/A">0.0</dQw> 306 <dQl unit="1/A">0.117</dQl> 307 </Idata> 308 <Idata> 309 <Q unit="1/A">0.00133176</Q> 310 <I unit="1/cm">748.659</I> 311 <Idev unit="1/cm">14.2685</Idev> 312 <dQw unit="1/A">0.0</dQw> 313 <dQl unit="1/A">0.117</dQl> 314 </Idata> 315 <Idata> 316 <Q unit="1/A">0.00144276</Q> 317 <I unit="1/cm">465.515</I> 318 <Idev unit="1/cm">11.2799</Idev> 319 <dQw unit="1/A">0.0</dQw> 320 <dQl unit="1/A">0.117</dQl> 321 </Idata> 322 <Idata> 323 <Q unit="1/A">0.00155376</Q> 324 <I unit="1/cm">252.307</I> 325 <Idev unit="1/cm">8.35705</Idev> 326 <dQw unit="1/A">0.0</dQw> 327 <dQl unit="1/A">0.117</dQl> 328 </Idata> 329 <Idata> 330 <Q unit="1/A">0.00166476</Q> 331 <I unit="1/cm">157.822</I> 332 <Idev unit="1/cm">6.66382</Idev> 333 <dQw unit="1/A">0.0</dQw> 334 <dQl unit="1/A">0.117</dQl> 335 </Idata> 336 <Idata> 337 <Q unit="1/A">0.00177576</Q> 338 <I unit="1/cm">117.146</I> 339 <Idev unit="1/cm">5.78352</Idev> 340 <dQw unit="1/A">0.0</dQw> 341 <dQl unit="1/A">0.117</dQl> 342 </Idata> 343 <Idata> 344 <Q unit="1/A">0.00188676</Q> 345 <I unit="1/cm">93.1465</I> 346 <Idev unit="1/cm">5.19397</Idev> 347 <dQw unit="1/A">0.0</dQw> 348 <dQl unit="1/A">0.117</dQl> 349 </Idata> 350 <Idata> 351 <Q unit="1/A">0.00199776</Q> 352 <I unit="1/cm">103.864</I> 353 <Idev unit="1/cm">5.46342</Idev> 354 <dQw unit="1/A">0.0</dQw> 355 <dQl unit="1/A">0.117</dQl> 356 </Idata> 357 <Idata> 358 <Q unit="1/A">0.00210876</Q> 359 <I unit="1/cm">128.147</I> 360 <Idev unit="1/cm">6.0333</Idev> 361 <dQw unit="1/A">0.0</dQw> 362 <dQl unit="1/A">0.117</dQl> 363 </Idata> 364 <Idata> 365 <Q unit="1/A">0.00221976</Q> 366 <I unit="1/cm">135.96</I> 367 <Idev unit="1/cm">6.20529</Idev> 368 <dQw unit="1/A">0.0</dQw> 369 <dQl unit="1/A">0.117</dQl> 370 </Idata> 371 <Idata> 372 <Q unit="1/A">0.00233076</Q> 373 <I unit="1/cm">138.712</I> 374 <Idev unit="1/cm">6.26599</Idev> 375 <dQw unit="1/A">0.0</dQw> 376 <dQl unit="1/A">0.117</dQl> 377 </Idata> 378 <Idata> 379 <Q unit="1/A">0.00244176</Q> 380 <I unit="1/cm">126.272</I> 381 <Idev unit="1/cm">5.99155</Idev> 382 <dQw unit="1/A">0.0</dQw> 383 <dQl unit="1/A">0.117</dQl> 384 </Idata> 385 <Idata> 386 <Q unit="1/A">0.00255276</Q> 387 <I unit="1/cm">114.46</I> 388 <Idev unit="1/cm">5.72081</Idev> 389 <dQw unit="1/A">0.0</dQw> 390 <dQl unit="1/A">0.117</dQl> 391 </Idata> 392 <Idata> 393 <Q unit="1/A">0.00266376</Q> 394 <I unit="1/cm">74.2613</I> 395 <Idev unit="1/cm">4.67786</Idev> 396 <dQw unit="1/A">0.0</dQw> 397 <dQl unit="1/A">0.117</dQl> 398 </Idata> 399 <Idata> 400 <Q unit="1/A">0.00277476</Q> 401 <I unit="1/cm">72.3794</I> 402 <Idev unit="1/cm">4.62347</Idev> 403 <dQw unit="1/A">0.0</dQw> 404 <dQl unit="1/A">0.117</dQl> 405 </Idata> 406 <Idata> 407 <Q unit="1/A">0.00288576</Q> 408 <I unit="1/cm">47.3385</I> 409 <Idev unit="1/cm">3.82544</Idev> 410 <dQw unit="1/A">0.0</dQw> 411 <dQl unit="1/A">0.117</dQl> 412 </Idata> 413 <Idata> 414 <Q unit="1/A">0.00299676</Q> 415 <I unit="1/cm">36.0379</I> 416 <Idev unit="1/cm">3.40491</Idev> 417 <dQw unit="1/A">0.0</dQw> 418 <dQl unit="1/A">0.117</dQl> 419 </Idata> 420 <Idata> 421 <Q unit="1/A">0.00310776</Q> 422 <I unit="1/cm">30.3854</I> 423 <Idev unit="1/cm">3.17364</Idev> 424 <dQw unit="1/A">0.0</dQw> 425 <dQl unit="1/A">0.117</dQl> 426 </Idata> 427 <Idata> 428 <Q unit="1/A">0.00321876</Q> 429 <I unit="1/cm">24.7429</I> 430 <Idev unit="1/cm">2.92505</Idev> 431 <dQw unit="1/A">0.0</dQw> 432 <dQl unit="1/A">0.117</dQl> 433 </Idata> 434 <Idata> 435 <Q unit="1/A">0.00332976</Q> 436 <I unit="1/cm">28.5101</I> 437 <Idev unit="1/cm">3.09348</Idev> 438 <dQw unit="1/A">0.0</dQw> 439 <dQl unit="1/A">0.117</dQl> 440 </Idata> 441 <Idata> 442 <Q unit="1/A">0.00344076</Q> 443 <I unit="1/cm">27.9635</I> 444 <Idev unit="1/cm">3.06924</Idev> 445 <dQw unit="1/A">0.0</dQw> 446 <dQl unit="1/A">0.117</dQl> 447 </Idata> 448 <Idata> 449 <Q unit="1/A">0.00355176</Q> 450 <I unit="1/cm">33.3649</I> 451 <Idev unit="1/cm">3.29833</Idev> 452 <dQw unit="1/A">0.0</dQw> 453 <dQl unit="1/A">0.117</dQl> 454 </Idata> 455 <Idata> 456 <Q unit="1/A">0.00366276</Q> 457 <I unit="1/cm">35.237</I> 458 <Idev unit="1/cm">3.37337</Idev> 459 <dQw unit="1/A">0.0</dQw> 460 <dQl unit="1/A">0.117</dQl> 461 </Idata> 462 <Idata> 463 <Q unit="1/A">0.00377376</Q> 464 <I unit="1/cm">29.0365</I> 465 <Idev unit="1/cm">3.11578</Idev> 466 <dQw unit="1/A">0.0</dQw> 467 <dQl unit="1/A">0.117</dQl> 468 </Idata> 469 <Idata> 470 <Q unit="1/A">0.00388476</Q> 471 <I unit="1/cm">32.5455</I> 472 <Idev unit="1/cm">3.26424</Idev> 473 <dQw unit="1/A">0.0</dQw> 474 <dQl unit="1/A">0.117</dQl> 475 </Idata> 476 <Idata> 477 <Q unit="1/A">0.00399576</Q> 478 <I unit="1/cm">23.1284</I> 479 <Idev unit="1/cm">2.84982</Idev> 480 <dQw unit="1/A">0.0</dQw> 481 <dQl unit="1/A">0.117</dQl> 482 </Idata> 483 <Idata> 484 <Q unit="1/A">0.00410676</Q> 485 <I unit="1/cm">23.6642</I> 486 <Idev unit="1/cm">2.87489</Idev> 487 <dQw unit="1/A">0.0</dQw> 488 <dQl unit="1/A">0.117</dQl> 489 </Idata> 490 <Idata> 491 <Q unit="1/A">0.00421776</Q> 492 <I unit="1/cm">19.3575</I> 493 <Idev unit="1/cm">2.66567</Idev> 494 <dQw unit="1/A">0.0</dQw> 495 <dQl unit="1/A">0.117</dQl> 496 </Idata> 497 <Idata> 498 <Q unit="1/A">0.00432876</Q> 499 <I unit="1/cm">12.8971</I> 500 <Idev unit="1/cm">2.31662</Idev> 501 <dQw unit="1/A">0.0</dQw> 502 <dQl unit="1/A">0.117</dQl> 503 </Idata> 504 <Idata> 505 <Q unit="1/A">0.00443976</Q> 506 <I unit="1/cm">12.8958</I> 507 <Idev unit="1/cm">2.31647</Idev> 508 <dQw unit="1/A">0.0</dQw> 509 <dQl unit="1/A">0.117</dQl> 510 </Idata> 511 <Idata> 512 <Q unit="1/A">0.00455076</Q> 513 <I unit="1/cm">9.66256</I> 514 <Idev unit="1/cm">2.12012</Idev> 515 <dQw unit="1/A">0.0</dQw> 516 <dQl unit="1/A">0.117</dQl> 517 </Idata> 518 <Idata> 519 <Q unit="1/A">0.00466176</Q> 520 <I unit="1/cm">9.66792</I> 521 <Idev unit="1/cm">2.1208</Idev> 522 <dQw unit="1/A">0.0</dQw> 523 <dQl unit="1/A">0.117</dQl> 524 </Idata> 525 <Idata> 526 <Q unit="1/A">0.00477276</Q> 527 <I unit="1/cm">9.39793</I> 528 <Idev unit="1/cm">2.10354</Idev> 529 <dQw unit="1/A">0.0</dQw> 530 <dQl unit="1/A">0.117</dQl> 531 </Idata> 532 <Idata> 533 <Q unit="1/A">0.00488376</Q> 534 <I unit="1/cm">13.7138</I> 535 <Idev unit="1/cm">2.36412</Idev> 536 <dQw unit="1/A">0.0</dQw> 537 <dQl unit="1/A">0.117</dQl> 538 </Idata> 539 <Idata> 540 <Q unit="1/A">0.00499476</Q> 541 <I unit="1/cm">14.2495</I> 542 <Idev unit="1/cm">2.39427</Idev> 543 <dQw unit="1/A">0.0</dQw> 544 <dQl unit="1/A">0.117</dQl> 545 </Idata> 546 <Idata> 547 <Q unit="1/A">0.00510576</Q> 548 <I unit="1/cm">9.12935</I> 549 <Idev unit="1/cm">2.08632</Idev> 550 <dQw unit="1/A">0.0</dQw> 551 <dQl unit="1/A">0.117</dQl> 552 </Idata> 553 <Idata> 554 <Q unit="1/A">0.00521676</Q> 555 <I unit="1/cm">11.822</I> 556 <Idev unit="1/cm">2.25339</Idev> 557 <dQw unit="1/A">0.0</dQw> 558 <dQl unit="1/A">0.117</dQl> 559 </Idata> 560 <Idata> 561 <Q unit="1/A">0.00532776</Q> 562 <I unit="1/cm">10.7551</I> 563 <Idev unit="1/cm">2.18935</Idev> 564 <dQw unit="1/A">0.0</dQw> 565 <dQl unit="1/A">0.117</dQl> 566 </Idata> 567 <Idata> 568 <Q unit="1/A">0.00543876</Q> 569 <I unit="1/cm">11.8258</I> 570 <Idev unit="1/cm">2.25385</Idev> 571 <dQw unit="1/A">0.0</dQw> 572 <dQl unit="1/A">0.117</dQl> 573 </Idata> 574 <Idata> 575 <Q unit="1/A">0.00554976</Q> 576 <I unit="1/cm">8.04703</I> 577 <Idev unit="1/cm">2.01492</Idev> 578 <dQw unit="1/A">0.0</dQw> 579 <dQl unit="1/A">0.117</dQl> 12 <Q unit="1/A"> 13 3.0525e-005 14 </Q> 15 <I unit="1/cm"> 16 165100000.0 17 </I> 18 <Qdev unit="1/A"> 19 3.0525e-007 20 </Qdev> 21 <Idev unit="1/cm"> 22 1794400.0 23 </Idev> 24 </Idata> 25 <Idata> 26 <Q unit="1/A"> 27 3.33e-005 28 </Q> 29 <I unit="1/cm"> 30 190450000.0 31 </I> 32 <Qdev unit="1/A"> 33 3.33e-007 34 </Qdev> 35 <Idev unit="1/cm"> 36 2040000.0 37 </Idev> 38 </Idata> 39 <Idata> 40 <Q unit="1/A"> 41 3.885e-005 42 </Q> 43 <I unit="1/cm"> 44 179720000.0 45 </I> 46 <Qdev unit="1/A"> 47 3.885e-007 48 </Qdev> 49 <Idev unit="1/cm"> 50 975310.0 51 </Idev> 52 </Idata> 53 <Idata> 54 <Q unit="1/A"> 55 4.44e-005 56 </Q> 57 <I unit="1/cm"> 58 164980000.0 59 </I> 60 <Qdev unit="1/A"> 61 4.44e-007 62 </Qdev> 63 <Idev unit="1/cm"> 64 908780.0 65 </Idev> 66 </Idata> 67 <Idata> 68 <Q unit="1/A"> 69 4.995e-005 70 </Q> 71 <I unit="1/cm"> 72 163980000.0 73 </I> 74 <Qdev unit="1/A"> 75 4.995e-007 76 </Qdev> 77 <Idev unit="1/cm"> 78 907320.0 79 </Idev> 80 </Idata> 81 <Idata> 82 <Q unit="1/A"> 83 5.55e-005 84 </Q> 85 <I unit="1/cm"> 86 156350000.0 87 </I> 88 <Qdev unit="1/A"> 89 5.55e-007 90 </Qdev> 91 <Idev unit="1/cm"> 92 872480.0 93 </Idev> 94 </Idata> 95 <Idata> 96 <Q unit="1/A"> 97 6.105e-005 98 </Q> 99 <I unit="1/cm"> 100 172440000.0 101 </I> 102 <Qdev unit="1/A"> 103 6.105e-007 104 </Qdev> 105 <Idev unit="1/cm"> 106 9556000.0 107 </Idev> 108 </Idata> 109 <Idata> 110 <Q unit="1/A"> 111 6.66e-005 112 </Q> 113 <I unit="1/cm"> 114 158680000.0 115 </I> 116 <Qdev unit="1/A"> 117 6.66e-007 118 </Qdev> 119 <Idev unit="1/cm"> 120 894190.0 121 </Idev> 122 </Idata> 123 <Idata> 124 <Q unit="1/A"> 125 7.215e-005 126 </Q> 127 <I unit="1/cm"> 128 168260000.0 129 </I> 130 <Qdev unit="1/A"> 131 7.215e-007 132 </Qdev> 133 <Idev unit="1/cm"> 134 948630.0 135 </Idev> 136 </Idata> 137 <Idata> 138 <Q unit="1/A"> 139 7.77e-005 140 </Q> 141 <I unit="1/cm"> 142 147240000.0 143 </I> 144 <Qdev unit="1/A"> 145 7.77e-007 146 </Qdev> 147 <Idev unit="1/cm"> 148 850120.0 149 </Idev> 150 </Idata> 151 <Idata> 152 <Q unit="1/A"> 153 8.325e-005 154 </Q> 155 <I unit="1/cm"> 156 154710000.0 157 </I> 158 <Qdev unit="1/A"> 159 8.325e-007 160 </Qdev> 161 <Idev unit="1/cm"> 162 892610.0 163 </Idev> 164 </Idata> 165 <Idata> 166 <Q unit="1/A"> 167 8.88e-005 168 </Q> 169 <I unit="1/cm"> 170 154150000.0 171 </I> 172 <Qdev unit="1/A"> 173 8.88e-007 174 </Qdev> 175 <Idev unit="1/cm"> 176 897530.0 177 </Idev> 178 </Idata> 179 <Idata> 180 <Q unit="1/A"> 181 9.435e-005 182 </Q> 183 <I unit="1/cm"> 184 150060000.0 185 </I> 186 <Qdev unit="1/A"> 187 9.435e-007 188 </Qdev> 189 <Idev unit="1/cm"> 190 885510.0 191 </Idev> 192 </Idata> 193 <Idata> 194 <Q unit="1/A"> 195 9.99e-005 196 </Q> 197 <I unit="1/cm"> 198 141700000.0 199 </I> 200 <Qdev unit="1/A"> 201 9.99e-007 202 </Qdev> 203 <Idev unit="1/cm"> 204 8498900.0 205 </Idev> 206 </Idata> 207 <Idata> 208 <Q unit="1/A"> 209 0.00010545 210 </Q> 211 <I unit="1/cm"> 212 145840000.0 213 </I> 214 <Qdev unit="1/A"> 215 1.0545e-006 216 </Qdev> 217 <Idev unit="1/cm"> 218 880320.0 219 </Idev> 220 </Idata> 221 <Idata> 222 <Q unit="1/A"> 223 0.000111 224 </Q> 225 <I unit="1/cm"> 226 137260000.0 227 </I> 228 <Qdev unit="1/A"> 229 1.11e-006 230 </Qdev> 231 <Idev unit="1/cm"> 232 487940.0 233 </Idev> 234 </Idata> 235 <Idata> 236 <Q unit="1/A"> 237 0.0001221 238 </Q> 239 <I unit="1/cm"> 240 126900000.0 241 </I> 242 <Qdev unit="1/A"> 243 1.221e-006 244 </Qdev> 245 <Idev unit="1/cm"> 246 465360.0 247 </Idev> 248 </Idata> 249 <Idata> 250 <Q unit="1/A"> 251 0.0001332 252 </Q> 253 <I unit="1/cm"> 254 125450000.0 255 </I> 256 <Qdev unit="1/A"> 257 1.332e-006 258 </Qdev> 259 <Idev unit="1/cm"> 260 471620.0 261 </Idev> 262 </Idata> 263 <Idata> 264 <Q unit="1/A"> 265 0.0001443 266 </Q> 267 <I unit="1/cm"> 268 112110000.0 269 </I> 270 <Qdev unit="1/A"> 271 1.443e-006 272 </Qdev> 273 <Idev unit="1/cm"> 274 439800.0 275 </Idev> 276 </Idata> 277 <Idata> 278 <Q unit="1/A"> 279 0.0001554 280 </Q> 281 <I unit="1/cm"> 282 109740000.0 283 </I> 284 <Qdev unit="1/A"> 285 1.554e-006 286 </Qdev> 287 <Idev unit="1/cm"> 288 444060.0 289 </Idev> 290 </Idata> 291 <Idata> 292 <Q unit="1/A"> 293 0.0001665 294 </Q> 295 <I unit="1/cm"> 296 97546000.0 297 </I> 298 <Qdev unit="1/A"> 299 1.665e-006 300 </Qdev> 301 <Idev unit="1/cm"> 302 4150700.0 303 </Idev> 304 </Idata> 305 <Idata> 306 <Q unit="1/A"> 307 0.0001776 308 </Q> 309 <I unit="1/cm"> 310 88127000.0 311 </I> 312 <Qdev unit="1/A"> 313 1.776e-006 314 </Qdev> 315 <Idev unit="1/cm"> 316 392070.0 317 </Idev> 318 </Idata> 319 <Idata> 320 <Q unit="1/A"> 321 0.0001887 322 </Q> 323 <I unit="1/cm"> 324 82576000.0 325 </I> 326 <Qdev unit="1/A"> 327 1.887e-006 328 </Qdev> 329 <Idev unit="1/cm"> 330 382470.0 331 </Idev> 332 </Idata> 333 <Idata> 334 <Q unit="1/A"> 335 0.0001998 336 </Q> 337 <I unit="1/cm"> 338 77312000.0 339 </I> 340 <Qdev unit="1/A"> 341 1.998e-006 342 </Qdev> 343 <Idev unit="1/cm"> 344 375780.0 345 </Idev> 346 </Idata> 347 <Idata> 348 <Q unit="1/A"> 349 0.0002109 350 </Q> 351 <I unit="1/cm"> 352 66194000.0 353 </I> 354 <Qdev unit="1/A"> 355 2.109e-006 356 </Qdev> 357 <Idev unit="1/cm"> 358 343090.0 359 </Idev> 360 </Idata> 361 <Idata> 362 <Q unit="1/A"> 363 0.000222 364 </Q> 365 <I unit="1/cm"> 366 61870000.0 367 </I> 368 <Qdev unit="1/A"> 369 2.22e-006 370 </Qdev> 371 <Idev unit="1/cm"> 372 337290.0 373 </Idev> 374 </Idata> 375 <Idata> 376 <Q unit="1/A"> 377 0.0002331 378 </Q> 379 <I unit="1/cm"> 380 54257000.0 381 </I> 382 <Qdev unit="1/A"> 383 2.331e-006 384 </Qdev> 385 <Idev unit="1/cm"> 386 316830.0 387 </Idev> 388 </Idata> 389 <Idata> 390 <Q unit="1/A"> 391 0.0002442 392 </Q> 393 <I unit="1/cm"> 394 47924000.0 395 </I> 396 <Qdev unit="1/A"> 397 2.442e-006 398 </Qdev> 399 <Idev unit="1/cm"> 400 3004000.0 401 </Idev> 402 </Idata> 403 <Idata> 404 <Q unit="1/A"> 405 0.0002553 406 </Q> 407 <I unit="1/cm"> 408 40953000.0 409 </I> 410 <Qdev unit="1/A"> 411 2.553e-006 412 </Qdev> 413 <Idev unit="1/cm"> 414 278010.0 415 </Idev> 416 </Idata> 417 <Idata> 418 <Q unit="1/A"> 419 0.0002664 420 </Q> 421 <I unit="1/cm"> 422 34975000.0 423 </I> 424 <Qdev unit="1/A"> 425 2.664e-006 426 </Qdev> 427 <Idev unit="1/cm"> 428 257230.0 429 </Idev> 430 </Idata> 431 <Idata> 432 <Q unit="1/A"> 433 0.0002775 434 </Q> 435 <I unit="1/cm"> 436 29218000.0 437 </I> 438 <Qdev unit="1/A"> 439 2.775e-006 440 </Qdev> 441 <Idev unit="1/cm"> 442 165020.0 443 </Idev> 444 </Idata> 445 <Idata> 446 <Q unit="1/A"> 447 0.00030525 448 </Q> 449 <I unit="1/cm"> 450 19276000.0 451 </I> 452 <Qdev unit="1/A"> 453 3.0525e-006 454 </Qdev> 455 <Idev unit="1/cm"> 456 135210.0 457 </Idev> 458 </Idata> 459 <Idata> 460 <Q unit="1/A"> 461 0.000333 462 </Q> 463 <I unit="1/cm"> 464 10557000.0 465 </I> 466 <Qdev unit="1/A"> 467 3.33e-006 468 </Qdev> 469 <Idev unit="1/cm"> 470 98308.0 471 </Idev> 472 </Idata> 473 <Idata> 474 <Q unit="1/A"> 475 0.00036075 476 </Q> 477 <I unit="1/cm"> 478 5664700.0 479 </I> 480 <Qdev unit="1/A"> 481 3.6075e-006 482 </Qdev> 483 <Idev unit="1/cm"> 484 69421.0 485 </Idev> 486 </Idata> 487 <Idata> 488 <Q unit="1/A"> 489 0.0003885 490 </Q> 491 <I unit="1/cm"> 492 1947500.0 493 </I> 494 <Qdev unit="1/A"> 495 3.885e-006 496 </Qdev> 497 <Idev unit="1/cm"> 498 313730.0 499 </Idev> 500 </Idata> 501 <Idata> 502 <Q unit="1/A"> 503 0.00041625 504 </Q> 505 <I unit="1/cm"> 506 241770.0 507 </I> 508 <Qdev unit="1/A"> 509 4.1625e-006 510 </Qdev> 511 <Idev unit="1/cm"> 512 4755.1 513 </Idev> 514 </Idata> 515 <Idata> 516 <Q unit="1/A"> 517 0.000444 518 </Q> 519 <I unit="1/cm"> 520 114540.0 521 </I> 522 <Qdev unit="1/A"> 523 4.44e-006 524 </Qdev> 525 <Idev unit="1/cm"> 526 2326.3 527 </Idev> 528 </Idata> 529 <Idata> 530 <Q unit="1/A"> 531 0.00047175 532 </Q> 533 <I unit="1/cm"> 534 208800.0 535 </I> 536 <Qdev unit="1/A"> 537 4.7175e-006 538 </Qdev> 539 <Idev unit="1/cm"> 540 4001.1 541 </Idev> 542 </Idata> 543 <Idata> 544 <Q unit="1/A"> 545 0.0004995 546 </Q> 547 <I unit="1/cm"> 548 670290.0 549 </I> 550 <Qdev unit="1/A"> 551 4.995e-006 552 </Qdev> 553 <Idev unit="1/cm"> 554 11420.0 555 </Idev> 556 </Idata> 557 <Idata> 558 <Q unit="1/A"> 559 0.00052725 560 </Q> 561 <I unit="1/cm"> 562 1137400.0 563 </I> 564 <Qdev unit="1/A"> 565 5.2725e-006 566 </Qdev> 567 <Idev unit="1/cm"> 568 18885.0 569 </Idev> 570 </Idata> 571 <Idata> 572 <Q unit="1/A"> 573 0.000555 574 </Q> 575 <I unit="1/cm"> 576 1278100.0 577 </I> 578 <Qdev unit="1/A"> 579 5.55e-006 580 </Qdev> 581 <Idev unit="1/cm"> 582 15763.0 583 </Idev> 584 </Idata> 585 <Idata> 586 <Q unit="1/A"> 587 0.0006105 588 </Q> 589 <I unit="1/cm"> 590 1225600.0 591 </I> 592 <Qdev unit="1/A"> 593 6.105e-006 594 </Qdev> 595 <Idev unit="1/cm"> 596 176810.0 597 </Idev> 598 </Idata> 599 <Idata> 600 <Q unit="1/A"> 601 0.000666 602 </Q> 603 <I unit="1/cm"> 604 583310.0 605 </I> 606 <Qdev unit="1/A"> 607 6.66e-006 608 </Qdev> 609 <Idev unit="1/cm"> 610 11772.0 611 </Idev> 612 </Idata> 613 <Idata> 614 <Q unit="1/A"> 615 0.0007215 616 </Q> 617 <I unit="1/cm"> 618 69003.0 619 </I> 620 <Qdev unit="1/A"> 621 7.215e-006 622 </Qdev> 623 <Idev unit="1/cm"> 624 1907.7 625 </Idev> 626 </Idata> 627 <Idata> 628 <Q unit="1/A"> 629 0.000777 630 </Q> 631 <I unit="1/cm"> 632 23263.0 633 </I> 634 <Qdev unit="1/A"> 635 7.77e-006 636 </Qdev> 637 <Idev unit="1/cm"> 638 683.84 639 </Idev> 640 </Idata> 641 <Idata> 642 <Q unit="1/A"> 643 0.0008325 644 </Q> 645 <I unit="1/cm"> 646 97644.0 647 </I> 648 <Qdev unit="1/A"> 649 8.325e-006 650 </Qdev> 651 <Idev unit="1/cm"> 652 2565.3 653 </Idev> 654 </Idata> 655 <Idata> 656 <Q unit="1/A"> 657 0.000888 658 </Q> 659 <I unit="1/cm"> 660 233120.0 661 </I> 662 <Qdev unit="1/A"> 663 8.88e-006 664 </Qdev> 665 <Idev unit="1/cm"> 666 5864.3 667 </Idev> 668 </Idata> 669 <Idata> 670 <Q unit="1/A"> 671 0.0009435 672 </Q> 673 <I unit="1/cm"> 674 202080.0 675 </I> 676 <Qdev unit="1/A"> 677 9.435e-006 678 </Qdev> 679 <Idev unit="1/cm"> 680 6035.5 681 </Idev> 682 </Idata> 683 <Idata> 684 <Q unit="1/A"> 685 0.000999 686 </Q> 687 <I unit="1/cm"> 688 80861.0 689 </I> 690 <Qdev unit="1/A"> 691 9.99e-006 692 </Qdev> 693 <Idev unit="1/cm"> 694 30528.0 695 </Idev> 696 </Idata> 697 <Idata> 698 <Q unit="1/A"> 699 0.0010545 700 </Q> 701 <I unit="1/cm"> 702 7683.4 703 </I> 704 <Qdev unit="1/A"> 705 1.0545e-005 706 </Qdev> 707 <Idev unit="1/cm"> 708 354.56 709 </Idev> 710 </Idata> 711 <Idata> 712 <Q unit="1/A"> 713 0.00111 714 </Q> 715 <I unit="1/cm"> 716 11329.0 717 </I> 718 <Qdev unit="1/A"> 719 1.11e-005 720 </Qdev> 721 <Idev unit="1/cm"> 722 382.48 723 </Idev> 724 </Idata> 725 <Idata> 726 <Q unit="1/A"> 727 0.001221 728 </Q> 729 <I unit="1/cm"> 730 87375.0 731 </I> 732 <Qdev unit="1/A"> 733 1.221e-005 734 </Qdev> 735 <Idev unit="1/cm"> 736 2658.0 737 </Idev> 738 </Idata> 739 <Idata> 740 <Q unit="1/A"> 741 0.001332 742 </Q> 743 <I unit="1/cm"> 744 10915.0 745 </I> 746 <Qdev unit="1/A"> 747 1.332e-005 748 </Qdev> 749 <Idev unit="1/cm"> 750 517.94 751 </Idev> 752 </Idata> 753 <Idata> 754 <Q unit="1/A"> 755 0.001443 756 </Q> 757 <I unit="1/cm"> 758 7683.6 759 </I> 760 <Qdev unit="1/A"> 761 1.443e-005 762 </Qdev> 763 <Idev unit="1/cm"> 764 376.72 765 </Idev> 766 </Idata> 767 <Idata> 768 <Q unit="1/A"> 769 0.001554 770 </Q> 771 <I unit="1/cm"> 772 31538.0 773 </I> 774 <Qdev unit="1/A"> 775 1.554e-005 776 </Qdev> 777 <Idev unit="1/cm"> 778 1461.6 779 </Idev> 780 </Idata> 781 <Idata> 782 <Q unit="1/A"> 783 0.001665 784 </Q> 785 <I unit="1/cm"> 786 2991.0 787 </I> 788 <Qdev unit="1/A"> 789 1.665e-005 790 </Qdev> 791 <Idev unit="1/cm"> 792 2025.4 793 </Idev> 794 </Idata> 795 <Idata> 796 <Q unit="1/A"> 797 0.001776 798 </Q> 799 <I unit="1/cm"> 800 6126.4 801 </I> 802 <Qdev unit="1/A"> 803 1.776e-005 804 </Qdev> 805 <Idev unit="1/cm"> 806 413.24 807 </Idev> 808 </Idata> 809 <Idata> 810 <Q unit="1/A"> 811 0.001887 812 </Q> 813 <I unit="1/cm"> 814 9246.2 815 </I> 816 <Qdev unit="1/A"> 817 1.887e-005 818 </Qdev> 819 <Idev unit="1/cm"> 820 642.09 821 </Idev> 822 </Idata> 823 <Idata> 824 <Q unit="1/A"> 825 0.001998 826 </Q> 827 <I unit="1/cm"> 828 861.73 829 </I> 830 <Qdev unit="1/A"> 831 1.998e-005 832 </Qdev> 833 <Idev unit="1/cm"> 834 67.504 835 </Idev> 836 </Idata> 837 <Idata> 838 <Q unit="1/A"> 839 0.002109 840 </Q> 841 <I unit="1/cm"> 842 8017.5 843 </I> 844 <Qdev unit="1/A"> 845 2.109e-005 846 </Qdev> 847 <Idev unit="1/cm"> 848 550.7 849 </Idev> 850 </Idata> 851 <Idata> 852 <Q unit="1/A"> 853 0.00222 854 </Q> 855 <I unit="1/cm"> 856 5502.9 857 </I> 858 <Qdev unit="1/A"> 859 2.22e-005 860 </Qdev> 861 <Idev unit="1/cm"> 862 494.11 863 </Idev> 864 </Idata> 865 <Idata> 866 <Q unit="1/A"> 867 0.002331 868 </Q> 869 <I unit="1/cm"> 870 741.32 871 </I> 872 <Qdev unit="1/A"> 873 2.331e-005 874 </Qdev> 875 <Idev unit="1/cm"> 876 83.931 877 </Idev> 878 </Idata> 879 <Idata> 880 <Q unit="1/A"> 881 0.002442 882 </Q> 883 <I unit="1/cm"> 884 2919.8 885 </I> 886 <Qdev unit="1/A"> 887 2.442e-005 888 </Qdev> 889 <Idev unit="1/cm"> 890 3303.4 891 </Idev> 892 </Idata> 893 <Idata> 894 <Q unit="1/A"> 895 0.002553 896 </Q> 897 <I unit="1/cm"> 898 1667.6 899 </I> 900 <Qdev unit="1/A"> 901 2.553e-005 902 </Qdev> 903 <Idev unit="1/cm"> 904 206.1 905 </Idev> 906 </Idata> 907 <Idata> 908 <Q unit="1/A"> 909 0.002664 910 </Q> 911 <I unit="1/cm"> 912 584.11 913 </I> 914 <Qdev unit="1/A"> 915 2.664e-005 916 </Qdev> 917 <Idev unit="1/cm"> 918 74.745 919 </Idev> 920 </Idata> 921 <Idata> 922 <Q unit="1/A"> 923 0.002775 924 </Q> 925 <I unit="1/cm"> 926 1585.4 927 </I> 928 <Qdev unit="1/A"> 929 2.775e-005 930 </Qdev> 931 <Idev unit="1/cm"> 932 167.96 933 </Idev> 934 </Idata> 935 <Idata> 936 <Q unit="1/A"> 937 0.0030525 938 </Q> 939 <I unit="1/cm"> 940 1422.7 941 </I> 942 <Qdev unit="1/A"> 943 3.0525e-005 944 </Qdev> 945 <Idev unit="1/cm"> 946 183.59 947 </Idev> 948 </Idata> 949 <Idata> 950 <Q unit="1/A"> 951 0.00333 952 </Q> 953 <I unit="1/cm"> 954 70.932 955 </I> 956 <Qdev unit="1/A"> 957 3.33e-005 958 </Qdev> 959 <Idev unit="1/cm"> 960 16.5 961 </Idev> 962 </Idata> 963 <Idata> 964 <Q unit="1/A"> 965 0.0036075 966 </Q> 967 <I unit="1/cm"> 968 400.33 969 </I> 970 <Qdev unit="1/A"> 971 3.6075e-005 972 </Qdev> 973 <Idev unit="1/cm"> 974 63.21 975 </Idev> 976 </Idata> 977 <Idata> 978 <Q unit="1/A"> 979 0.003885 980 </Q> 981 <I unit="1/cm"> 982 393.52 983 </I> 984 <Qdev unit="1/A"> 985 3.885e-005 986 </Qdev> 987 <Idev unit="1/cm"> 988 659.6 989 </Idev> 990 </Idata> 991 <Idata> 992 <Q unit="1/A"> 993 0.0041625 994 </Q> 995 <I unit="1/cm"> 996 212.31 997 </I> 998 <Qdev unit="1/A"> 999 4.1625e-005 1000 </Qdev> 1001 <Idev unit="1/cm"> 1002 47.277 1003 </Idev> 1004 </Idata> 1005 <Idata> 1006 <Q unit="1/A"> 1007 0.00444 1008 </Q> 1009 <I unit="1/cm"> 1010 39.89 1011 </I> 1012 <Qdev unit="1/A"> 1013 4.44e-005 1014 </Qdev> 1015 <Idev unit="1/cm"> 1016 11.694 1017 </Idev> 1018 </Idata> 1019 <Idata> 1020 <Q unit="1/A"> 1021 0.0047175 1022 </Q> 1023 <I unit="1/cm"> 1024 71.693 1025 </I> 1026 <Qdev unit="1/A"> 1027 4.7175e-005 1028 </Qdev> 1029 <Idev unit="1/cm"> 1030 18.86 1031 </Idev> 1032 </Idata> 1033 <Idata> 1034 <Q unit="1/A"> 1035 0.004995 1036 </Q> 1037 <I unit="1/cm"> 1038 2.5476 1039 </I> 1040 <Qdev unit="1/A"> 1041 4.995e-005 1042 </Qdev> 1043 <Idev unit="1/cm"> 1044 0.77203 1045 </Idev> 1046 </Idata> 1047 <Idata> 1048 <Q unit="1/A"> 1049 0.0052725 1050 </Q> 1051 <I unit="1/cm"> 1052 157.13 1053 </I> 1054 <Qdev unit="1/A"> 1055 5.2725e-005 1056 </Qdev> 1057 <Idev unit="1/cm"> 1058 30.429 1059 </Idev> 580 1060 </Idata> 581 1061 </SASdata> 582 <SASsample name="">583 <ID />584 <thickness unit="mm">1.0</thickness>585 < transmission>0.84031</transmission>1062 <SASsample> 1063 <ID> 1064 1065 </ID> 586 1066 </SASsample> 587 1067 <SASinstrument> 588 <name/> 1068 <name> 1069 1070 </name> 589 1071 <SASsource> 590 <radiation>neutron</radiation> 591 <wavelength unit="A">2.38</wavelength> 1072 <radiation> 1073 neutron 1074 </radiation> 592 1075 </SASsource> 593 1076 <SAScollimation/> 594 1077 <SASdetector> 595 <name/> 1078 <name> 1079 BT5 DETECTOR ARRAY 1080 </name> 596 1081 </SASdetector> 597 1082 </SASinstrument> 598 <SASnote>free form description of processing</SASnote> 1083 <SASprocess> 1084 <name> 1085 1086 </name> 1087 <date> 1088 1089 </date> 1090 <description> 1091 1092 </description> 1093 <SASprocessnote> 1094 Macintosh HD:Users:ajj:Documents:Work:Devel:DANSE:test data:simulated:SIMUL_1000A_sphere_dsm.txt 1095 Chi^2 = 0.998099 PowerLaw m = -4.09 Iterations = 17 1096 0 box smooth passes and 0 smoothing spline passes 1097 CREATED: Wed, May 26, 2010 at 2:43:15 PM 1098 </SASprocessnote> 1099 </SASprocess> 599 1100 <fitting_plug_in version="1.0"> 600 <filename>latex_smeared.xml [Oct 07 10:40]</filename> 601 <timestamp epoch="1479496054.62">Fri Nov 18 14:07:34 2016</timestamp> 1101 <filename> 1102 1000A_sphere_dsm.xml 1103 </filename> 1104 <timestamp epoch="1281367930.14"> 1105 Mon Aug 09 11:32:10 2010 1106 </timestamp> 602 1107 <Attributes> 603 1108 <is_data is_data="True"/> 604 <group_id group_id=" latex_smeared.xml [1]"/>605 <data_name data_name=" latex_smeared.xml"/>606 <data_id data_id=" latex_smeared.xml 1479495991.26"/>1109 <group_id group_id="1000A_sphere_dsm.xml"/> 1110 <data_name data_name="1000A_sphere_dsm.xml"/> 1111 <data_id data_id="1000A_sphere_dsm.xml"/> 607 1112 <name name=""/> 608 <data_name data_name="latex_smeared.xml "/> 609 <qmin qmin="7.7457e-05"/> 610 <qmax qmax="0.00554976"/> 611 <npts npts="50"/> 612 <categorycombobox categorycombobox="Sphere"/> 613 <formfactorcombobox formfactorcombobox="sphere"/> 614 <structurecombobox structurecombobox="None"/> 615 <multi_factor multi_factor="None"/> 616 <magnetic_on magnetic_on="False"/> 617 <enable_smearer enable_smearer="True"/> 618 <disable_smearer disable_smearer="False"/> 1113 <data_name data_name="1000A_sphere_dsm.xml"/> 1114 <engine_type engine_type="scipy"/> 1115 <qmin qmin="3.0525e-005"/> 1116 <qmax qmax="0.0052725"/> 1117 <npts npts="None"/> 1118 <shape_rbutton shape_rbutton="True"/> 1119 <shape_indep_rbutton shape_indep_rbutton="False"/> 1120 <plugin_rbutton plugin_rbutton="False"/> 1121 <struct_rbutton struct_rbutton="False"/> 1122 <formfactorcombobox formfactorcombobox="0"/> 1123 <structurecombobox structurecombobox="0"/> 1124 <disp_box disp_box="2"/> 1125 <enable_smearer enable_smearer="False"/> 1126 <disable_smearer disable_smearer="True"/> 619 1127 <pinhole_smearer pinhole_smearer="False"/> 620 1128 <slit_smearer slit_smearer="False"/> 621 1129 <enable_disp enable_disp="False"/> 622 1130 <disable_disp disable_disp="True"/> 623 <dI_noweight dI_noweight="False"/> 624 <dI_didata dI_didata="True"/> 625 <dI_sqrdata dI_sqrdata="False"/> 626 <dI_idata dI_idata="False"/> 1131 <slit_smearer slit_smearer="False"/> 627 1132 <enable2D enable2D="False"/> 628 <cb1 cb1=" False"/>629 <tcChi tcChi=" 24.584"/>630 <smearer smearer="< sas.sascalc.data_util.qsmearing.PySmear object at 0x18D2ACD0>"/>1133 <cb1 cb1="True"/> 1134 <tcChi tcChi="86.3"/> 1135 <smearer smearer="<DataLoader.qsmearing._BaseSmearer object at 0x03665F30>"/> 631 1136 <smear_type smear_type="None"/> 632 1137 <dq_l dq_l="None"/> 633 <dq_r dq_r="0.0"/> 634 <dx_max dx_max="0.0"/> 635 <dx_min dx_min="0.0"/> 636 <dxl dxl="0.0"/> 637 <dxw dxw=""/> 1138 <dq_r dq_r="None"/> 638 1139 <values/> 639 1140 <weights/> 640 <disp_obj_dict/>641 1141 <parameters> 642 <parameter error_displayed="True" error_value=" NaN" maximum_displayed="True" maximum_value="inf" minimum_displayed="True" minimum_value="0" name="scale" selected_to_fit="True" unit="" value="1.7527e-06"/>643 <parameter error_displayed="True" error_value=" NaN" maximum_displayed="True" maximum_value="inf" minimum_displayed="True" minimum_value="-inf" name="background" selected_to_fit="True" unit="1/cm" value="0.060082"/>644 <parameter error_displayed=" True" error_value="NaN" maximum_displayed="True" maximum_value="inf" minimum_displayed="True" minimum_value="-inf" name="sld" selected_to_fit="True" unit="1e-6/Ang^2" value="-705.77"/>645 <parameter error_displayed="True" error_value=" NaN" maximum_displayed="True" maximum_value="inf" minimum_displayed="True" minimum_value="-inf" name="sld_solvent" selected_to_fit="True" unit="1e-6/Ang^2" value="-361.37"/>646 <parameter error_displayed=" True" error_value="NaN" maximum_displayed="True" maximum_value="inf" minimum_displayed="True" minimum_value="0" name="radius" selected_to_fit="True" unit="Ang" value="2462.1"/>1142 <parameter error_displayed="True" error_value="1.57" maximum_displayed="False" maximum_value="" minimum_displayed="False" minimum_value="" name="background" selected_to_fit="True" unit="[1/cm]" value="-214"/> 1143 <parameter error_displayed="True" error_value="1.64" maximum_displayed="False" maximum_value="" minimum_displayed="False" minimum_value="" name="radius" selected_to_fit="True" unit="[A]" value="1.01e+004"/> 1144 <parameter error_displayed="False" error_value="" maximum_displayed="False" maximum_value="" minimum_displayed="False" minimum_value="" name="scale" selected_to_fit="True" unit="" value="0.198"/> 1145 <parameter error_displayed="True" error_value="0.0537" maximum_displayed="False" maximum_value="" minimum_displayed="False" minimum_value="" name="sldSolv" selected_to_fit="True" unit="[1/A^(2)]" value="8.19e-007"/> 1146 <parameter error_displayed="False" error_value="" maximum_displayed="False" maximum_value="" minimum_displayed="False" minimum_value="" name="sldSph" selected_to_fit="True" unit="[1/A^(2)]" value="2.26e-006"/> 647 1147 </parameters> 648 <str_parameters/>649 1148 <orientation_parameters/> 650 1149 <dispersity_parameters/> -
src/sas/sascalc/dataloader/readers/cansas_reader.py
rbcabf4e rad4632c 20 20 import inspect 21 21 # For saving individual sections of data 22 from sas.sascalc.dataloader.data_info import Data1D, Data2D, DataInfo, \ 23 plottable_1D, plottable_2D 24 from sas.sascalc.dataloader.data_info import Collimation, TransmissionSpectrum, \ 25 Detector, Process, Aperture 26 from sas.sascalc.dataloader.data_info import \ 27 combine_data_info_with_plottable as combine_data 22 from sas.sascalc.dataloader.data_info import Data1D, DataInfo, plottable_1D 23 from sas.sascalc.dataloader.data_info import Collimation, TransmissionSpectrum, Detector, Process, Aperture 24 from sas.sascalc.dataloader.data_info import combine_data_info_with_plottable as combine_data 28 25 import sas.sascalc.dataloader.readers.xml_reader as xml_reader 29 26 from sas.sascalc.dataloader.readers.xml_reader import XMLreader … … 59 56 The CanSAS reader requires PyXML 0.8.4 or later. 60 57 """ 61 # CanSAS version - defaults to version 1.058 ## CanSAS version - defaults to version 1.0 62 59 cansas_version = "1.0" 63 60 base_ns = "{cansas1d/1.0}" … … 66 63 invalid = True 67 64 frm = "" 68 # Log messages and errors65 ## Log messages and errors 69 66 logging = None 70 67 errors = set() 71 # Namespace hierarchy for current xml_file object68 ## Namespace hierarchy for current xml_file object 72 69 names = None 73 70 ns_list = None 74 # Temporary storage location for loading multiple data sets in a single file71 ## Temporary storage location for loading multiple data sets in a single file 75 72 current_datainfo = None 76 73 current_dataset = None 77 74 current_data1d = None 78 75 data = None 79 # List of data1D objects to be sent back to SasView76 ## List of data1D objects to be sent back to SasView 80 77 output = None 81 # Wildcards78 ## Wildcards 82 79 type = ["XML files (*.xml)|*.xml", "SasView Save Files (*.svs)|*.svs"] 83 # List of allowed extensions80 ## List of allowed extensions 84 81 ext = ['.xml', '.XML', '.svs', '.SVS'] 85 # Flag to bypass extension check82 ## Flag to bypass extension check 86 83 allow_all = True 87 84 … … 223 220 self.parent_class = tagname_original 224 221 if tagname == 'SASdata': 225 self._initialize_new_data_set(node) 226 if isinstance(self.current_dataset, plottable_2D): 227 x_bins = attr.get("x_bins", "") 228 y_bins = attr.get("y_bins", "") 229 if x_bins is not "" and y_bins is not "": 230 self.current_dataset.shape = (x_bins, y_bins) 231 else: 232 self.current_dataset.shape = () 233 # Recursion step to access data within the group 222 self._initialize_new_data_set() 223 ## Recursion step to access data within the group 234 224 self._parse_entry(node, True) 235 225 if tagname == "SASsample": … … 244 234 self.add_intermediate() 245 235 else: 246 if isinstance(self.current_dataset, plottable_2D): 247 data_point = node.text 248 unit = attr.get('unit', '') 249 else: 250 data_point, unit = self._get_node_value(node, tagname) 251 252 # If this is a dataset, store the data appropriately 236 data_point, unit = self._get_node_value(node, tagname) 237 238 ## If this is a dataset, store the data appropriately 253 239 if tagname == 'Run': 254 240 self.current_datainfo.run_name[data_point] = name … … 259 245 self.current_datainfo.notes.append(data_point) 260 246 261 # I and Q - 1D data262 elif tagname == 'I' and isinstance(self.current_dataset, plottable_1D):247 ## I and Q Data 248 elif tagname == 'I': 263 249 unit_list = unit.split(" | ") 264 250 if len(unit_list) > 1: … … 267 253 self.current_dataset.yaxis("Intensity", unit) 268 254 self.current_dataset.y = np.append(self.current_dataset.y, data_point) 269 elif tagname == 'Idev' and isinstance(self.current_dataset, plottable_1D):255 elif tagname == 'Idev': 270 256 self.current_dataset.dy = np.append(self.current_dataset.dy, data_point) 271 257 elif tagname == 'Q': … … 291 277 self.current_datainfo.sample.zacceptance = (data_point, unit) 292 278 293 # I and Qx, Qy - 2D data 294 elif tagname == 'I' and isinstance(self.current_dataset, plottable_2D): 295 self.current_dataset.yaxis("Intensity", unit) 296 self.current_dataset.data = np.fromstring(data_point, dtype=float, sep=",") 297 elif tagname == 'Idev' and isinstance(self.current_dataset, plottable_2D): 298 self.current_dataset.err_data = np.fromstring(data_point, dtype=float, sep=",") 299 elif tagname == 'Qx': 300 self.current_dataset.xaxis("Qx", unit) 301 self.current_dataset.qx_data = np.fromstring(data_point, dtype=float, sep=",") 302 elif tagname == 'Qy': 303 self.current_dataset.yaxis("Qy", unit) 304 self.current_dataset.qy_data = np.fromstring(data_point, dtype=float, sep=",") 305 elif tagname == 'Qxdev': 306 self.current_dataset.xaxis("Qxdev", unit) 307 self.current_dataset.dqx_data = np.fromstring(data_point, dtype=float, sep=",") 308 elif tagname == 'Qydev': 309 self.current_dataset.yaxis("Qydev", unit) 310 self.current_dataset.dqy_data = np.fromstring(data_point, dtype=float, sep=",") 311 elif tagname == 'Mask': 312 inter = [item == "1" for item in data_point.split(",")] 313 self.current_dataset.mask = np.asarray(inter, dtype=bool) 314 315 # Sample Information 279 ## Sample Information 316 280 elif tagname == 'ID' and self.parent_class == 'SASsample': 317 281 self.current_datainfo.sample.ID = data_point … … 347 311 self.current_datainfo.sample.orientation_unit = unit 348 312 349 # Instrumental Information313 ## Instrumental Information 350 314 elif tagname == 'name' and self.parent_class == 'SASinstrument': 351 315 self.current_datainfo.instrument = data_point 352 # Detector Information316 ## Detector Information 353 317 elif tagname == 'name' and self.parent_class == 'SASdetector': 354 318 self.detector.name = data_point … … 395 359 self.detector.orientation.z = data_point 396 360 self.detector.orientation_unit = unit 397 # Collimation and Aperture361 ## Collimation and Aperture 398 362 elif tagname == 'length' and self.parent_class == 'SAScollimation': 399 363 self.collimation.length = data_point … … 414 378 self.collimation.size_unit = unit 415 379 416 # Process Information380 ## Process Information 417 381 elif tagname == 'name' and self.parent_class == 'SASprocess': 418 382 self.process.name = data_point … … 434 398 self.process.term.append(dic) 435 399 436 # Transmission Spectrum400 ## Transmission Spectrum 437 401 elif tagname == 'T' and self.parent_class == 'Tdata': 438 402 self.transspectrum.transmission = np.append(self.transspectrum.transmission, data_point) … … 445 409 self.transspectrum.wavelength_unit = unit 446 410 447 # Source Information411 ## Source Information 448 412 elif tagname == 'wavelength' and (self.parent_class == 'SASsource' or self.parent_class == 'SASData'): 449 413 self.current_datainfo.source.wavelength = data_point … … 472 436 self.current_datainfo.source.beam_shape = data_point 473 437 474 # Everything else goes in meta_data438 ## Everything else goes in meta_data 475 439 else: 476 440 new_key = self._create_unique_key(self.current_datainfo.meta_data, tagname) … … 486 450 self.add_data_set() 487 451 empty = None 452 if self.output[0].dx is not None: 453 self.output[0].dxl = np.empty(0) 454 self.output[0].dxw = np.empty(0) 455 else: 456 self.output[0].dx = np.empty(0) 488 457 return self.output[0], empty 489 458 … … 557 526 self.current_datainfo = DataInfo() 558 527 559 def _initialize_new_data_set(self, node=None):528 def _initialize_new_data_set(self, parent_list=None): 560 529 """ 561 530 A private class method to generate a new 1D data object. 562 531 Outside methods should call add_data_set() to be sure any existing data is stored properly. 563 532 564 :param node: XML node to determine if 1D or 2D data 565 """ 533 :param parent_list: List of names of parent elements 534 """ 535 536 if parent_list is None: 537 parent_list = [] 566 538 x = np.array(0) 567 539 y = np.array(0) 568 for child in node:569 if child.tag.replace(self.base_ns, "") == "Idata":570 for i_child in child:571 if i_child.tag.replace(self.base_ns, "") == "Qx":572 self.current_dataset = plottable_2D()573 return574 540 self.current_dataset = plottable_1D(x, y) 575 541 … … 606 572 """ 607 573 608 # Append errors to dataset and reset class errors574 ## Append errors to dataset and reset class errors 609 575 self.current_datainfo.errors = set() 610 576 for error in self.errors: … … 612 578 self.errors.clear() 613 579 614 # Combine all plottables with datainfo and append each to output615 # Type cast data arrays to float64 and find min/max as appropriate580 ## Combine all plottables with datainfo and append each to output 581 ## Type cast data arrays to float64 and find min/max as appropriate 616 582 for dataset in self.data: 617 if isinstance(dataset, plottable_1D): 618 if dataset.x is not None: 619 dataset.x = np.delete(dataset.x, [0]) 620 dataset.x = dataset.x.astype(np.float64) 621 dataset.xmin = np.min(dataset.x) 622 dataset.xmax = np.max(dataset.x) 623 if dataset.y is not None: 624 dataset.y = np.delete(dataset.y, [0]) 625 dataset.y = dataset.y.astype(np.float64) 626 dataset.ymin = np.min(dataset.y) 627 dataset.ymax = np.max(dataset.y) 628 if dataset.dx is not None: 629 dataset.dx = np.delete(dataset.dx, [0]) 630 dataset.dx = dataset.dx.astype(np.float64) 631 if dataset.dxl is not None: 632 dataset.dxl = np.delete(dataset.dxl, [0]) 633 dataset.dxl = dataset.dxl.astype(np.float64) 634 if dataset.dxw is not None: 635 dataset.dxw = np.delete(dataset.dxw, [0]) 636 dataset.dxw = dataset.dxw.astype(np.float64) 637 if dataset.dy is not None: 638 dataset.dy = np.delete(dataset.dy, [0]) 639 dataset.dy = dataset.dy.astype(np.float64) 640 np.trim_zeros(dataset.x) 641 np.trim_zeros(dataset.y) 642 np.trim_zeros(dataset.dy) 643 elif isinstance(dataset, plottable_2D): 644 dataset.data = dataset.data.astype(np.float64) 645 dataset.qx_data = dataset.qx_data.astype(np.float64) 646 dataset.xmin = np.min(dataset.qx_data) 647 dataset.xmax = np.max(dataset.qx_data) 648 dataset.qy_data = dataset.qy_data.astype(np.float64) 649 dataset.ymin = np.min(dataset.qy_data) 650 dataset.ymax = np.max(dataset.qy_data) 651 dataset.q_data = np.sqrt(dataset.qx_data * dataset.qx_data 652 + dataset.qy_data * dataset.qy_data) 653 if dataset.err_data is not None: 654 dataset.err_data = dataset.err_data.astype(np.float64) 655 if dataset.dqx_data is not None: 656 dataset.dqx_data = dataset.dqx_data.astype(np.float64) 657 if dataset.dqy_data is not None: 658 dataset.dqy_data = dataset.dqy_data.astype(np.float64) 659 if dataset.mask is not None: 660 dataset.mask = dataset.mask.astype(dtype=bool) 661 662 if len(dataset.shape) == 2: 663 n_rows, n_cols = dataset.shape 664 dataset.y_bins = dataset.qy_data[0::int(n_cols)] 665 dataset.x_bins = dataset.qx_data[:int(n_cols)] 666 dataset.data = dataset.data.flatten() 667 else: 668 dataset.y_bins = [] 669 dataset.x_bins = [] 670 dataset.data = dataset.data.flatten() 671 583 if dataset.x is not None: 584 dataset.x = np.delete(dataset.x, [0]) 585 dataset.x = dataset.x.astype(np.float64) 586 dataset.xmin = np.min(dataset.x) 587 dataset.xmax = np.max(dataset.x) 588 if dataset.y is not None: 589 dataset.y = np.delete(dataset.y, [0]) 590 dataset.y = dataset.y.astype(np.float64) 591 dataset.ymin = np.min(dataset.y) 592 dataset.ymax = np.max(dataset.y) 593 if dataset.dx is not None: 594 dataset.dx = np.delete(dataset.dx, [0]) 595 dataset.dx = dataset.dx.astype(np.float64) 596 if dataset.dxl is not None: 597 dataset.dxl = np.delete(dataset.dxl, [0]) 598 dataset.dxl = dataset.dxl.astype(np.float64) 599 if dataset.dxw is not None: 600 dataset.dxw = np.delete(dataset.dxw, [0]) 601 dataset.dxw = dataset.dxw.astype(np.float64) 602 if dataset.dy is not None: 603 dataset.dy = np.delete(dataset.dy, [0]) 604 dataset.dy = dataset.dy.astype(np.float64) 605 np.trim_zeros(dataset.x) 606 np.trim_zeros(dataset.y) 607 np.trim_zeros(dataset.dy) 672 608 final_dataset = combine_data(dataset, self.current_datainfo) 673 609 self.output.append(final_dataset) … … 769 705 and local_unit.lower() != "none": 770 706 if HAS_CONVERTER == True: 771 # Check local units - bad units raise KeyError707 ## Check local units - bad units raise KeyError 772 708 data_conv_q = Converter(local_unit) 773 709 value_unit = default_unit … … 816 752 A method to check all resolution data sets are the same size as I and Q 817 753 """ 818 if isinstance(self.current_dataset, plottable_1D): 819 dql_exists = False 820 dqw_exists = False 821 dq_exists = False 822 di_exists = False 823 if self.current_dataset.dxl is not None: 824 dql_exists = True 825 if self.current_dataset.dxw is not None: 826 dqw_exists = True 827 if self.current_dataset.dx is not None: 828 dq_exists = True 829 if self.current_dataset.dy is not None: 830 di_exists = True 831 if dqw_exists and not dql_exists: 832 array_size = self.current_dataset.dxw.size - 1 833 self.current_dataset.dxl = np.append(self.current_dataset.dxl, 834 np.zeros([array_size])) 835 elif dql_exists and not dqw_exists: 836 array_size = self.current_dataset.dxl.size - 1 837 self.current_dataset.dxw = np.append(self.current_dataset.dxw, 838 np.zeros([array_size])) 839 elif not dql_exists and not dqw_exists and not dq_exists: 840 array_size = self.current_dataset.x.size - 1 841 self.current_dataset.dx = np.append(self.current_dataset.dx, 842 np.zeros([array_size])) 843 if not di_exists: 844 array_size = self.current_dataset.y.size - 1 845 self.current_dataset.dy = np.append(self.current_dataset.dy, 846 np.zeros([array_size])) 847 elif isinstance(self.current_dataset, plottable_2D): 848 dqx_exists = False 849 dqy_exists = False 850 di_exists = False 851 mask_exists = False 852 if self.current_dataset.dqx_data is not None: 853 dqx_exists = True 854 if self.current_dataset.dqy_data is not None: 855 dqy_exists = True 856 if self.current_dataset.err_data is not None: 857 di_exists = True 858 if self.current_dataset.mask is not None: 859 mask_exists = True 860 if not dqy_exists: 861 array_size = self.current_dataset.qy_data.size - 1 862 self.current_dataset.dqy_data = np.append( 863 self.current_dataset.dqy_data, np.zeros([array_size])) 864 if not dqx_exists: 865 array_size = self.current_dataset.qx_data.size - 1 866 self.current_dataset.dqx_data = np.append( 867 self.current_dataset.dqx_data, np.zeros([array_size])) 868 if not di_exists: 869 array_size = self.current_dataset.data.size - 1 870 self.current_dataset.err_data = np.append( 871 self.current_dataset.err_data, np.zeros([array_size])) 872 if not mask_exists: 873 array_size = self.current_dataset.data.size - 1 874 self.current_dataset.mask = np.append( 875 self.current_dataset.mask, 876 np.ones([array_size] ,dtype=bool)) 754 dql_exists = False 755 dqw_exists = False 756 dq_exists = False 757 di_exists = False 758 if self.current_dataset.dxl is not None: 759 dql_exists = True 760 if self.current_dataset.dxw is not None: 761 dqw_exists = True 762 if self.current_dataset.dx is not None: 763 dq_exists = True 764 if self.current_dataset.dy is not None: 765 di_exists = True 766 if dqw_exists and not dql_exists: 767 array_size = self.current_dataset.dxw.size - 1 768 self.current_dataset.dxl = np.append(self.current_dataset.dxl, np.zeros([array_size])) 769 elif dql_exists and not dqw_exists: 770 array_size = self.current_dataset.dxl.size - 1 771 self.current_dataset.dxw = np.append(self.current_dataset.dxw, np.zeros([array_size])) 772 elif not dql_exists and not dqw_exists and not dq_exists: 773 array_size = self.current_dataset.x.size - 1 774 self.current_dataset.dx = np.append(self.current_dataset.dx, np.zeros([array_size])) 775 if not di_exists: 776 array_size = self.current_dataset.y.size - 1 777 self.current_dataset.dy = np.append(self.current_dataset.dy, np.zeros([array_size])) 778 877 779 878 780 ####### All methods below are for writing CanSAS XML files ####### 781 879 782 880 783 def write(self, filename, datainfo): … … 901 804 :param datainfo: Data1D object 902 805 """ 903 is_2d = False 904 if issubclass(datainfo.__class__, Data2D): 905 is_2d = True 806 if not issubclass(datainfo.__class__, Data1D): 807 raise RuntimeError, "The cansas writer expects a Data1D instance" 906 808 907 809 # Get PIs and create root element … … 923 825 self._write_run_names(datainfo, entry_node) 924 826 # Add Data info to SASEntry 925 if is_2d: 926 self._write_data_2d(datainfo, entry_node) 927 else: 928 self._write_data(datainfo, entry_node) 827 self._write_data(datainfo, entry_node) 929 828 # Transmission Spectrum Info 930 829 self._write_trans_spectrum(datainfo, entry_node) … … 1020 919 def _write_data(self, datainfo, entry_node): 1021 920 """ 1022 Writes 1DI and Q data to the XML file921 Writes the I and Q data to the XML file 1023 922 1024 923 :param datainfo: The Data1D object the information is coming from … … 1055 954 {'unit': datainfo.sample.zacceptance[1]}) 1056 955 1057 1058 def _write_data_2d(self, datainfo, entry_node):1059 """1060 Writes 2D data to the XML file1061 1062 :param datainfo: The Data2D object the information is coming from1063 :param entry_node: lxml node ElementTree object to be appended to1064 """1065 attr = {}1066 if datainfo.data.shape:1067 attr["x_bins"] = str(len(datainfo.x_bins))1068 attr["y_bins"] = str(len(datainfo.y_bins))1069 node = self.create_element("SASdata", attr)1070 self.append(node, entry_node)1071 1072 point = self.create_element("Idata")1073 node.append(point)1074 qx = ','.join([str(datainfo.qx_data[i]) for i in xrange(len(datainfo.qx_data))])1075 qy = ','.join([str(datainfo.qy_data[i]) for i in xrange(len(datainfo.qy_data))])1076 intensity = ','.join([str(datainfo.data[i]) for i in xrange(len(datainfo.data))])1077 1078 self.write_node(point, "Qx", qx,1079 {'unit': datainfo._xunit})1080 self.write_node(point, "Qy", qy,1081 {'unit': datainfo._yunit})1082 self.write_node(point, "I", intensity,1083 {'unit': datainfo._zunit})1084 if datainfo.err_data is not None:1085 err = ','.join([str(datainfo.err_data[i]) for i in1086 xrange(len(datainfo.err_data))])1087 self.write_node(point, "Idev", err,1088 {'unit': datainfo._zunit})1089 if datainfo.dqy_data is not None:1090 dqy = ','.join([str(datainfo.dqy_data[i]) for i in1091 xrange(len(datainfo.dqy_data))])1092 self.write_node(point, "Qydev", dqy,1093 {'unit': datainfo._yunit})1094 if datainfo.dqx_data is not None:1095 dqx = ','.join([str(datainfo.dqx_data[i]) for i in1096 xrange(len(datainfo.dqx_data))])1097 self.write_node(point, "Qxdev", dqx,1098 {'unit': datainfo._xunit})1099 if datainfo.mask is not None:1100 mask = ','.join(1101 ["1" if datainfo.mask[i] else "0"1102 for i in xrange(len(datainfo.mask))])1103 self.write_node(point, "Mask", mask)1104 956 1105 957 def _write_trans_spectrum(self, datainfo, entry_node): -
src/sas/sascalc/dataloader/readers/schema/cansas1d_invalid_v1_0.xsd
raf08e55 r250fec92 24 24 25 25 <complexType name="IdataType"> 26 <xsd:choice>27 26 <sequence> 28 27 <element name="Q" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" /> … … 41 40 <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other" /> 42 41 </sequence> 43 <sequence>44 <element name="Qx" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" />45 <element name="Qy" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" />46 <element name="I" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" />47 <element name="Idev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />48 <element name="Qydev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />49 <element name="Qxdev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />50 <element name="Mask" minOccurs="0" maxOccurs="1" type="string" default="0" />51 </sequence>52 </xsd:choice>53 42 </complexType> 54 43 … … 62 51 <attribute name="name" type="string" use="optional" default="" /> 63 52 <attribute name="timestamp" type="dateTime" use="optional" /> 64 <attribute name="x_bins" type="string" use="optional" />65 <attribute name="y_bins" type="string" use="optional" />66 53 </complexType> 67 54 -
src/sas/sascalc/dataloader/readers/schema/cansas1d_invalid_v1_1.xsd
raf08e55 r250fec92 24 24 25 25 <complexType name="IdataType"> 26 <xsd:choice>27 26 <sequence> 28 27 <element name="Q" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" /> … … 41 40 <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other" /> 42 41 </sequence> 43 <sequence>44 <element name="Qx" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" />45 <element name="Qy" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" />46 <element name="I" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" />47 <element name="Idev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />48 <element name="Qydev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />49 <element name="Qxdev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />50 <element name="Mask" minOccurs="0" maxOccurs="1" type="string" default="0" />51 </sequence>52 </xsd:choice>53 42 </complexType> 54 43 … … 62 51 <attribute name="name" type="string" use="optional" default="" /> 63 52 <attribute name="timestamp" type="dateTime" use="optional" /> 64 <attribute name="x_bins" type="string" use="optional" />65 <attribute name="y_bins" type="string" use="optional" />66 53 </complexType> 67 54 -
src/sas/sascalc/file_converter/c_ext/bsl_loader.c
r2ab9c432 rdc8a553 1 1 #include <Python.h> 2 //#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION3 2 #include <numpy/arrayobject.h> 4 3 #include <stdio.h> … … 22 21 static PyObject *CLoader_init(CLoader *self, PyObject *args, PyObject *kwds) { 23 22 const char *filename; 24 int n_frames;25 int n_pixels;26 int n_rasters;27 int swap_bytes;23 const int n_frames; 24 const int n_pixels; 25 const int n_rasters; 26 const int swap_bytes; 28 27 29 28 if (self != NULL) { -
src/sas/sasgui/guiframe/local_perspectives/plotting/plotting.py
rca224b1 r6ffa0dd 134 134 """ 135 135 for group_id in self.plot_panels.keys(): 136 self.clear_panel_by_id(group_id) 136 panel = self.plot_panels[group_id] 137 panel.graph.reset() 138 self.hide_panel(group_id) 137 139 self.plot_panels = {} 138 140 -
src/sas/sasgui/perspectives/fitting/basepage.py
r20522e1 r20522e1 1105 1105 """ 1106 1106 for key, value in self.master_category_dict.iteritems(): 1107 formfactor = state.formfactorcombobox.split(":")1108 if isinstance(formfactor, list):1109 formfactor = formfactor[0]1110 1107 for list_item in value: 1111 if formfactorin list_item:1108 if state.formfactorcombobox in list_item: 1112 1109 return self.categorybox.Items.index(key) 1113 1110 return 0 … … 1155 1152 self._show_combox_helper() 1156 1153 # select the current model 1157 state._convert_to_sasmodels() 1158 state.categorycombobox = unicode(state.categorycombobox) 1159 if state.categorycombobox in self.categorybox.Items: 1160 category_pos = self.categorybox.Items.index( 1161 state.categorycombobox) 1162 else: 1163 # Look in master list for model name (model.lower) 1164 category_pos = self.get_cat_combo_box_pos(state) 1154 try: 1155 # to support older version 1156 category_pos = int(state.categorycombobox) 1157 except: 1158 state.formfactorcombobox = state.formfactorcombobox.lower() 1159 state.formfactorcombobox = \ 1160 state.formfactorcombobox.replace('model', '') 1161 state.formfactorcombobox = unicode(state.formfactorcombobox) 1162 state.categorycombobox = unicode(state.categorycombobox) 1163 if state.categorycombobox in self.categorybox.Items: 1164 category_pos = self.categorybox.Items.index( 1165 state.categorycombobox) 1166 else: 1167 # Look in master list for model name (model.lower) 1168 category_pos = self.get_cat_combo_box_pos(state) 1165 1169 1166 1170 self.categorybox.Select(category_pos) 1167 1171 self._show_combox(None) 1168 from models import PLUGIN_NAME_BASE 1169 if self.categorybox.GetValue() == 'Customized Models' \ 1170 and PLUGIN_NAME_BASE not in state.formfactorcombobox: 1171 state.formfactorcombobox = \ 1172 PLUGIN_NAME_BASE + state.formfactorcombobox 1173 formfactor_pos = 0 1174 for ind_form in range(self.formfactorbox.GetCount()): 1175 if self.formfactorbox.GetString(ind_form) == \ 1176 (state.formfactorcombobox): 1177 formfactor_pos = int(ind_form) 1178 break 1172 try: 1173 # to support older version 1174 formfactor_pos = int(state.formfactorcombobox) 1175 except: 1176 formfactor_pos = 0 1177 for ind_form in range(self.formfactorbox.GetCount()): 1178 if self.formfactorbox.GetString(ind_form) == \ 1179 (state.formfactorcombobox): 1180 formfactor_pos = int(ind_form) 1181 break 1179 1182 1180 1183 self.formfactorbox.Select(formfactor_pos) 1181 1184 1182 1185 structfactor_pos = 0 1183 if state.structurecombobox is not None: 1184 state.structurecombobox = unicode(state.structurecombobox) 1185 for ind_struct in range(self.structurebox.GetCount()): 1186 if self.structurebox.GetString(ind_struct) == \ 1187 (state.structurecombobox): 1188 structfactor_pos = int(ind_struct) 1189 break 1186 try: 1187 # to support older version 1188 structfactor_pos = int(state.structurecombobox) 1189 except: 1190 if state.structurecombobox is not None: 1191 state.structurecombobox = unicode(state.structurecombobox) 1192 for ind_struct in range(self.structurebox.GetCount()): 1193 if self.structurebox.GetString(ind_struct) == \ 1194 (state.structurecombobox): 1195 structfactor_pos = int(ind_struct) 1196 break 1190 1197 1191 1198 self.structurebox.SetSelection(structfactor_pos) … … 1377 1384 # self.state.struct_rbutton = self.struct_rbutton.GetValue() 1378 1385 # self.state.plugin_rbutton = self.plugin_rbutton.GetValue() 1379 self.state.structurecombobox = self.structurebox.Get Value()1380 self.state.formfactorcombobox = self.formfactorbox.Get Value()1381 self.state.categorycombobox = self.categorybox.Get Value()1386 self.state.structurecombobox = self.structurebox.GetLabel() 1387 self.state.formfactorcombobox = self.formfactorbox.GetLabel() 1388 self.state.categorycombobox = self.categorybox.GetLabel() 1382 1389 1383 1390 # post state to fit panel … … 1580 1587 if len(statelist) == 0 or len(listtorestore) == 0: 1581 1588 return 1589 if len(statelist) != len(listtorestore): 1590 return 1582 1591 1583 1592 for j in range(len(listtorestore)): 1584 for param in statelist: 1585 if param[1] == listtorestore[j][1]: 1586 item_page = listtorestore[j] 1587 item_page_info = param 1588 if (item_page_info[1] == "theta" or item_page_info[1] == 1589 "phi") and not self._is_2D(): 1590 break 1591 # change the state of the check box for simple parameters 1592 if item_page[0] is not None: 1593 item_page[0].SetValue(item_page_info[0]) 1594 if item_page[2] is not None: 1595 item_page[2].SetValue(item_page_info[2]) 1596 if item_page[2].__class__.__name__ == "ComboBox": 1597 if item_page_info[2] in self.model.fun_list: 1598 fun_val = self.model.fun_list[item_page_info[2]] 1599 self.model.setParam(item_page_info[1], fun_val) 1600 if item_page[3] is not None: 1601 # show or hide text +/- 1602 if item_page_info[2]: 1603 item_page[3].Show(True) 1604 else: 1605 item_page[3].Hide() 1606 if item_page[4] is not None: 1607 # show of hide the text crtl for fitting error 1608 if item_page_info[4][0]: 1609 item_page[4].Show(True) 1610 item_page[4].SetValue(str(item_page_info[4][1])) 1611 else: 1612 item_page[3].Hide() 1613 if item_page[5] is not None: 1614 # show of hide the text crtl for fitting error 1615 item_page[5].Show(True) 1616 item_page[5].SetValue(str(item_page_info[5][1])) 1617 if item_page[6] is not None: 1618 # show of hide the text crtl for fitting error 1619 item_page[6].Show(True) 1620 item_page[6].SetValue(str(item_page_info[6][1])) 1621 break 1593 item_page = listtorestore[j] 1594 item_page_info = statelist[j] 1595 # change the state of the check box for simple parameters 1596 if item_page[0] is not None: 1597 item_page[0].SetValue(item_page_info[0]) 1598 if item_page[2] is not None: 1599 item_page[2].SetValue(item_page_info[2]) 1600 if item_page[2].__class__.__name__ == "ComboBox": 1601 if item_page_info[2] in self.model.fun_list: 1602 fun_val = self.model.fun_list[item_page_info[2]] 1603 self.model.setParam(item_page_info[1], fun_val) 1604 if item_page[3] is not None: 1605 # show or hide text +/- 1606 if item_page_info[2]: 1607 item_page[3].Show(True) 1608 else: 1609 item_page[3].Hide() 1610 if item_page[4] is not None: 1611 # show of hide the text crtl for fitting error 1612 if item_page_info[4][0]: 1613 item_page[4].Show(True) 1614 item_page[4].SetValue(item_page_info[4][1]) 1615 else: 1616 item_page[3].Hide() 1617 if item_page[5] is not None: 1618 # show of hide the text crtl for fitting error 1619 item_page[5].Show(item_page_info[5][0]) 1620 item_page[5].SetValue(item_page_info[5][1]) 1621 1622 if item_page[6] is not None: 1623 # show of hide the text crtl for fitting error 1624 item_page[6].Show(item_page_info[6][0]) 1625 item_page[6].SetValue(item_page_info[6][1]) 1622 1626 1623 1627 def _reset_strparam_state(self, listtorestore, statelist): -
src/sas/sasgui/perspectives/fitting/fitpage.py
r24fd27a r24fd27a 1190 1190 self.state.slit_smearer = self.slit_smearer.GetValue() 1191 1191 1192 self.state.structurecombobox = self.structurebox.GetValue() 1193 self.state.formfactorcombobox = self.formfactorbox.GetValue() 1194 self.state.categorycombobox = self.categorybox.GetValue() 1192 self.state.structurecombobox = self.structurebox.GetLabel() 1193 self.state.formfactorcombobox = self.formfactorbox.GetLabel() 1195 1194 self.enable_fit_button() 1196 1195 if self.model is not None: -
src/sas/sasgui/perspectives/fitting/models.py
r0de74af r313c5c9 23 23 PLUGIN_LOG = os.path.join(os.path.expanduser("~"), '.sasview', PLUGIN_DIR, 24 24 "plugins.log") 25 PLUGIN_NAME_BASE = '[plug-in] '26 25 27 26 def get_model_python_path(): … … 182 181 try: 183 182 model = load_custom_model(path) 184 model.name = PLUGIN_NAME_BASE +model.name183 model.name = "[plug-in] "+model.name 185 184 plugins[model.name] = model 186 185 except Exception: -
src/sas/sasgui/perspectives/fitting/pagestate.py
r6d2b50b rc8e1996 25 25 from lxml import etree 26 26 27 from sasmodels import convert28 27 import sasmodels.weights 29 28 … … 272 271 # store value of chisqr 273 272 self.tcChi = None 274 self.version = (1,0,0)275 273 276 274 def clone(self): … … 351 349 obj.cb1 = copy.deepcopy(self.cb1) 352 350 obj.smearer = copy.deepcopy(self.smearer) 353 obj.version = copy.deepcopy(self.version)354 351 355 352 for name, state in self.saved_states.iteritems(): … … 358 355 obj.saved_states[copy_name] = copy_state 359 356 return obj 360 361 def _old_first_model(self):362 """363 Handle save states from 4.0.1 and before where the first item in the364 selection boxes of category, formfactor and structurefactor were not365 saved.366 :return: None367 """368 if self.formfactorcombobox == '':369 FIRST_FORM = {370 'Shapes' : 'BCCrystalModel',371 'Uncategorized' : 'LineModel',372 'StructureFactor' : 'HardsphereStructure',373 'Ellipsoid' : 'core_shell_ellipsoid',374 'Lamellae' : 'lamellar',375 'Paracrystal' : 'bcc_paracrystal',376 'Parallelepiped' : 'core_shell_parallelepiped',377 'Shape Independent' : 'be_polyelectrolyte',378 'Sphere' : 'adsorbed_layer',379 'Structure Factor' : 'hardsphere',380 'Customized Models' : ''381 }382 if self.categorycombobox == '':383 if len(self.parameters) == 3:384 self.categorycombobox = "Shape-Independent"385 self.formfactorcombobox = 'PowerLawAbsModel'386 elif len(self.parameters) == 9:387 self.categorycombobox = 'Cylinder'388 self.formfactorcombobox = 'barbell'389 else:390 msg = "Save state does not have enough information to load"391 msg += " the all of the data."392 logging.warning(msg=msg)393 else:394 self.formfactorcombobox = FIRST_FORM[self.categorycombobox]395 396 @staticmethod397 def param_remap_to_sasmodels_convert(params, is_string=False):398 """399 Remaps the parameters for sasmodels conversion400 401 :param params: list of parameters (likely self.parameters)402 :return: remapped dictionary of parameters403 """404 p = dict()405 for fittable, name, value, _, uncert, lower, upper, units in params:406 if not value:407 value = numpy.nan408 if not uncert or uncert[1] == '' or uncert[1] == 'None':409 uncert[0] = False410 uncert[1] = numpy.nan411 if not upper or upper[1] == '' or upper[1] == 'None':412 upper[0] = False413 upper[1] = numpy.nan414 if not lower or lower[1] == '' or lower[1] == 'None':415 lower[0] = False416 lower[1] = numpy.nan417 if is_string:418 p[name] = str(value)419 else:420 p[name] = float(value)421 p[name + ".fittable"] = bool(fittable)422 p[name + ".std"] = float(uncert[1])423 p[name + ".upper"] = float(upper[1])424 p[name + ".lower"] = float(lower[1])425 p[name + ".units"] = units426 return p427 428 @staticmethod429 def param_remap_from_sasmodels_convert(params):430 """431 Converts {name : value} map back to [] param list432 :param params: parameter map returned from sasmodels433 :return: None434 """435 p_map = []436 for name, info in params.iteritems():437 if ".fittable" in name or ".std" in name or ".upper" in name or \438 ".lower" in name or ".units" in name:439 pass440 else:441 fittable = params.get(name + ".fittable", True)442 std = params.get(name + ".std", '0.0')443 upper = params.get(name + ".upper", 'inf')444 lower = params.get(name + ".lower", '-inf')445 units = params.get(name + ".units")446 if std is not None and std is not numpy.nan:447 std = [True, str(std)]448 else:449 std = [False, '']450 if lower is not None and lower is not numpy.nan:451 lower = [True, str(lower)]452 else:453 lower = [True, '-inf']454 if upper is not None and upper is not numpy.nan:455 upper = [True, str(upper)]456 else:457 upper = [True, 'inf']458 param_list = [bool(fittable), str(name), str(info),459 "+/-", std, lower, upper, str(units)]460 p_map.append(param_list)461 return p_map462 463 def _convert_to_sasmodels(self):464 """465 Convert parameters to a form usable by sasmodels converter466 467 :return: None468 """469 # Create conversion dictionary to send to sasmodels470 self._old_first_model()471 p = self.param_remap_to_sasmodels_convert(self.parameters)472 structurefactor, params = convert.convert_model(self.structurecombobox,473 p, False, self.version)474 formfactor, params = convert.convert_model(self.formfactorcombobox,475 params, False, self.version)476 if len(self.str_parameters) > 0:477 str_pars = self.param_remap_to_sasmodels_convert(478 self.str_parameters, True)479 formfactor, str_params = convert.convert_model(480 self.formfactorcombobox, str_pars, False, self.version)481 for key, value in str_params.iteritems():482 params[key] = value483 484 if self.formfactorcombobox == 'SphericalSLDModel':485 self.multi_factor += 1486 self.formfactorcombobox = formfactor487 self.structurecombobox = structurefactor488 self.parameters = []489 self.parameters = self.param_remap_from_sasmodels_convert(params)490 357 491 358 def _repr_helper(self, list, rep): … … 815 682 816 683 attr = newdoc.createAttribute("version") 817 import sasview 818 attr.nodeValue = sasview.__version__ 819 # attr.nodeValue = '1.0' 684 attr.nodeValue = '1.0' 820 685 top_element.setAttributeNode(attr) 821 686 … … 1010 875 raise RuntimeError, msg 1011 876 1012 if node.get('version'): 1013 # Get the version for model conversion purposes 1014 self.version = tuple(int(e) for e in 1015 str.split(node.get('version'), ".")) 1016 # The tuple must be at least 3 items long 1017 while len(self.version) < 3: 1018 ver_list = list(self.version) 1019 ver_list.append(0) 1020 self.version = tuple(ver_list) 877 if node.get('version') and node.get('version') == '1.0': 1021 878 1022 879 # Get file name … … 1176 1033 if self.cansas: 1177 1034 return self._read_cansas(path) 1035 1036 def _data2d_to_xml_doc(self, datainfo): 1037 """ 1038 Create an XML document to contain the content of a Data2D 1039 1040 :param datainfo: Data2D object 1041 1042 """ 1043 if not issubclass(datainfo.__class__, Data2D): 1044 raise RuntimeError, "The cansas writer expects a Data2D instance" 1045 1046 title = "cansas1d/%s" % self.version 1047 title += "http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd" 1048 doc = xml.dom.minidom.Document() 1049 main_node = doc.createElement("SASroot") 1050 main_node.setAttribute("version", self.version) 1051 main_node.setAttribute("xmlns", "cansas1d/%s" % self.version) 1052 main_node.setAttribute("xmlns:xsi", 1053 "http://www.w3.org/2001/XMLSchema-instance") 1054 main_node.setAttribute("xsi:schemaLocation", title) 1055 1056 doc.appendChild(main_node) 1057 1058 entry_node = doc.createElement("SASentry") 1059 main_node.appendChild(entry_node) 1060 1061 write_node(doc, entry_node, "Title", datainfo.title) 1062 if datainfo is not None: 1063 write_node(doc, entry_node, "data_class", 1064 datainfo.__class__.__name__) 1065 for item in datainfo.run: 1066 runname = {} 1067 if item in datainfo.run_name and \ 1068 len(str(datainfo.run_name[item])) > 1: 1069 runname = {'name': datainfo.run_name[item]} 1070 write_node(doc, entry_node, "Run", item, runname) 1071 # Data info 1072 new_node = doc.createElement("SASdata") 1073 entry_node.appendChild(new_node) 1074 for item in LIST_OF_DATA_2D_ATTR: 1075 element = doc.createElement(item[0]) 1076 element.setAttribute(item[0], str(getattr(datainfo, item[1]))) 1077 new_node.appendChild(element) 1078 1079 for item in LIST_OF_DATA_2D_VALUES: 1080 root_node = doc.createElement(item[0]) 1081 new_node.appendChild(root_node) 1082 temp_list = getattr(datainfo, item[1]) 1083 1084 if temp_list is None or len(temp_list) == 0: 1085 element = doc.createElement(item[0]) 1086 element.appendChild(doc.createTextNode(str(temp_list))) 1087 root_node.appendChild(element) 1088 else: 1089 for value in temp_list: 1090 element = doc.createElement(item[0]) 1091 element.setAttribute(item[0], str(value)) 1092 root_node.appendChild(element) 1093 1094 # Sample info 1095 sample = doc.createElement("SASsample") 1096 if datainfo.sample.name is not None: 1097 sample.setAttribute("name", str(datainfo.sample.name)) 1098 entry_node.appendChild(sample) 1099 write_node(doc, sample, "ID", str(datainfo.sample.ID)) 1100 write_node(doc, sample, "thickness", datainfo.sample.thickness, 1101 {"unit": datainfo.sample.thickness_unit}) 1102 write_node(doc, sample, "transmission", datainfo.sample.transmission) 1103 write_node(doc, sample, "temperature", datainfo.sample.temperature, 1104 {"unit": datainfo.sample.temperature_unit}) 1105 1106 for item in datainfo.sample.details: 1107 write_node(doc, sample, "details", item) 1108 1109 pos = doc.createElement("position") 1110 written = write_node(doc, pos, "x", datainfo.sample.position.x, 1111 {"unit": datainfo.sample.position_unit}) 1112 written = written | write_node(doc, pos, "y", 1113 datainfo.sample.position.y, 1114 {"unit": datainfo.sample.position_unit}) 1115 written = written | write_node(doc, pos, "z", 1116 datainfo.sample.position.z, 1117 {"unit": datainfo.sample.position_unit}) 1118 if written: 1119 sample.appendChild(pos) 1120 1121 ori = doc.createElement("orientation") 1122 written = write_node(doc, ori, "roll", datainfo.sample.orientation.x, 1123 {"unit": datainfo.sample.orientation_unit}) 1124 written = written | write_node(doc, ori, "pitch", 1125 datainfo.sample.orientation.y, 1126 {"unit": 1127 datainfo.sample.orientation_unit}) 1128 written = written | write_node(doc, ori, "yaw", 1129 datainfo.sample.orientation.z, 1130 {"unit": 1131 datainfo.sample.orientation_unit}) 1132 if written: 1133 sample.appendChild(ori) 1134 1135 # Instrument info 1136 instr = doc.createElement("SASinstrument") 1137 entry_node.appendChild(instr) 1138 1139 write_node(doc, instr, "name", datainfo.instrument) 1140 1141 # Source 1142 source = doc.createElement("SASsource") 1143 if datainfo.source.name is not None: 1144 source.setAttribute("name", str(datainfo.source.name)) 1145 instr.appendChild(source) 1146 1147 write_node(doc, source, "radiation", datainfo.source.radiation) 1148 write_node(doc, source, "beam_shape", datainfo.source.beam_shape) 1149 size = doc.createElement("beam_size") 1150 if datainfo.source.beam_size_name is not None: 1151 size.setAttribute("name", str(datainfo.source.beam_size_name)) 1152 written = write_node(doc, size, "x", datainfo.source.beam_size.x, 1153 {"unit": datainfo.source.beam_size_unit}) 1154 written = written | write_node(doc, size, "y", 1155 datainfo.source.beam_size.y, 1156 {"unit": datainfo.source.beam_size_unit}) 1157 written = written | write_node(doc, size, "z", 1158 datainfo.source.beam_size.z, 1159 {"unit": datainfo.source.beam_size_unit}) 1160 if written: 1161 source.appendChild(size) 1162 1163 write_node(doc, source, "wavelength", datainfo.source.wavelength, 1164 {"unit": datainfo.source.wavelength_unit}) 1165 write_node(doc, source, "wavelength_min", 1166 datainfo.source.wavelength_min, 1167 {"unit": datainfo.source.wavelength_min_unit}) 1168 write_node(doc, source, "wavelength_max", 1169 datainfo.source.wavelength_max, 1170 {"unit": datainfo.source.wavelength_max_unit}) 1171 write_node(doc, source, "wavelength_spread", 1172 datainfo.source.wavelength_spread, 1173 {"unit": datainfo.source.wavelength_spread_unit}) 1174 1175 # Collimation 1176 for item in datainfo.collimation: 1177 coll = doc.createElement("SAScollimation") 1178 if item.name is not None: 1179 coll.setAttribute("name", str(item.name)) 1180 instr.appendChild(coll) 1181 1182 write_node(doc, coll, "length", item.length, 1183 {"unit": item.length_unit}) 1184 1185 for apert in item.aperture: 1186 ap = doc.createElement("aperture") 1187 if apert.name is not None: 1188 ap.setAttribute("name", str(apert.name)) 1189 if apert.type is not None: 1190 ap.setAttribute("type", str(apert.type)) 1191 coll.appendChild(ap) 1192 1193 write_node(doc, ap, "distance", apert.distance, 1194 {"unit": apert.distance_unit}) 1195 1196 size = doc.createElement("size") 1197 if apert.size_name is not None: 1198 size.setAttribute("name", str(apert.size_name)) 1199 written = write_node(doc, size, "x", apert.size.x, 1200 {"unit": apert.size_unit}) 1201 written = written | write_node(doc, size, "y", apert.size.y, 1202 {"unit": apert.size_unit}) 1203 written = written | write_node(doc, size, "z", apert.size.z, 1204 {"unit": apert.size_unit}) 1205 if written: 1206 ap.appendChild(size) 1207 1208 # Detectors 1209 for item in datainfo.detector: 1210 det = doc.createElement("SASdetector") 1211 written = write_node(doc, det, "name", item.name) 1212 written = written | write_node(doc, det, "SDD", item.distance, 1213 {"unit": item.distance_unit}) 1214 written = written | write_node(doc, det, "slit_length", 1215 item.slit_length, 1216 {"unit": item.slit_length_unit}) 1217 if written: 1218 instr.appendChild(det) 1219 1220 off = doc.createElement("offset") 1221 written = write_node(doc, off, "x", item.offset.x, 1222 {"unit": item.offset_unit}) 1223 written = written | write_node(doc, off, "y", item.offset.y, 1224 {"unit": item.offset_unit}) 1225 written = written | write_node(doc, off, "z", item.offset.z, 1226 {"unit": item.offset_unit}) 1227 if written: 1228 det.appendChild(off) 1229 1230 center = doc.createElement("beam_center") 1231 written = write_node(doc, center, "x", item.beam_center.x, 1232 {"unit": item.beam_center_unit}) 1233 written = written | write_node(doc, center, "y", 1234 item.beam_center.y, 1235 {"unit": item.beam_center_unit}) 1236 written = written | write_node(doc, center, "z", 1237 item.beam_center.z, 1238 {"unit": item.beam_center_unit}) 1239 if written: 1240 det.appendChild(center) 1241 1242 pix = doc.createElement("pixel_size") 1243 written = write_node(doc, pix, "x", item.pixel_size.x, 1244 {"unit": item.pixel_size_unit}) 1245 written = written | write_node(doc, pix, "y", item.pixel_size.y, 1246 {"unit": item.pixel_size_unit}) 1247 written = written | write_node(doc, pix, "z", item.pixel_size.z, 1248 {"unit": item.pixel_size_unit}) 1249 if written: 1250 det.appendChild(pix) 1251 1252 ori = doc.createElement("orientation") 1253 written = write_node(doc, ori, "roll", item.orientation.x, 1254 {"unit": item.orientation_unit}) 1255 written = written | write_node(doc, ori, "pitch", 1256 item.orientation.y, 1257 {"unit": item.orientation_unit}) 1258 written = written | write_node(doc, ori, "yaw", item.orientation.z, 1259 {"unit": item.orientation_unit}) 1260 if written: 1261 det.appendChild(ori) 1262 1263 # Processes info 1264 for item in datainfo.process: 1265 node = doc.createElement("SASprocess") 1266 entry_node.appendChild(node) 1267 1268 write_node(doc, node, "name", item.name) 1269 write_node(doc, node, "date", item.date) 1270 write_node(doc, node, "description", item.description) 1271 for term in item.term: 1272 value = term['value'] 1273 del term['value'] 1274 write_node(doc, node, "term", value, term) 1275 for note in item.notes: 1276 write_node(doc, node, "SASprocessnote", note) 1277 # Return the document, and the SASentry node associated with 1278 # the data we just wrote 1279 return doc, entry_node 1178 1280 1179 1281 def _parse_state(self, entry): … … 1252 1354 """ 1253 1355 node = dom.xpath('ns:data_class', namespaces={'ns': CANSAS_NS}) 1254 return_value, _ = self._parse_entry(dom) 1255 return return_value, _ 1356 if not node or node[0].text.lstrip().rstrip() != "Data2D": 1357 return_value, _ = self._parse_entry(dom) 1358 numpy.trim_zeros(return_value.x) 1359 numpy.trim_zeros(return_value.y) 1360 numpy.trim_zeros(return_value.dy) 1361 size_dx = return_value.dx.size 1362 size_dxl = return_value.dxl.size 1363 size_dxw = return_value.dxw.size 1364 if size_dxl == 0 and size_dxw == 0: 1365 return_value.dxl = None 1366 return_value.dxw = None 1367 numpy.trim_zeros(return_value.dx) 1368 elif size_dx == 0: 1369 return_value.dx = None 1370 size_dx = size_dxl 1371 numpy.trim_zeros(return_value.dxl) 1372 numpy.trim_zeros(return_value.dxw) 1373 1374 return return_value, _ 1375 1376 # Parse 2D 1377 data_info = Data2D() 1378 1379 # Look up title 1380 self._store_content('ns:Title', dom, 'title', data_info) 1381 1382 # Look up run number 1383 nodes = dom.xpath('ns:Run', namespaces={'ns': CANSAS_NS}) 1384 for item in nodes: 1385 if item.text is not None: 1386 value = item.text.strip() 1387 if len(value) > 0: 1388 data_info.run.append(value) 1389 if item.get('name') is not None: 1390 data_info.run_name[value] = item.get('name') 1391 1392 # Look up instrument name 1393 self._store_content('ns:SASinstrument/ns:name', dom, 1394 'instrument', data_info) 1395 1396 # Notes 1397 note_list = dom.xpath('ns:SASnote', namespaces={'ns': CANSAS_NS}) 1398 for note in note_list: 1399 try: 1400 if note.text is not None: 1401 note_value = note.text.strip() 1402 if len(note_value) > 0: 1403 data_info.notes.append(note_value) 1404 except Exception: 1405 err_mess = "cansas_reader.read: error processing entry notes\n" 1406 err_mess += " %s" % sys.exc_value 1407 self.errors.append(err_mess) 1408 logging.error(err_mess) 1409 1410 # Sample info ################### 1411 entry = get_content('ns:SASsample', dom) 1412 if entry is not None: 1413 data_info.sample.name = entry.get('name') 1414 1415 self._store_content('ns:SASsample/ns:ID', dom, 'ID', data_info.sample) 1416 self._store_float('ns:SASsample/ns:thickness', dom, 'thickness', 1417 data_info.sample) 1418 self._store_float('ns:SASsample/ns:transmission', dom, 'transmission', 1419 data_info.sample) 1420 self._store_float('ns:SASsample/ns:temperature', dom, 'temperature', 1421 data_info.sample) 1422 1423 nodes = dom.xpath('ns:SASsample/ns:details', 1424 namespaces={'ns': CANSAS_NS}) 1425 for item in nodes: 1426 try: 1427 if item.text is not None: 1428 detail_value = item.text.strip() 1429 if len(detail_value) > 0: 1430 data_info.sample.details.append(detail_value) 1431 except Exception: 1432 err_mess = "cansas_reader.read: error processing entry notes\n" 1433 err_mess += " %s" % sys.exc_value 1434 self.errors.append(err_mess) 1435 logging.error(err_mess) 1436 1437 # Position (as a vector) 1438 self._store_float('ns:SASsample/ns:position/ns:x', dom, 'position.x', 1439 data_info.sample) 1440 self._store_float('ns:SASsample/ns:position/ns:y', dom, 'position.y', 1441 data_info.sample) 1442 self._store_float('ns:SASsample/ns:position/ns:z', dom, 'position.z', 1443 data_info.sample) 1444 1445 # Orientation (as a vector) 1446 self._store_float('ns:SASsample/ns:orientation/ns:roll', 1447 dom, 'orientation.x', data_info.sample) 1448 self._store_float('ns:SASsample/ns:orientation/ns:pitch', 1449 dom, 'orientation.y', data_info.sample) 1450 self._store_float('ns:SASsample/ns:orientation/ns:yaw', 1451 dom, 'orientation.z', data_info.sample) 1452 1453 # Source info ################### 1454 entry = get_content('ns:SASinstrument/ns:SASsource', dom) 1455 if entry is not None: 1456 data_info.source.name = entry.get('name') 1457 1458 self._store_content('ns:SASinstrument/ns:SASsource/ns:radiation', 1459 dom, 'radiation', data_info.source) 1460 self._store_content('ns:SASinstrument/ns:SASsource/ns:beam_shape', 1461 dom, 'beam_shape', data_info.source) 1462 self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength', 1463 dom, 'wavelength', data_info.source) 1464 self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_min', 1465 dom, 'wavelength_min', data_info.source) 1466 self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_max', 1467 dom, 'wavelength_max', data_info.source) 1468 self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_spread', 1469 dom, 'wavelength_spread', data_info.source) 1470 1471 # Beam size (as a vector) 1472 entry = get_content('ns:SASinstrument/ns:SASsource/ns:beam_size', dom) 1473 if entry is not None: 1474 data_info.source.beam_size_name = entry.get('name') 1475 1476 self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:x', 1477 dom, 'beam_size.x', data_info.source) 1478 self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:y', 1479 dom, 'beam_size.y', data_info.source) 1480 self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:z', 1481 dom, 'beam_size.z', data_info.source) 1482 1483 # Collimation info ################### 1484 nodes = dom.xpath('ns:SASinstrument/ns:SAScollimation', 1485 namespaces={'ns': CANSAS_NS}) 1486 for item in nodes: 1487 collim = Collimation() 1488 if item.get('name') is not None: 1489 collim.name = item.get('name') 1490 self._store_float('ns:length', item, 'length', collim) 1491 1492 # Look for apertures 1493 apert_list = item.xpath('ns:aperture', 1494 namespaces={'ns': CANSAS_NS}) 1495 for apert in apert_list: 1496 aperture = Aperture() 1497 1498 # Get the name and type of the aperture 1499 aperture.name = apert.get('name') 1500 aperture.type = apert.get('type') 1501 1502 self._store_float('ns:distance', apert, 'distance', aperture) 1503 1504 entry = get_content('ns:size', apert) 1505 if entry is not None: 1506 aperture.size_name = entry.get('name') 1507 1508 self._store_float('ns:size/ns:x', apert, 'size.x', aperture) 1509 self._store_float('ns:size/ns:y', apert, 'size.y', aperture) 1510 self._store_float('ns:size/ns:z', apert, 'size.z', aperture) 1511 1512 collim.aperture.append(aperture) 1513 1514 data_info.collimation.append(collim) 1515 1516 # Detector info ###################### 1517 nodes = dom.xpath('ns:SASinstrument/ns:SASdetector', 1518 namespaces={'ns': CANSAS_NS}) 1519 for item in nodes: 1520 1521 detector = Detector() 1522 1523 self._store_content('ns:name', item, 'name', detector) 1524 self._store_float('ns:SDD', item, 'distance', detector) 1525 1526 # Detector offset (as a vector) 1527 self._store_float('ns:offset/ns:x', item, 'offset.x', detector) 1528 self._store_float('ns:offset/ns:y', item, 'offset.y', detector) 1529 self._store_float('ns:offset/ns:z', item, 'offset.z', detector) 1530 1531 # Detector orientation (as a vector) 1532 self._store_float('ns:orientation/ns:roll', item, 1533 'orientation.x', detector) 1534 self._store_float('ns:orientation/ns:pitch', item, 1535 'orientation.y', detector) 1536 self._store_float('ns:orientation/ns:yaw', item, 1537 'orientation.z', detector) 1538 1539 # Beam center (as a vector) 1540 self._store_float('ns:beam_center/ns:x', item, 1541 'beam_center.x', detector) 1542 self._store_float('ns:beam_center/ns:y', item, 1543 'beam_center.y', detector) 1544 self._store_float('ns:beam_center/ns:z', item, 1545 'beam_center.z', detector) 1546 1547 # Pixel size (as a vector) 1548 self._store_float('ns:pixel_size/ns:x', item, 1549 'pixel_size.x', detector) 1550 self._store_float('ns:pixel_size/ns:y', item, 1551 'pixel_size.y', detector) 1552 self._store_float('ns:pixel_size/ns:z', item, 1553 'pixel_size.z', detector) 1554 1555 self._store_float('ns:slit_length', item, 'slit_length', detector) 1556 1557 data_info.detector.append(detector) 1558 1559 # Processes info ###################### 1560 nodes = dom.xpath('ns:SASprocess', namespaces={'ns': CANSAS_NS}) 1561 for item in nodes: 1562 process = Process() 1563 self._store_content('ns:name', item, 'name', process) 1564 self._store_content('ns:date', item, 'date', process) 1565 self._store_content('ns:description', item, 'description', process) 1566 1567 term_list = item.xpath('ns:term', namespaces={'ns': CANSAS_NS}) 1568 for term in term_list: 1569 try: 1570 term_attr = {} 1571 for attr in term.keys(): 1572 term_attr[attr] = term.get(attr).strip() 1573 if term.text is not None: 1574 term_attr['value'] = term.text.strip() 1575 process.term.append(term_attr) 1576 except: 1577 err_mess = "cansas_reader.read: error processing " 1578 err_mess += "entry notes\n %s" % sys.exc_value 1579 self.errors.append(err_mess) 1580 logging.error(err_mess) 1581 1582 note_list = item.xpath('ns:SASprocessnote', 1583 namespaces={'ns': CANSAS_NS}) 1584 for note in note_list: 1585 if note.text is not None: 1586 process.notes.append(note.text.strip()) 1587 1588 data_info.process.append(process) 1589 1590 # Data info ###################### 1591 nodes = dom.xpath('ns:SASdata', namespaces={'ns': CANSAS_NS}) 1592 if len(nodes) > 1: 1593 raise RuntimeError, "CanSAS reader is not compatible with" + \ 1594 " multiple SASdata entries" 1595 1596 for entry in nodes: 1597 for item in LIST_OF_DATA_2D_ATTR: 1598 # get node 1599 node = get_content('ns:%s' % item[0], entry) 1600 setattr(data_info, item[1], parse_entry_helper(node, item)) 1601 1602 for item in LIST_OF_DATA_2D_VALUES: 1603 field = get_content('ns:%s' % item[0], entry) 1604 value_list = [] 1605 if field is not None: 1606 value_list = \ 1607 [parse_entry_helper(node, item) for node in field] 1608 if len(value_list) < 2: 1609 setattr(data_info, item[0], None) 1610 else: 1611 setattr(data_info, item[0], numpy.array(value_list)) 1612 1613 return data_info 1256 1614 1257 1615 def _read_cansas(self, path): … … 1334 1692 name = original_fname 1335 1693 state.data.group_id = name 1336 state.version = fitstate.version1337 1694 # store state in fitting 1338 1695 self.call_back(state=state, … … 1388 1745 state.data.run_name[0] = state.data.name 1389 1746 1390 data = state.data 1391 doc, sasentry = self._to_xml_doc(data) 1747 if issubclass(state.data.__class__, 1748 sas.sascalc.dataloader.data_info.Data1D): 1749 data = state.data 1750 doc, sasentry = self._to_xml_doc(data) 1751 else: 1752 data = state.data 1753 doc, sasentry = self._data2d_to_xml_doc(data) 1392 1754 1393 1755 if state is not None: -
src/sas/sasgui/perspectives/invariant/invariant_state.py
rdb5294e rcb93b40 423 423 for item in DEFAULT_STATE: 424 424 input_field = get_content('ns:%s' % item, entry) 425 if input_field.text is not None: 426 val = str(input_field.text.strip()) 427 else: 428 val = '' 425 val = str(input_field.text.strip()) 429 426 if input_field is not None: 430 427 temp_state[item] = val … … 436 433 for item in DEFAULT_STATE: 437 434 input_field = get_content('ns:%s' % item, entry) 438 if input_field.text is not None: 439 val = str(input_field.text.strip()) 440 else: 441 val = '' 435 val = str(input_field.text.strip()) 442 436 if input_field is not None: 443 437 self.set_saved_state(name=item, value=val) -
src/sas/sasgui/perspectives/pr/media/pr_help.rst
r1221196 r0391dae 10 10 ----------- 11 11 12 This tool calculates a real-space distance distribution function, *P(r)*, using 13 the inversion approach (Moore, 19 80).12 This tool calculates a real-space distance distribution function, *P(r)*, using 13 the inversion approach (Moore, 1908). 14 14 15 15 *P(r)* is set to be equal to an expansion of base functions of the type … … 24 24 25 25 \chi^2=\frac{\sum_i (I_{meas}(Q_i)-I_{th}(Q_i))^2}{error^2}+Reg\_term 26 26 27 27 28 28 where $I_{meas}(Q_i)$ is the measured scattering intensity and $I_{th}(Q_i)$ is 29 the prediction from the Fourier transform of the *P(r)* expansion. 29 the prediction from the Fourier transform of the *P(r)* expansion. 30 30 31 The $Reg\_term$ term is a regularization term set to the second derivative 31 The $Reg\_term$ term is a regularization term set to the second derivative 32 32 $d^2P(r)/d^2r$ integrated over $r$. It is used to produce a smooth *P(r)* output. 33 33 … … 40 40 41 41 * *Number of terms*: the number of base functions in the P(r) expansion. 42 42 43 43 * *Regularization constant*: a multiplicative constant to set the size of 44 44 the regularization term.
Note: See TracChangeset
for help on using the changeset viewer.