Ignore:
Timestamp:
Jun 30, 2008 8:49:58 PM (15 years ago)
Author:
srkline
Message:

Changed NCNR_ raw data reader to get the magnetic field strength (actually the voltage) from byte 348, rather than 190.

Added Jan Ilavsky's fixes to all data loaders to accept 2-column data. A fake error is generated for the data set as read in, so the data can be treated as 3-column data from that point.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/USANS/PlotUtils_USANS.ipf

    r328 r392  
    1313        LoadWave/G/D/A 
    1414        String filename = S_fileName 
    15          
    16         if(V_flag==3) 
     15        Variable numCols = V_flag 
     16         
     17        //changes JIL 
     18        if(numCols==2)          //no errors      
     19                n1 = StringFromList(1, S_waveNames ,";" )                
     20                Duplicate/O $("root:"+n1), errorTmp 
     21                 errorTmp = 0.01*(errorTmp)+ 0.03*sqrt(errorTmp) 
     22                S_waveNames+="errorTmp;" 
     23                numCols=3 
     24        endif 
     25         
     26        if(numCols==3) 
    1727                String w0,w1,w2,n0,n1,n2,wt 
    1828                Variable rr,gg,bb 
     
    100110        endif 
    101111         
    102         if(V_flag == 6) 
     112        if(numCols == 6) 
    103113                String w0,w1,w2,n0,n1,n2,wt 
    104114                String w3,w4,w5,n3,n4,n5                        //3 extra waves to load 
     
    202212        endif 
    203213 
    204         if(V_flag==5) 
     214        if(numCols==5) 
    205215                String w0,w1,w2,n0,n1,n2,w3,n3,w4,n4 
    206216                Variable rr,gg,bb 
     
    283293        LoadWave/G/D/A/Q fileStr 
    284294        String fileName = S_fileName 
    285          
    286         if(V_flag==3) 
     295        Variable numCols = V_flag 
     296         
     297        //changes JIL 
     298        if(numCols==2)          //no errors      
     299                n1 = StringFromList(1, S_waveNames ,";" )                
     300                Duplicate/O $("root:"+n1), errorTmp 
     301                 errorTmp = 0.01*(errorTmp)+ 0.03*sqrt(errorTmp) 
     302                S_waveNames+="errorTmp;" 
     303                numCols=3 
     304        endif 
     305         
     306        if(numCols==3) 
    287307                String w0,w1,w2,n0,n1,n2,wt 
    288308                 
     
    327347        endif 
    328348         
    329         if(V_flag == 6) 
     349        if(numCols == 6) 
    330350                String w0,w1,w2,n0,n1,n2,wt 
    331351                String w3,w4,w5,n3,n4,n5                        //3 extra waves to load 
     
    385405        endif 
    386406 
    387         if(V_flag==5) 
     407        if(numCols==5) 
    388408                String w0,w1,w2,n0,n1,n2,w3,n3,w4,n4 
    389409                Variable rr,gg,bb 
Note: See TracChangeset for help on using the changeset viewer.