Changeset 41 for 1dwg


Ignore:
Timestamp:
May 19, 2008 3:00:01 PM (12 years ago)
Author:
prjemian
Message:

updated wiki documentation for IgorPro? binding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 1dwg/trunk/IgorPro/readme.wiki

    r31 r41  
    2424|- 
    2525! {{Headcellstyle}} | date 
    26 || 2008-03-31 
     26|| 2008-05-19 
     27|- 
     28! {{Headcellstyle}} | version 
     29|| 1.07  ('''requires''' latest XMLutils XOP -- see below) 
    2730|- 
    2831! {{Headcellstyle}} | purpose 
     
    3336|- 
    3437! {{Headcellstyle}} | requires 
    35 || IgorPro: http://www.wavemetrics.com <br /> XMLutils - XOP: http://www.igorexchange.com/project/XMLutils 
     38|| IgorPro: http://www.wavemetrics.com <br /> XMLutils - XOP: http://www.igorexchange.com/project/XMLutils (IGOR.5.04.x-1.x-dev, 2008-May-19) 
    3639|- 
    3740|} 
     
    115118**0 successful 
    116119**-1: XML file not found 
    117 **-2: root element is not <SASroot> 
     120**-2: root element is not <SASroot> with valid canSAS namespace 
    118121**-3: <SASroot> version  is not 1.0 
    119 **-4: no <SASentry> elements 
    120 ;CS_1i_parseXml(fileID): given a file ID returned from '''XMLOpenFile()''', parses that file for SAS data and metadata 
    121 ;CS_1i_collectMetadata(fileID, sasEntryPath): gathers metadata from the named SASentry (XPathStr) 
    122 ;CS_appendMetaData(key, xpath, value): queries XML file for '''xpath'''.  If '''value''' is not empty, appends it to '''metadata''' where ''last'' is the new last row: <nowiki>metadata[last][0]=key; metadata[last][1]=value</nowiki> 
     122**-4: no <SASentry> elements (NOT USED NOW) 
     123**-5: XOPutils needs upgrade 
     124;CS_1i_parseXml(fileID): '''This is what guides the work''', given a file ID returned from '''XMLOpenFile()''', parses that file for SAS data and metadata <br /> (1i in the function name signifies this is a function that supports INPUT from version 1.0 XML files) 
     125;CS_1i_getOneSASdata(fileID, Title, SASdataPath): harvest the data and metadata in the specific SASdata element 
     126;CS_1i_getOneVector(file,prefix,XML_name,Igor_name): harvest just one column (vector) of data 
     127;CS_1i_GetReducedSASdata(fileID, SASdataPath): grab the data and put it in the working data folder 
     128;CS_1i_locateTitle(fileID, SASentryPath): determine the title for this experiment 
     129;CS_appendMetaData(fileID, key, xpath, value): queries XML file for '''xpath'''.  If '''value''' is not empty, appends it to '''metadata''' where ''last'' is the new last row: <nowiki>metadata[last][0]=key; metadata[last][1]=value</nowiki> 
     130;CS_buildXpathStr(prefix, value): this function can be used only with very simple XPath constructions 
     131;CS_cleanFolderName(proposal): given a proposal string, returns a candidate folder name for immediate use 
    123132;CS_findElementIndex(matchStr): looks for element index in structure ''W_ElementList'' returned from call to '''XmlElemList(fileID)''' 
     133;CS_getDefaultNamespace(fileID): returns the string containing the default namespace for the XML file 
    124134;CS_registerNameSpaces(): Builds a table of all namespaces used in the XML file and appends '''W_ElementList''' with full namespace-xpath string for each element. 
     135;CS_simpleXmlListXpath(fileID, prefix, value): Calls '''XMLlistXpath()''' with proper namespace prefix attached. 
     136;CS_simpleXmlWaveFmXpath(fileID, prefix, value): Calls '''XMLwaveFmXpath()''' with proper namespace prefix attached. 
     137;CS_updateWaveNote(wavName, key, value): adds (or replaces) definition of ''key''=''value'' in the wave note of ''wavName'' 
     138;CS_XmlStrFmXpath(fileID, prefix, value): Calls '''XmlStrFmXpath()''' with proper namespace prefix attached.  Trims the result string. 
    125139;CS_XPath_NS(simpleStr): this function adds namespace info as necessary to simpleStr (an XPath) 
    126 ;CS_buildXpathStr(prefix, value): this function can be used only with very simple XPath constructions 
    127 ;CS_XmlStrFmXpath(fileID, prefix, value): Calls '''XmlStrFmXpath()''' with proper namespace prefix attached.  Trims the result string. 
    128 ;CS_simpleXmlWaveFmXpath(fileID, prefix, value): Calls '''XMLwaveFmXpath()''' with proper namespace prefix attached. 
    129 ;CS_simpleXmlListXpath(fileID, prefix, value): Calls '''XMLlistXpath()''' with proper namespace prefix attached. 
    130140;TrimWS(str): Calls '''TrimWSL(TrimWSR(str))''' 
    131141;TrimWSL(str): Trims white space from left (leading) end of '''str''' 
    132142;TrimWSR(str): Trims white space from right (trailing) end of '''str''' 
    133 ;CS_updateWaveNote(wavName, key, value): adds (or replaces) definition of ''key''=''value'' in the wave note of ''wavName'' 
    134 ;CS_1i_extractIdataColumn2Wave(fileID, basePath, colName, wavName): This function pulls one column of data from each <nowiki><Idata></nowiki> element.  It is easier to write this as a single function than debug it all the times it is needed. <br /> Avoid the use of the semicolon in anything that might make it into the IgorPro wavenote since the semicolon is a list delimiter.  The import macro defends against this by converting all semicolons into the string " :semicolon: " 
    135 ;CS_1i_extractSasData(fileID, SASdataPath, SASdata_folder): (1i in the function name signifies this is a function that supports INPUT from version 1.0 XML files) 
     143;prjTest_cansas1d(): Demonstration function that calls '''CS_XmlReader(fileName)''' for many of the test data sets. 
    136144;prj_grabMyXmlData(): Demonstration function that moves loaded data from <nowiki>root:Packages:CS_XMLreader</nowiki> to a user's data folder.  (In this ''example'', that folder is <nowiki>root:PRJ_canSAS</nowiki>.) 
    137 ;prjTest_cansas1d(): Demonstration function that calls '''CS_XmlReader(fileName)''' for many of the test data sets. 
     145;testCollette(): Demonstration function that reads an ISIS/LOQ file and copies the data to the root folder a la COLLETE 
Note: See TracChangeset for help on using the changeset viewer.