- Timestamp:
- May 5, 2017 3:18:41 PM (6 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_FileCatalog.ipf
r1034 r1037 238 238 // 239 239 Print "Total time (s) = ",(ticks - t1)/60.15 240 Print "Time per raw data file (without cleanup time) (s) = ",( (ticks - t1)/60.15 - cleanupTime)/(numItems-numpnts(notRawList)) 240 Print "Time per raw data file (without cleanup time) (s) = ",( (ticks - t1)/60.15 - cleanupTime)/(numItems-numpnts(labels)) 241 // (don't use numpnts(notRawList) to normalize, these aren't all raw data files) 241 242 // 242 243 // clean out again, so that the file SAVE is not slow due to the large experiment size -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_IQ_Utilities.ipf
r1036 r1037 776 776 // too long. Need to come up with an Igor-demo friendly save here 777 777 // 778 // -- see V_ExportProtocol() for a quick example of how to generate the .ITX format 779 // 778 780 // -- need a reader/plotter capable of handling this data. The regular data loader won't handle 779 781 // all the different number of columns present, or the ITX format. See V_DataPlotting and duplicate these routines … … 888 890 return(0) 889 891 End 892 893 894 // TODO 895 // -- fill in 896 // -- link somewhere? 897 // 898 // a function to load in the individual I(q) sets which were written out to a single 899 // file, in itx format. 900 // 901 // The data, like other 1D data sets, is to be loaded to its own folder under root 902 // 903 // Then, the data sets can be plotted as VSANS data sets, depending on which data extensions are present. 904 // (and color coded) 905 // (and used for setting the trimming) 906 // (and...) 907 // 908 // 909 // see A_LoadOneDDataToName(fileStr,outStr,doPlot,forceOverwrite) 910 // 911 Function V_Load_itx(fileStr,outStr,doPlot,forceOverwrite) 912 String fileStr, outstr 913 Variable doPlot,forceOverwrite 914 915 SetDataFolder root: //build sub-folders for each data set under root 916 917 // if no fileStr passed in, display dialog now 918 if (cmpStr(fileStr,"") == 0) 919 fileStr = DoOpenFileDialog("Select a data file to load") 920 if (cmpstr(fileStr,"") == 0) 921 String/G root:Packages:NIST:gLastFileName = "" 922 return(0) //get out if no file selected 923 endif 924 endif 925 926 //Load the waves, using default waveX names 927 //if no path or file is specified for LoadWave, the default Mac open dialog will appear 928 LoadWave/O/T fileStr 929 // LoadWave/G/D/A/Q fileStr 930 String fileNamePath = S_Path+S_fileName 931 // String basestr = ParseFilePath(3,ParseFilePath(5,fileNamePath,":",0,0),":",0,0) 932 933 String basestr 934 if (!cmpstr(outstr, "")) //Outstr = "", cmpstr returns 0 935 // enforce a short enough name here to keep Igor objects < 31 chars 936 baseStr = ShortFileNameString(CleanupName(S_fileName,0)) 937 baseStr = CleanupName(baseStr,0) //in case the user added odd characters 938 //baseStr = CleanupName(S_fileName,0) 939 else 940 baseStr = outstr //for output, hopefully correct length as passed in 941 endif 942 943 // print "basestr :"+basestr 944 String fileName = ParseFilePath(0,ParseFilePath(5,filestr,":",0,0),":",1,0) 945 // print "filename :"+filename 946 947 Variable ii,num=ItemsinList(S_waveNames) 948 949 if(DataFolderExists("root:"+baseStr)) 950 if (!forceOverwrite) 951 DoAlert 1,"The file "+S_filename+" has already been loaded. Do you want to load the new data file, overwriting the data in memory?" 952 if(V_flag==2) //user selected No, don't load the data 953 SetDataFolder root: 954 for(ii=0;ii<num;ii+=1) 955 KillWaves $(StringFromList(ii, S_waveNames)) // kill the waves that were loaded 956 endfor 957 if(DataFolderExists("root:Packages:NIST")) 958 String/G root:Packages:NIST:gLastFileName = filename 959 endif 960 return(0) //quits the macro 961 endif 962 endif 963 SetDataFolder $("root:"+baseStr) 964 else 965 NewDataFolder/S $("root:"+baseStr) 966 endif 967 968 // ////overwrite the existing data, if it exists 969 970 // a semicolon-delimited list of wave names loaded 971 //S_waveNames 972 for(ii=0;ii<num;ii+=1) 973 Duplicate/O $("root:"+StringFromList(ii, S_waveNames)), $(StringFromList(ii, S_waveNames)) 974 endfor 975 976 977 // clean up 978 SetDataFolder root: 979 980 for(ii=0;ii<num;ii+=1) 981 KillWaves $(StringFromList(ii, S_waveNames)) // kill the waves that were loaded 982 endfor 983 // Duplicate/O $("root:"+n0), $w0 984 // Duplicate/O $("root:"+n1), $w1 985 // Duplicate/O $("root:"+n2), $w2 986 987 // no resolution matrix to make 988 989 990 return(0) 991 End
Note: See TracChangeset
for help on using the changeset viewer.