Ignore:
Timestamp:
Oct 14, 2009 2:30:17 PM (13 years ago)
Author:
srkline
Message:

Change (1):
In preparation for release, updated pragma IgorVersion?=6.1 in all procedures

Change (2):
As a side benefit of requiring 6.1, we can use the MultiThread? keyword to thread any model function we like. The speed benefit is only noticeable on functions that require at least one integration and at least 100 points (resolution smearing is NOT threaded, too many threadSafe issues, too little benefit). I have chosen to use the MultiThread? only on the XOP assignment. In the Igor code there are too many functions that are not explicitly declared threadsafe, making for a mess.

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS
Files:
10 edited

Legend:

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

    r569 r570  
    11#pragma rtGlobals=1             // Use modern global access method. 
     2#pragma IgorVersion=6.1 
    23 
    34 
     
    1516//  -- but how to save the data? At this point, errCR != sqrt(CR) 
    1617// 
     18// - Why can't I just use the whole set of files from the main USANS panel, and add what needs 
     19//   to be added? Because if there is an angle shift, I have no way of knowing which files to apply 
     20//   the shift to... 
     21// 
     22// 
     23// - need a global for the tolerance (and a good reason to use that particular value) 
     24// 
     25// - do I have anything hard-wired in the code that needs to be generalized before release?  
     26// 
     27// - add descriptions of this to the help files 
     28// 
    1729 
    1830 
     
    2032// - allow user to input Qpeak (maybe of no use?) If so, do it right away with a dialog 
    2133//   if no peak was found. 
    22 // 
    23  
    24 Macro mShowUSANSAddPanel() 
    25 ShowUSANSAddPanel() 
    26 end 
    27  
    28 Macro mSelectFilesToAdd() 
    29         SelectFilesToAdd() 
    30 end 
     34 
     35 
    3136 
    3237Proc ShowUSANSAddPanel() 
     
    723728        Prompt file2, "Second File", popup, BT5FileList("*.bt5*") 
    724729         
    725         Print file1,file2 
     730//      Print file1,file2 
    726731         
    727732        LoadAndAddUSANS(file1,file2) 
     
    761766        Make/O/T/N=200 tw1,tw2 
    762767         
    763         String fname="",fpath="" 
     768        String fname="",fpath="",fullPath="" 
    764769        Variable ctTime1,ang11,ang21 
    765770        Variable ctTime2,ang12,ang22 
    766          
    767         PathInfo bt5PathName 
     771        Variable dialog=1 
     772         
     773        PathInfo/S savePathName 
    768774        fpath = S_Path 
     775         
     776        if(strlen(S_Path)==0) 
     777                DoAlert 0,"You must select a Save Path... from the main USANS_Panel" 
     778                return(0) 
     779        endif 
    769780         
    770781        fname = fpath + file1 
     
    857868        // write out the final file (=tw3) 
    858869        filen = file1[0,strlen(file1)-5]+"_SUM.bt5" 
    859         Open refNum as filen 
     870         
     871        if(dialog) 
     872                PathInfo/S savePathName 
     873                fullPath = DoSaveFileDialog("Save data as",fname=filen) 
     874                If(cmpstr(fullPath,"")==0) 
     875                        //user cancel, don't write out a file 
     876                        Close/A 
     877                        Abort "no data file was written" 
     878                Endif 
     879                //Print "dialog fullpath = ",fullpath 
     880        Endif 
     881         
     882        Open refNum as fullPath 
    860883        wfprintf refnum, "%s",tw3 
    861884        Close refnum 
    862          
     885                 
    863886        //killwaves/Z tw1,tw2,tw3 
    864887         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/BT5_Loader.ipf

    r569 r570  
    11#pragma rtGlobals=1             // Use modern global access method. 
    22#pragma Version=2.20 
    3 #pragma IgorVersion=6.0 
     3#pragma IgorVersion=6.1 
    44 
    55///////////////////////// 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/COR_Graph.ipf

    r569 r570  
    11#pragma rtGlobals=1             // Use modern global access method. 
    22#pragma Version=2.20 
    3 #pragma IgorVersion=6.0 
     3#pragma IgorVersion=6.1 
    44 
    55//////////////////////////// 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/LakeDesmearing_JB.ipf

    r496 r570  
    11#pragma rtGlobals=1             // Use modern global access method. 
    22#pragma Version=2.20 
    3 #pragma IgorVersion=6.0 
     3#pragma IgorVersion=6.1 
    44 
    55////////////////////////////////////////////// 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/Main_USANS.ipf

    r569 r570  
    11#pragma rtGlobals=1             // Use modern global access method. 
    22#pragma Version=2.21 
    3 #pragma IgorVersion=6.0 
     3#pragma IgorVersion=6.1 
    44 
    55//******************** 
     
    2424        "Build USANS Notebook" 
    2525        "Desmear USANS Data",Desmear() 
     26        "Add two raw BT5 files",SelectFilesToAdd() 
     27        "Add two data sets",ShowUSANSAddPanel() 
    2628        "-" 
    2729        "Load USANS Data",A_LoadOneDData() 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/USANSCatNotebook.ipf

    r496 r570  
    11#pragma rtGlobals=1             // Use modern global access method. 
    22#pragma Version=2.20 
    3 #pragma IgorVersion=6.0 
     3#pragma IgorVersion=6.1 
    44 
    55//************** 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/USANS_EmptyWaves.ipf

    r551 r570  
    11#pragma rtGlobals=1             // Use modern global access method. 
     2#pragma IgorVersion=6.1 
    23 
    34 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/USANS_Includes.ipf

    r569 r570  
    11#pragma rtGlobals=1             // Use modern global access method. 
    22#pragma version=2.20 
    3 #pragma IgorVersion=6.0 
     3#pragma IgorVersion=6.1 
    44 
    55//************* 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/U_CALC.ipf

    r569 r570  
    11#pragma rtGlobals=1             // Use modern global access method. 
     2#pragma IgorVersion=6.1 
    23 
    34 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/WriteUSANSData.ipf

    r474 r570  
    11#pragma rtGlobals=1             // Use modern global access method. 
    22#pragma Version=2.20 
    3 #pragma IgorVersion=6.0 
     3#pragma IgorVersion=6.1 
    44 
    55////////////// 
Note: See TracChangeset for help on using the changeset viewer.