Ignore:
Timestamp:
Jul 22, 2019 4:16:46 PM (3 years ago)
Author:
krzywon
Message:

Create a method to open or create a new file for all NXcanSAS writers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/branches/nxcansas_writer/NCNR_User_Procedures/Reduction/VSANS/V_Write_VSANS_NXcanSAS.ipf

    r1186 r1187  
    1515        NewDataFolder/O/S $(base) 
    1616         
     17        // Check fullpath and dialog 
     18        fileID = NXcanSAS_OpenOrCreate(dialog,saveName,base) 
    1719        SetDataFolder $(pathStr+folderStr) 
    18          
    19         // Check fullpath and dialog 
    20         if(stringmatch(saveName, "")) 
    21                 fileID = NxCansas_DoSaveFileDialog() 
    22         else 
    23                 fileID = NxCansas_CreateFile(saveName) 
    24         Endif 
    25         if(!fileID) 
    26                 abort "Unable to create file at " + saveName + "." 
    27         EndIf 
    2820         
    2921        Variable sasentry = NumVarOrDefault("root:Packages:NIST:gSASEntryNumber", 1) 
     
    6961        // Run Name and title 
    7062        NewDataFolder/O/S $(parentBase) 
    71         Make/O/T/N=1 $(parentBase + ":title") = {V_getTitle(folderStr)} 
     63        Make/O/T/N=1 $(parentBase + ":title") = {V_getSampleDescription(folderStr)} 
    7264        CreateStrNxCansas(fileID,nxcansasBase,"","title",$(parentBase + ":title"),empty,empty) 
    7365        Make/O/T/N=1 $(parentBase + ":run") = {V_getExperiment_identifier(folderStr)} 
     
    8577        // TODO: Reinstate Qdev/resolutions when I can fix the reader issue 
    8678        // 
    87         // Create q entry 
     79        // Create qx and qy entry 
    8880        NewDataFolder/O/S $(dataBase + ":q") 
    8981        Make/O/T/N=2 $(dataBase + ":q:attr") = {"units"}//,"resolutions"} 
     
    148140         
    149141        // Check fullpath and dialog 
    150         if(dialog == 1 || stringmatch(saveName, "")) 
    151                 fileID = NxCansas_DoSaveFileDialog() 
    152         else 
    153                 fileID = NxCansas_CreateFile(saveName) 
    154         Endif 
    155         if(!fileID) 
    156                 abort "Unable to create file at " + saveName + "." 
    157         EndIf 
     142        fileID = NXcanSAS_OpenOrCreate(dialog,saveName,base) 
    158143                 
    159144        Variable sasentry = NumVarOrDefault("root:Packages:NIST:gSASEntryNumber", 1) 
Note: See TracChangeset for help on using the changeset viewer.