- Timestamp:
- Mar 10, 2015 10:50:03 AM (8 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures
- Files:
-
- 1 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_FillMatrixShapes.ipf
r943 r953 350 350 y1 = yc - trunc(rad/grid) - 2 351 351 y2 = yc + trunc(rad/grid) + 2 352 353 352 354 353 y1 = y1 < 0 ? 0 : y1 … … 807 806 Function XYZV_FillMat_Centered(xx,yy,zz,xc,yc,zc,rad,len,val,erase) 808 807 Wave xx,yy,zz 809 Variable xc,yc,zc,rad,len 810 Wave val 811 Variable erase 808 Variable xc,yc,zc,rad,len,val,erase 812 809 813 810 Variable x1,x2,y1,y2,z1,z2,ii,jj,kk,num,npt,minp,maxp … … 817 814 NVAR FFT_T=root:FFT_T 818 815 819 if(erase )816 if(erase == 1) 820 817 mat = solventSLD 821 818 endif … … 824 821 825 822 for(ii=0;ii<num;ii+=1) 826 mat[xx[ii]][yy[ii]][zz[ii]] = val [ii]823 mat[xx[ii]][yy[ii]][zz[ii]] = val 827 824 endfor 828 825 -
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_KR_Parser.ipf
r943 r953 61 61 KR_MultiCylinder_Units(xx,yy,zz,rri,hti,sbp,rotx,roty,sld) 62 62 63 XYZV_FillMat_Centered(xoutW,youtW,ZoutW,xc,yc,zc,rad,len, sldW,0) //last 1 will erase the matrix, 0 retains matrix63 XYZV_FillMat_Centered(xoutW,youtW,ZoutW,xc,yc,zc,rad,len,fill,0) //last 1 will erase the matrix, 0 retains matrix 64 64 65 65 //force a redraw (re-coloring) of the gizmo window -
sans/Dev/trunk/NCNR_User_Procedures/Common/cansasXML.ipf
r928 r953 1 #pragma rtGlobals=1 // Use modern global access method.2 #pragma version=1.1 13 #pragma IgorVersion=6.1 4 5 // taken from smallangles.net on 02 APR 20101 #pragma rtGlobals=1 // rtGlobals=3 requires IgorPro 6.3+ 2 #pragma version=1.12 3 4 // SRK 5 // taken from smallangles.net on 10 MAR 2015 6 6 // changed Function/T to Function/S on (unused) TrimWS functions 7 // 8 // 7 9 8 10 // file: cansasXML.ipf … … 13 15 // SVN ID: $Id$ 14 16 // purpose: implement an IgorPro file reader to read the canSAS 1-D reduced SAS data in XML files 15 // adher es to the cansas1d/1.0 standard16 // readme: http://www. smallangles.net/wgwiki/index.php/cansas1d_binding_IgorPro17 // URL: http://www. smallangles.net/wgwiki/index.php/cansas1d_documentation17 // adhering to either the cansas1d/1.0 or cansas1d/1.1 standards 18 // readme: http://www.cansas.org/formats/canSAS1d/1.1/doc/binding-igorpro.html 19 // URL: http://www.cansas.org/formats/canSAS1d/1.1/doc/ 18 20 // 19 21 // requires: IgorPro (http://www.wavemetrics.com/) 20 22 // XMLutils - XOP (http://www.igorexchange.com/project/XMLutils) 21 // provides: CS_ CmlReader(String fileName)23 // provides: CS_XmlReader(String fileName) 22 24 // all other functions in this file should not be relied upon 23 24 // ================================================================== 25 // CS_XmlReader("bimodal-test1.xml") 26 // CS_XmlReader("1998spheres.xml") 27 // CS_XmlReader("xg009036_001.xml") 28 // CS_XmlReader("s81-polyurea.xml") 29 // CS_XmlReader("cs_af1410.xml") 25 // 26 // Copyright (c) 2013, UChicago Argonne, LLC 27 // This file is distributed subject to a Software License Agreement found 28 // in the file LICENSE that is included with this distribution. 29 30 31 // ================ ================ ================= ========== 32 // #pragma version canSAS1d version namespace released 33 // ================ ================ ================= ========== 34 // 1.12 v1.1 urn:cansas1d:1.1 2013-04-01 35 // 1.11 v1.0 cansas1d/1.0 2009-09-25 36 // ================ ================ ================= ========== 37 38 39 // ================================================================== 40 // CS_XmlReader("../examples/bimodal-test1.xml") 41 // CS_XmlReader("../examples/1998spheres.xml") 42 // CS_XmlReader("../examples/xg009036_001.xml") 43 // CS_XmlReader("../examples/s81-polyurea.xml") 44 // CS_XmlReader("../examples/cs_af1410.xml") 30 45 // testCollette(); prjTest_cansas1d() 31 46 // ================================================================== 32 47 33 48 34 #if( Exists("XmlOpenFile") )49 #if( ! Exists("XmlOpenFile") ) 35 50 // BEFORE we do anything else, check that XMLutils XOP is available. 36 51 // No XMLutils XOP: provide dummy function so that IgorPro can compile dependent support code 52 53 FUNCTION CS_XmlReader(fileName) 54 String fileName 55 String msg 56 msg = "XML function provided by XMLutils XOP is not available," 57 msg += " get the XOP from : http://www.igorexchange.com/project/XMLutils" 58 msg += " (see http://www.cansas.org/formats/canSAS1d/1.1/doc/binding-igorpro.html for details)" 59 Abort msg 60 RETURN(-6) 61 END 62 63 #else // if( Exists("XmlOpenFile") ) 37 64 38 65 FUNCTION CS_XmlReader(fileName) … … 43 70 // -1: XML file not found 44 71 // -2: root element is not <SASroot> with valid canSAS namespace 45 // -3: <SASroot> version is not 1.0 72 // -3: <SASroot> version is not 1.0 or 1.1 46 73 // -4: no <SASentry> elements 47 74 // -5: XMLutils XOP needs upgrade … … 115 142 STRSWITCH(ns) 116 143 CASE "cansas1d/1.0": // version 1.0 of the canSAS 1-D reduced SAS data standard 117 // PRINT fileName, "\t\t identified as: cansas1d/1.0 XML file" 144 CASE "urn:cansas1d:1.1": // version 1.1 of the canSAS 1-D reduced SAS data standard 145 PRINT fileName, "\t\t identified as: " + ns + " XML file" 118 146 returnCode = CS_1i_parseXml(fileID) // This is where the action happens! 119 147 IF (returnCode != 0) … … 154 182 STRING ns = "", thisLocation 155 183 VARIABLE i, item 156 MAKE/T/N=( 1)/O nsList // list of all possible namespaces184 MAKE/T/N=(2)/O nsList // list of all possible namespaces 157 185 nsList[0] = "cansas1d/1.0" // first version of canSAS 1-D reduced SAS 186 nsList[1] = "urn:cansas1d:1.1" // second version of canSAS 1-D reduced SAS 158 187 159 188 FOR (item = 0; item < DimSize(nsList, 0); item += 1) // loop over all possible namespaces … … 236 265 ENDFOR 237 266 ENDIF 267 268 // TODO: process any transmission spectra 269 STRING/G ns = CS_getDefaultNamespace(fileID) 270 IF (cmpstr(ns, "urn:cansas1d:1.1") == 0) 271 XmlListXpath(fileID, SASentryPath + "//cs:SAStransmission_spectrum", nsStr) 272 WAVE/T M_listXPath 273 print "Searching for SAStransmission_spectrum groups" 274 print DimSize(M_listXPath, 0) , M_listXPath 275 // ... 276 ENDIF 277 238 278 KillWaves/Z M_listXPath 239 279 ENDFOR … … 613 653 TitlePath = "" 614 654 ENDIF 615 //PRINT "\t Title:", Title655 PRINT "\t Title:", Title 616 656 RETURN(Title) 617 657 END … … 714 754 fList = AddListItem("elmo.xml", fList, ";", Inf) // non-existent file 715 755 fList = AddListItem("cansasXML.ipf", fList, ";", Inf) // this file (should fail on XML parsing) 716 fList = AddListItem("book.xml", fList, ";", Inf) // good XML example file but not canSAS, not even close 717 fList = AddListItem("bimodal-test1.xml", fList, ";", Inf) // simple dataset 718 fList = AddListItem("bimodal-test2-vector.xml", fList, ";", Inf) // version 2.0 file (no standard yet) 719 fList = AddListItem("test.xml", fList, ";", Inf) // cs_collagen.xml with no namespace 720 fList = AddListItem("test2.xml", fList, ";", Inf) // version 2.0 file (no standard yet) 721 fList = AddListItem("ISIS_SANS_Example.xml", fList, ";", Inf) // from S. King, 2008-03-17 722 fList = AddListItem("W1W2.xml", fList, ";", Inf) // from S. King, 2008-03-17 723 fList = AddListItem("ill_sasxml_example.xml", fList, ";", Inf) // from canSAS 2007 meeting, reformatted 724 fList = AddListItem("isis_sasxml_example.xml", fList, ";", Inf) // from canSAS 2007 meeting, reformatted 725 fList = AddListItem("r586.xml", fList, ";", Inf) // from canSAS 2007 meeting, reformatted 726 fList = AddListItem("r597.xml", fList, ";", Inf) // from canSAS 2007 meeting, reformatted 727 fList = AddListItem("xg009036_001.xml", fList, ";", Inf) // foreign elements with other namespaces 728 fList = AddListItem("cs_collagen.xml", fList, ";", Inf) // another simple dataset, bare minimum info 729 fList = AddListItem("cs_collagen_full.xml", fList, ";", Inf) // more Q range than previous 730 fList = AddListItem("cs_af1410.xml", fList, ";", Inf) // multiple SASentry and SASdata elements 731 fList = AddListItem("cansas1d-template.xml", fList, ";", Inf) // multiple SASentry and SASdata elements 732 fList = AddListItem("1998spheres.xml", fList, ";", Inf) // 2 SASentry, few thousand data points each 733 fList = AddListItem("does-not-exist-file.xml", fList, ";", Inf) // non-existent file 734 fList = AddListItem("cs_rr_polymers.xml", fList, ";", Inf) // Round Robin polymer samples from John Barnes @ NIST 735 fList = AddListItem("s81-polyurea.xml", fList, ";", Inf) // polyurea from APS/USAXS/Indra (with extra metadata) 756 fList = AddListItem("../examples/book.xml", fList, ";", Inf) // good XML example file but not canSAS, not even close 757 fList = AddListItem("../examples/bimodal-test1.xml", fList, ";", Inf) // simple dataset 758 fList = AddListItem("../examples/testers/test3.xml", fList, ";", Inf) // no number provided for wavelength, others, too 759 fList = AddListItem("../examples/ISIS_SANS_Example.xml", fList, ";", Inf) // from S. King, 2008-03-17 760 fList = AddListItem("../examples/W1W2.xml", fList, ";", Inf) // from S. King, 2008-03-17 761 fList = AddListItem("../examples/ill_sasxml_example.xml", fList, ";", Inf) // from canSAS 2007 meeting, reformatted 762 fList = AddListItem("../examples/isis_sasxml_example.xml", fList, ";", Inf) // from canSAS 2007 meeting, reformatted 763 fList = AddListItem("../examples/r586.xml", fList, ";", Inf) // from canSAS 2007 meeting, reformatted 764 fList = AddListItem("../examples/r597.xml", fList, ";", Inf) // from canSAS 2007 meeting, reformatted 765 fList = AddListItem("../examples/xg009036_001.xml", fList, ";", Inf) // foreign elements with other namespaces 766 fList = AddListItem("../examples/cs_collagen.xml", fList, ";", Inf) // another simple dataset, bare minimum info 767 fList = AddListItem("../examples/cs_collagen_full.xml", fList, ";", Inf) // more Q range than previous 768 fList = AddListItem("../examples/cs_af1410.xml", fList, ";", Inf) // multiple SASentry and SASdata elements 769 fList = AddListItem("../examples/cs_rr_polymers.xml", fList, ";", Inf) // Round Robin polymer samples from John Barnes @ NIST 770 fList = AddListItem("../examples/cansas1d-template.xml", fList, ";", Inf) // multiple SASentry and SASdata elements 771 fList = AddListItem("../examples/1998spheres.xml", fList, ";", Inf) // 2 SASentry, few thousand data points each 772 fList = AddListItem("../examples/does-not-exist-file.xml", fList, ";", Inf) // non-existent file 773 fList = AddListItem("../examples/s81-polyurea.xml", fList, ";", Inf) // polyurea from APS/USAXS/Indra (with extra metadata) 774 fList = AddListItem("../examples/GLASSYC_C4G8G9_w_TL.xml", fList, ";", Inf) // from S. King, with transmission spectra 736 775 737 776 // try to load each data set in the table … … 759 798 // 3. Loading actual data from LOQ caused some problems. 760 799 // Data created by Colette names files with run number. 761 // When entering full path to load the data if you use "\example\31531.X" Igor will read \3 as a character. 762 // A simple fix which has worked for this is to use / instead of \ e.g. "\example/31531.X". 800 // When entering full path to load the data if you use " 801 \example\31531.X" Igor will read \3 as a character. 802 // A simple fix which has worked for this is to use / instead of \ e.g. " 803 \example/31531.X". 763 804 764 805 //4. Once data is loaded in Igor it is relatively easy to work with but would be nicer if the SASdata … … 769 810 //Say, for Run=31531, then Qsas_31531 770 811 771 CS_XmlReader(" W1W2.XML")812 CS_XmlReader("../examples/W1W2.XML") 772 813 STRING srcDir = "root:Packages:CS_XMLreader" 773 814 STRING destDir = "root", importFolder, target -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VSANS_Includes.ipf
r935 r953 1 1 #pragma rtGlobals=3 // Use modern global access method and strict wave access. 2 2 3 #include "V CALC_PanelMockUp"3 #include "V_VCALCPanel_MockUp" 4 4 #include "V_DetectorBinning" 5 5 #include "V_UtilityProcedures"
Note: See TracChangeset
for help on using the changeset viewer.