Changeset 251
- Timestamp:
- Aug 29, 2012 2:09:57 AM (8 years ago)
- Location:
- 1dwg/trunk/doc/source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
1dwg/trunk/doc/source/binding-igorpro.rst
r250 r251 168 168 169 169 170 .. index:: IgorPro ; *CS_XmlReader()*170 .. index:: IgorPro function; CS_XmlReader() 171 171 172 172 What it does … … 266 266 267 267 268 List ofFunctions268 Important Functions 269 269 ==================== 270 270 271 271 .. index:: 272 single: IgorPro; *CS_XmlReader()* 273 single: IgorPro; *prj_grabMyXmlData()* 274 single: IgorPro; *prjTest_cansas1d()* 275 276 These are (most of) the FUNCTIONS in the *cansasXML.ipf* code. 277 The only functions of interest are: 272 single: IgorPro function; CS_XmlReader() 273 single: IgorPro function; prj_grabMyXmlData() 274 single: IgorPro function; prjTest_cansas1d() 275 276 These are the important FUNCTIONS in the *cansasXML.ipf* code. 278 277 279 278 *CS_XmlReader(fileName)* … … 285 284 286 285 287 288 289 290 291 .. 292 <section> 293 <title></title> 294 <itemizedlist mark="opencircle"> 295 <listitem> 296 <para> 297 <emphasis role="bold">CS_XmlReader(fileName)*: 298 <indexterm> 299 <primary>binding</primary> 300 <secondary>IgorPro</secondary> 301 <tertiary>*CS_XmlReader()*</tertiary> 302 </indexterm> 303 open a canSAS 1-D 304 reduced SAS XML data file </para> 305 </listitem> 306 </itemizedlist> 307 <itemizedlist mark="opencircle"> 308 <listitem> 309 <para> input: *fileName* (string) name of canSAS XML file (can 310 include file system path name to file) </para> 311 </listitem> 312 <listitem> 313 <para> returns: </para> 314 <itemizedlist mark="opencircle"> 315 <listitem> 316 <para> 0 successful </para> 317 </listitem> 318 <listitem> 319 <para> -1: XML file not found </para> 320 </listitem> 321 <listitem> 322 <para> -2: root element is not SASroot with valid canSAS namespace </para> 323 </listitem> 324 <listitem> 325 <para> -3: SASroot version is not 1.0 </para> 326 </listitem> 327 <listitem> 328 <para> -4: no SASentry elements (NOT USED NOW) </para> 329 </listitem> 330 <listitem> 331 <para> -5: XOPutils needs upgrade </para> 332 </listitem> 333 </itemizedlist> 334 </listitem> 335 </itemizedlist> 336 <itemizedlist mark="opencircle"> 337 <listitem> 338 <para> CS_1i_parseXml(fileID): 339 <indexterm> 340 <primary>binding</primary> 341 <secondary>IgorPro</secondary> 342 <tertiary>*CS_1i_parseXml()*</tertiary> 343 </indexterm> 344 <emphasis role="bold">This is what guides the 345 work*, given a file ID returned from <emphasis role="bold" 346 >XMLOpenFile()*, parses that file for SAS data and metadata 347 <indexterm><primary>metadata</primary></indexterm> 348 (1i in the function name signifies this is a function that supports 349 INPUT from version 1.0 XML files) </para> 350 </listitem> 351 <listitem> 352 <para> CS_1i_getOneSASdata(fileID, Title, SASdataPath) : 353 <indexterm> 354 <primary>binding</primary> 355 <secondary>IgorPro</secondary> 356 <tertiary>*CS_1i_getOneSASdata()*</tertiary> 357 </indexterm> 358 harvest the data and metadata 359 <indexterm><primary>metadata</primary></indexterm> 360 in the specific SASdata element </para> 361 </listitem> 362 <listitem> 363 <para> CS_1i_getOneVector(file,prefix,XML_name,Igor_name) : 364 <indexterm> 365 <primary>binding</primary> 366 <secondary>IgorPro</secondary> 367 <tertiary>*CS_1i_getOneVector()*</tertiary> 368 </indexterm> 369 harvest just one column 370 (vector) of data </para> 371 </listitem> 372 <listitem> 373 <para> CS_1i_GetReducedSASdata(fileID, SASdataPath) : 374 <indexterm> 375 <primary>binding</primary> 376 <secondary>IgorPro</secondary> 377 <tertiary>*CS_1i_GetReducedSASdata()*</tertiary> 378 </indexterm> 379 grab the data and put it in 380 the working data folder </para> 381 </listitem> 382 <listitem> 383 <para> CS_1i_locateTitle(fileID, SASentryPath) : 384 <indexterm> 385 <primary>binding</primary> 386 <secondary>IgorPro</secondary> 387 <tertiary>*CS_1i_locateTitle()*</tertiary> 388 </indexterm> 389 determine the title for this 390 experiment </para> 391 </listitem> 392 <listitem> 393 <para> CS_appendMetaData(fileID, key, xpath, value) : 394 <indexterm> 395 <primary>binding</primary> 396 <secondary>IgorPro</secondary> 397 <tertiary>*CS_appendMetaData()*</tertiary> 398 </indexterm> 399 queries XML file for <emphasis 400 role="bold">xpath*. If <emphasis role="bold">value* is 401 not empty, appends it to <emphasis role="bold">metadata* 402 <indexterm><primary>metadata</primary></indexterm> 403 where *last* is the new last row: metadata[last][0]=key; 404 metadata[last][1]=value </para> 405 </listitem> 406 <listitem> 407 <para> CS_buildXpathStr(prefix, value) : 408 <indexterm> 409 <primary>binding</primary> 410 <secondary>IgorPro</secondary> 411 <tertiary>*CS_buildXpathStr()*</tertiary> 412 </indexterm> 413 this function can be used only with very 414 simple XPath constructions </para> 415 </listitem> 416 <listitem> 417 <para> CS_cleanFolderName(proposal) : 418 <indexterm> 419 <primary>binding</primary> 420 <secondary>IgorPro</secondary> 421 <tertiary>*CS_cleanFolderName()*</tertiary> 422 </indexterm> 423 given a proposal string, returns a candidate 424 folder name for immediate use </para> 425 </listitem> 426 <listitem> 427 <para> CS_findElementIndex(matchStr) : 428 <indexterm> 429 <primary>binding</primary> 430 <secondary>IgorPro</secondary> 431 <tertiary>*CS_findElementIndex()*</tertiary> 432 </indexterm> 433 looks for element index in structure 434 *W_ElementList* returned from call to <emphasis 435 role="bold">XmlElemList(fileID)* 436 </para> 437 </listitem> 438 <listitem> 439 <para> CS_getDefaultNamespace(fileID) : 440 <indexterm> 441 <primary>binding</primary> 442 <secondary>IgorPro</secondary> 443 <tertiary>*CS_getDefaultNamespace()*</tertiary> 444 </indexterm> 445 returns the string containing the default 446 namespace for the XML file </para> 447 </listitem> 448 <listitem> 449 <para> CS_registerNameSpaces() : 450 <indexterm> 451 <primary>binding</primary> 452 <secondary>IgorPro</secondary> 453 <tertiary>*CS_registerNameSpaces()*</tertiary> 454 </indexterm> 455 Builds a table of all namespaces used in the XML 456 file and appends <emphasis role="bold">W_ElementList* with full 457 namespace-xpath string for each element. </para> 458 </listitem> 459 <listitem> 460 <para> CS_simpleXmlListXpath(fileID, prefix, value) : 461 <indexterm> 462 <primary>binding</primary> 463 <secondary>IgorPro</secondary> 464 <tertiary>*CS_simpleXmlListXpath()*</tertiary> 465 </indexterm> 466 Calls <emphasis role="bold" 467 >XMLlistXpath()* with proper namespace prefix attached. </para> 468 </listitem> 469 <listitem> 470 <para> CS_simpleXmlWaveFmXpath(fileID, prefix, value) : 471 <indexterm> 472 <primary>binding</primary> 473 <secondary>IgorPro</secondary> 474 <tertiary>*CS_simpleXmlWaveFmXpath()*</tertiary> 475 </indexterm> 476 Calls <emphasis role="bold" 477 >XMLwaveFmXpath()* with proper namespace prefix attached. </para> 478 </listitem> 479 <listitem> 480 <para> CS_updateWaveNote(wavName, key, value) : 481 <indexterm> 482 <primary>binding</primary> 483 <secondary>IgorPro</secondary> 484 <tertiary>*CS_updateWaveNote()*</tertiary> 485 </indexterm> 486 adds (or replaces) definition of 487 *key*=*value* in the wave note of 488 *wavName* 489 </para> 490 </listitem> 491 <listitem> 492 <para> CS_XmlStrFmXpath(fileID, prefix, value) : 493 <indexterm> 494 <primary>binding</primary> 495 <secondary>IgorPro</secondary> 496 <tertiary>*CS_XmlStrFmXpath()*</tertiary> 497 </indexterm> 498 Calls <emphasis role="bold" 499 >XmlStrFmXpath()* with proper namespace prefix attached. Trims the 500 result string. </para> 501 </listitem> 502 <listitem> 503 <para> CS_XPath_NS(simpleStr) : 504 <indexterm> 505 <primary>binding</primary> 506 <secondary>IgorPro</secondary> 507 <tertiary>*CS_XPath_NS()*</tertiary> 508 </indexterm> 509 this function adds namespace info as necessary to 510 simpleStr (an XPath) </para> 511 </listitem> 512 <listitem> 513 <para> TrimWS(str) : 514 <indexterm> 515 <primary>binding</primary> 516 <secondary>IgorPro</secondary> 517 <tertiary>*TrimWS()*</tertiary> 518 </indexterm> 519 Calls <emphasis role="bold">TrimWSL(TrimWSR(str))* 520 </para> 521 </listitem> 522 <listitem> 523 <para> TrimWSL(str) : 524 <indexterm> 525 <primary>binding</primary> 526 <secondary>IgorPro</secondary> 527 <tertiary>*TrimWSL()*</tertiary> 528 </indexterm> 529 Trims white space from left (leading) end of <emphasis 530 role="bold">str* 531 </para> 532 </listitem> 533 <listitem> 534 <para> TrimWSR(str) : 535 <indexterm> 536 <primary>binding</primary> 537 <secondary>IgorPro</secondary> 538 <tertiary>*TrimWSR()*</tertiary> 539 </indexterm> 540 Trims white space from right (trailing) end of <emphasis 541 role="bold">str* 542 </para> 543 </listitem> 544 <listitem> 545 <para> prjTest_cansas1d() : 546 <indexterm> 547 <primary>binding</primary> 548 <secondary>IgorPro</secondary> 549 <tertiary>*prjTest_cansas1d()*</tertiary> 550 </indexterm> 551 Demonstration function that calls <emphasis role="bold" 552 >CS_XmlReader(fileName)* for many of the test data sets. </para> 553 </listitem> 554 <listitem> 555 <para> prj_grabMyXmlData() : 556 <indexterm> 557 <primary>binding</primary> 558 <secondary>IgorPro</secondary> 559 <tertiary>*prj_grabMyXmlData()*</tertiary> 560 </indexterm> 561 Demonstration function that moves loaded data from 562 root:Packages:CS_XMLreader to a user's data folder. (In this 563 *example*, that folder is root:PRJ_canSAS.) </para> 564 </listitem> 565 <listitem> 566 <para> testCollette() : 567 <indexterm> 568 <primary>binding</primary> 569 <secondary>IgorPro</secondary> 570 <tertiary>*testCollette()*</tertiary> 571 </indexterm> 572 Demonstration function that reads an ISIS/LOQ file and 573 copies the data to the root folder a la COLLETE </para> 574 </listitem> 575 </itemizedlist> 576 </section> 577 578 579 580 581 <section> 582 <title>Example test case</title> 583 <para> Here is an example running the test routine *prjTest_cansas1d()*. 584 <programlisting linenumbering="numbered"> 286 .. put the rest of the function descriptions in the source code file, not very useful here 287 288 289 Example test case 290 ================= 291 292 Here is an example running the test routine *prjTest_cansas1d()*. 293 294 .. code-block:: text 295 :linenos: 296 585 297 *prjTest_cansas1d() 586 298 XMLopenfile: File(path) to open doesn't exist, or file can't be opened … … 660 372 Title: S7 Neat Polyurea 661 373 Completed in 0.0361616 seconds 662 </programlisting> 663 </para> 664 </section> 665 <section> 666 <title>IgorPro Graphical User Interface</title> 667 <para> At least two groups are working on graphical user 668 interfaces that use the canSAS 1-D 669 SAS XML format binding to IgorPro. The GUIs are intended 670 to be used with their suites of 671 SAS analysis tools (and hide the details of using this 672 support code from the user). </para> 673 <para> NOTE: There is no support yet for writing the data 674 back into the canSAS format. 675 Several details need to be described, and these are 676 being collected on the discussion 677 page for the XML format </para> 678 <section> 679 <title>Irena tool suite</title> 680 <para> Jan Ilavsky's 681 <link 682 xlink:href="http://usaxs.xor.aps.anl.gov/staff/ilavsky/irena.htm" 683 ><emphasis role="bold">Irena*</link><footnote> 684 <para> 685 <link xlink:href="http://usaxs.xor.aps.anl.gov/staff/ilavsky/irena.htm" 686 ><literal 687 >http://usaxs.xor.aps.anl.gov/staff/ilavsky/irena.htm*</link> 688 </para> 689 </footnote> 690 <indexterm significance="preferred"> 691 <primary>IgorPro package</primary> 692 <secondary>Irena tool suite</secondary> 693 </indexterm> 694 tool suite for IgorPro has a GUI to 695 load the data found in the XML file. 696 Refer to the WWW site for more details. </para> 697 </section> 698 </section> 374 375 IgorPro Graphical User Interface 376 ================================== 377 378 At least two groups are working on graphical user 379 interfaces that use the canSAS 1-D 380 SAS XML format binding to IgorPro. The GUIs are intended 381 to be used with their suites of 382 SAS analysis tools (and hide the details of using this 383 support code from the user). 384 385 .. note:: There is no support yet for writing the data 386 back into the canSAS format. 387 Several details need to be described, and these are 388 being collected on the discussion 389 page for the XML format 390 391 392 .. index:: ! IgorPro package; Irena tool suite 393 394 Irena tool suite 395 ----------------- 396 397 Jan Ilavsky's **Irena** tool suite 398 for IgorPro has a GUI to 399 load the data found in the XML file. 400 Refer to http://usaxs.xor.aps.anl.gov/staff/ilavsky/irena.htm for more details. -
1dwg/trunk/doc/source/binding-python.rst
r250 r251 65 65 python setup.py install_all 66 66 67 .. index:: Python file; *python-test.py*67 .. index:: Python file; python-test.py 68 68 69 69 Quick test in Python -
1dwg/trunk/doc/source/downloads.rst
r242 r251 6 6 Downloads 7 7 ========= 8 9 .. note:: This page could use improvement! 8 10 9 11 Version 1.0 -
1dwg/trunk/doc/source/elements.rst
r244 r251 6 6 Elements of the canSAS XML standard 7 7 =================================================== 8 9 .. note:: This entire chapter needs to be converted from DocBook! 8 10 9 11 .. _XML Header: … … 21 23 22 24 SASentry 25 ============== 26 27 .. _Title: 28 29 Title 30 ============== 31 32 .. _Run: 33 34 Run 23 35 ============== 24 36 -
1dwg/trunk/doc/source/overview.rst
r250 r251 97 97 .. index: element; SASroot 98 98 .. index: element; SASentry 99 .. index: element; Title 100 .. index: element; Run 99 101 .. index: element; SASdata 100 102 .. index: element; Idata … … 118 120 :ref:`SASroot` root element of XML file 119 121 :ref:`SASentry` data set, time-slice, step in a series, new sample, etc. 120 : index:`Title`for this particular :ref:`SASentry`121 : index:`Run`run number or ID number of experiment122 :ref:`Title` for this particular :ref:`SASentry` 123 :ref:`Run` run number or ID number of experiment 122 124 :ref:`{any}` any XML element can be used at this point 123 125 :ref:`SASdata` this is where the reduced 1-D SAS data is stored
Note: See TracChangeset
for help on using the changeset viewer.