Ignore:
Timestamp:
Jul 23, 2010 2:18:28 PM (13 years ago)
Author:
srkline
Message:

Fixed typo in the parameter description in CoreShellCylinder?

W_Sigma is now appended to the table in the wrapper panel when a fit is done.
It is cleared whenever functions or data are changed.

The naming of reports is changed to help make the names more descriptive and unique.

DataSetHandling? - -simple checkbox on the graph to change to a linear display
that highlights the high Q - to be sure that data oscillates around zero
after background subtraction (this doesn't have to stay)

Added a crude batch file converter to take the 5-column grasp data (read in as
if it was old-school desmeared USANS data) and write it back out in our 6-column
ASCII format. Did this for Andrea.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Common/DataSetHandling.ipf

    r708 r728  
    66//      Function batchXML26ColConvert() 
    77// 
    8  
     8// Function batchGrasp26ColConvert() 
     9// 
     10// these both need a real interface, and a way to better define the name of the 
     11// converted output file. And some retention of the header would be nice too... 
     12// 
    913 
    1014 
     
    591595        Checkbox DAPlot_log_cb, title="Log I(q)", pos={20,410},value=0 
    592596        Checkbox DAPlot_log_cb, proc=DALogLinIProc 
     597        Checkbox DAPlot_lin_cb, title="High Q Linear", pos={100,410},value=0 
     598        Checkbox DAPlot_lin_cb, proc=DAHighQLinProc 
    593599         
    594600End 
     
    10821088                         
    10831089                        ModifyGraph/W=DAPlotPanel#DAPlot log(left)=cba.checked 
    1084                  
    1085         endswitch 
    1086  
    1087  
    1088 End 
     1090                        ModifyGraph/W=DAPlotPanel#DAPlot log(bottom)=cba.checked 
     1091                        ModifyGraph/W=DAPlotPanel#DAPlot zero(left)=0 
     1092                        SetAxis/A/W=DAPlotPanel#DAPlot 
     1093                         
     1094                        if(cba.checked) 
     1095                                Checkbox DAPlot_lin_cb,value=0          //uncheck lin 
     1096                        endif 
     1097        endswitch 
     1098 
     1099 
     1100End 
     1101 
     1102Function DAHighQLinProc(cba) : CheckBoxControl 
     1103        STRUCT WMCheckBoxAction &cba 
     1104 
     1105        switch(cba.eventcode) 
     1106                case 2: 
     1107                        if(cba.checked) 
     1108                                ModifyGraph/W=DAPlotPanel#DAPlot log=0,zero(left)=1 
     1109                                SetAxis/W=DAPlotPanel#DAPlot left -0.1,0.1 
     1110                                SetAxis/W=DAPlotPanel#DAPlot bottom 0.1,* 
     1111                                SetAxis/W=DAPlotPanel#DAPlot left -0.02,0.02 
     1112                                 
     1113                                Checkbox DAPlot_log_cb,value=0          //uncheck the log 
     1114                        endif 
     1115        endswitch 
     1116 
     1117 
     1118End 
     1119 
    10891120 
    10901121Function DACursorButtonProc(ba) : ButtonControl 
     
    15551586        for(ii=0;ii<num;ii+=1) 
    15561587                item = StringFromList(ii, list ,";") 
     1588                fReWrite1DData_noPrompt(item,"tab","CR") 
     1589        endfor 
     1590         
     1591End 
     1592 
     1593///////// SRK - VERY SIMPLE batch converter 
     1594// NO header information is preserved 
     1595// file names are partially preserved 
     1596// 
     1597 
     1598/// to use this: 
     1599// -open the Plot Manager and set the path 
     1600// -run this function 
     1601// 
     1602// it doesn't matter if the XML ouput flag is set - this overrides. 
     1603// 
     1604// The GRASP output data is 5-column Q-I-errI-sigQ-nCells 
     1605// which gets read in as q-i-s-ism-fit_ism (as if it was some wierd USANS data format) 
     1606// -- so fake the output... 
     1607// 
     1608Function batchGrasp26ColConvert() 
     1609 
     1610        String list, item,path,fname 
     1611        Variable num,ii,npt 
     1612         
     1613        PathInfo CatPathName 
     1614        path = S_Path 
     1615 
     1616        list = A_ReducedDataFileList("") 
     1617        num = itemsInList(list) 
     1618        Print num 
     1619        for(ii=0;ii<num;ii+=1) 
     1620                item = StringFromList(ii, list ,";") 
     1621                fname=path + item 
     1622                Execute "A_LoadOneDDataWithName(\""+fname+"\",0)"               //won't plot 
     1623//              easier to load all, then write out, since the name will be changed 
     1624        endfor 
     1625         
     1626         
     1627        list = DM_DataSetPopupList() 
     1628 
     1629        num = itemsInList(list) 
     1630         
     1631        Print num 
     1632        for(ii=0;ii<num;ii+=1) 
     1633                item = StringFromList(ii, list ,";") 
     1634                 
     1635                // fake the 6-column NIST data structure 
     1636                WAVE qw = $("root:"+item+":"+item+"_q") 
     1637                npt = numpnts(qw) 
     1638                Make/O/D/N=(npt,4) $("root:"+item+":"+item+"_res") 
     1639                WAVE res = $("root:"+item+":"+item+"_res") 
     1640                WAVE sigQ = $("root:"+item+":"+item+"_ism") 
     1641                res[][0] = sigQ[p]      // sigQ 
     1642                res[][1] = qw[p]                // qBar ~ q 
     1643                res[][2] = 1            //shadow 
     1644                res[][3] = qw[p]                // q 
     1645                 
     1646                 
    15571647                fReWrite1DData_noPrompt(item,"tab","CR") 
    15581648        endfor 
     
    16351725                PathInfo/S catPathName 
    16361726//              fullPath = DoSaveFileDialog("Save data as",fname=baseStr+".txt") 
    1637                 fullPath = DoSaveFileDialog("Save data as",fname=baseStr[0,strlen(BaseStr)-2]) 
     1727                fullPath = DoSaveFileDialog("Save data as",fname=baseStr[0,strlen(BaseStr)-1]) 
    16381728                Print fullPath 
    16391729                If(cmpstr(fullPath,"")==0) 
     
    16451735        Endif 
    16461736        PathInfo catPathName 
    1647         fullPath = S_Path + baseStr[0,strlen(BaseStr)-2] 
     1737        fullPath = S_Path + baseStr[0,strlen(BaseStr)-1] 
    16481738 
    16491739        Open refnum as fullpath 
Note: See TracChangeset for help on using the changeset viewer.