Ignore:
Timestamp:
Apr 7, 2010 1:02:12 PM (13 years ago)
Author:
srkline
Message:

Fixed the issue with USANS XML data not being written correctly. the structure had not been filled in completely. USANS XML is a "4-column" format with the ususal 3 plus a 4th of -dQv. The XML reader properly looks for the named entry "dQl" to identify the 4th column as USANS data, and handles it appropriately.

fixed a separate issue with reading USANS XML files. dQv was not being read in correctly, now it is.

File:
1 edited

Legend:

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

    r667 r669  
    211211         
    212212        SVAR USANSFolder = root:Packages:NIST:USANS:Globals:gUSANSFolder 
     213        NVAR dQv = root:Packages:NIST:USANS:Globals:MainPanel:gDQv 
    213214         
    214215        Struct NISTXMLfile nf 
     
    237238        Endif 
    238239         
    239         //Use the evil extra column. Should probably switch to using slit_length in collimation. 
     240        //Use the evil extra column for the resolution "information". Should probably switch to using slit_length in collimation. 
    240241        Duplicate/O qvals,dumWave 
    241         NVAR DQv=$(USANSFolder+":Globals:MainPanel:gDQv") 
    242         dumWave = - DQv 
     242        dumWave = - dQv 
    243243        /// 
    244244         
     
    254254        Endif 
    255255         
    256         //actually open the file here 
    257         //Open refNum as fullpath 
    258          
    259256        //Data 
    260257        Wave nf.Q = qvals 
     
    264261        Wave nf.Idev = sig 
    265262        nf.unitsIdev = "1/cm" 
    266         Wave nf.dQl = sigmaq 
     263        // for slit-smeared USANS, set only a 4th column to  -dQv 
     264        Wave nf.dQl = dumWave 
    267265        nf.unitsdQl= "1/A" 
    268          
    269          
     266 
    270267        //write out the standard header information 
    271268        //fprintf refnum,"FILE: %s\t\t CREATED: %s\r\n",textw[0],textw[1] 
     
    345342        //write confirmation of write operation to history area 
    346343        Print "Averaged XML File written: ", GetFileNameFromPathNoSemi(fullPath) 
    347         KillWaves/Z tempShortProto 
     344        KillWaves/Z dumWave 
    348345        Return(0) 
    349346End 
     
    468465        SetDataFolder root:             //(redundant) 
    469466         
     467        KillWaves/Z res1,res2,res2,ti,te,tq 
     468         
    470469        Return(0) 
    471470End 
Note: See TracChangeset for help on using the changeset viewer.