Changeset 1195


Ignore:
Timestamp:
Aug 15, 2019 4:09:23 PM (3 years ago)
Author:
krzywon
Message:

Write SASprocess for NSORTed files, but not other meta data.

Location:
sans/Dev/branches/nxcansas_writer/NCNR_User_Procedures
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/branches/nxcansas_writer/NCNR_User_Procedures/Common/NIST_NXcanSAS_v709.ipf

    r1194 r1195  
    578578        endif 
    579579         
    580         process = CreateNSORTProcess(firstFileName,secondFileName,thirdFileName,fourthFileName,normTo,norm12,norm23,norm34) 
    581          
    582580        NewDataFolder/O/S root:Packages:NIST:NSORT 
    583581        SetDataFolder root:Packages:NIST:NSORT 
     582         
     583        process = CreateNSORTProcess(firstFileName,secondFileName,thirdFileName,fourthFileName,normTo,norm12,norm23,norm34) 
     584        Make/O/T/N=1 processNote = process 
    584585         
    585586        Variable pts = numpnts(qw) 
  • sans/Dev/branches/nxcansas_writer/NCNR_User_Procedures/Reduction/SANS/Write_SANS_NXcanSAS.ipf

    r1194 r1195  
    9494        // Write all meta data 
    9595        if (CmpStr(type,"NSORT") == 0) 
    96                 Wave process = $(destStr + ":process") 
    97                 // TODO: Write to file 
     96                Wave/T process = $(destStr + ":processNote") 
     97                String processNote = process[0] 
     98                WriteProcess(fileID,nxcansasBase,parentBase,"NSORTed Data",processNote) 
    9899        Else 
    99100                WriteMetaData(fileID,parentBase,nxcansasBase,rw,textw) 
     
    432433        CreateVarNxCansas(fileID,sampleParent,"","transmission",$(sampleBase + ":transmission"),empty,empty) 
    433434End 
    434          
     435 
     436Function WriteProcess(fileID,parentBase,base,processName,processNote) 
     437        Variable fileID 
     438        String parentBase,base,processName,processNote 
     439        Print "ProcessNote: ",processNote 
     440        // Create SASprocess entry 
     441        Make/T/O/N=1 empty = {""} 
     442        String processParent = parentBase + "sasprocess/" 
     443        String processBase = base + ":sasprocess" 
     444        NewDataFolder/O/S $(processBase) 
     445        Make/O/T/N=5 $(processBase + ":attr") = {"canSAS_class","NX_class"} 
     446        Make/O/T/N=5 $(processBase + ":attrVals") = {"SASprocess","NXprocess"} 
     447        CreateStrNxCansas(fileID,processParent,"","",empty,$(processBase + ":attr"),$(processBase + ":attrVals")) 
     448        // Create SASprocess name entry 
     449        Make/O/T/N=1 $(processBase + ":name") = {processName} 
     450        CreateStrNxCansas(fileID,processParent,"","name",$(processBase + ":name"),empty,empty) 
     451        // Create SASprocess note entries 
     452        Make/O/T/N=1 $(processBase + ":note0") = {processNote} 
     453        CreateStrNxCansas(fileID,processParent,"","note0",$(processBase + ":note0"),empty,empty) 
     454End 
     455 
    435456// 
    436457/////////////////////////////////////////////////////////////////////////// 
Note: See TracChangeset for help on using the changeset viewer.