- Timestamp:
- Oct 14, 2009 2:30:17 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/BT5_AddFiles.ipf
r569 r570 1 1 #pragma rtGlobals=1 // Use modern global access method. 2 #pragma IgorVersion=6.1 2 3 3 4 … … 15 16 // -- but how to save the data? At this point, errCR != sqrt(CR) 16 17 // 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 // 17 29 18 30 … … 20 32 // - allow user to input Qpeak (maybe of no use?) If so, do it right away with a dialog 21 33 // if no peak was found. 22 // 23 24 Macro mShowUSANSAddPanel() 25 ShowUSANSAddPanel() 26 end 27 28 Macro mSelectFilesToAdd() 29 SelectFilesToAdd() 30 end 34 35 31 36 32 37 Proc ShowUSANSAddPanel() … … 723 728 Prompt file2, "Second File", popup, BT5FileList("*.bt5*") 724 729 725 Print file1,file2730 // Print file1,file2 726 731 727 732 LoadAndAddUSANS(file1,file2) … … 761 766 Make/O/T/N=200 tw1,tw2 762 767 763 String fname="",fpath="" 768 String fname="",fpath="",fullPath="" 764 769 Variable ctTime1,ang11,ang21 765 770 Variable ctTime2,ang12,ang22 766 767 PathInfo bt5PathName 771 Variable dialog=1 772 773 PathInfo/S savePathName 768 774 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 769 780 770 781 fname = fpath + file1 … … 857 868 // write out the final file (=tw3) 858 869 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 860 883 wfprintf refnum, "%s",tw3 861 884 Close refnum 862 885 863 886 //killwaves/Z tw1,tw2,tw3 864 887
Note: See TracChangeset
for help on using the changeset viewer.