Changeset 693
- Timestamp:
- Apr 15, 2010 2:25:11 PM (12 years ago)
- Location:
- sans/Dev/trunk
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_Igor_Procedures/NCNR_Package_Loader.ipf
r663 r693 34 34 String itemStr 35 35 36 if (str2num(stringByKey("IGORVERS",IgorInfo(0))) < 6. 02)37 Abort "Your version of Igor is lower than 6. 02, these macros need version 6.02or higher.... "36 if (str2num(stringByKey("IGORVERS",IgorInfo(0))) < 6.1) 37 Abort "Your version of Igor is lower than 6.1, these macros need version 6.1 or higher.... " 38 38 endif 39 39 … … 48 48 strswitch(itemStr) // string switch 49 49 case "Load NCNR Analysis Macros": 50 Execute/P "INSERTINCLUDE \"SA_Includes_v4 00\""50 Execute/P "INSERTINCLUDE \"SA_Includes_v410\"" 51 51 Execute/P "INSERTINCLUDE \"PlotUtilsMacro_v40\"" 52 52 Execute/P "INSERTINCLUDE \"GaussUtils_v40\"" … … 67 67 case "Unload NCNR Analysis Macros": 68 68 // very dangerous - don't really want to implement this because it will surely crash 69 Execute/P "DELETEINCLUDE \"SA_Includes_v4 00\""69 Execute/P "DELETEINCLUDE \"SA_Includes_v410\"" 70 70 Execute/P "DELETEINCLUDE \"PlotUtilsMacro_v40\"" 71 71 Execute/P "DELETEINCLUDE \"GaussUtils_v40\"" … … 118 118 String itemStr 119 119 120 if (str2num(stringByKey("IGORVERS",IgorInfo(0))) < 6. 02)121 Abort "Your version of Igor is lower than 6. 02, these macros need version 6.02or higher.... "120 if (str2num(stringByKey("IGORVERS",IgorInfo(0))) < 6.1) 121 Abort "Your version of Igor is lower than 6.1, these macros need version 6.1 or higher.... " 122 122 endif 123 123 … … 189 189 String itemStr 190 190 191 if (str2num(stringByKey("IGORVERS",IgorInfo(0))) < 6. 02)192 Abort "Your version of Igor is lower than 6. 02, these macros need version 6.02or higher.... "191 if (str2num(stringByKey("IGORVERS",IgorInfo(0))) < 6.1) 192 Abort "Your version of Igor is lower than 6.1, these macros need version 6.1 or higher.... " 193 193 endif 194 194 … … 203 203 strswitch(itemStr) // string switch 204 204 case "Load NCNR USANS Reduction Macros": 205 Execute/P "INSERTINCLUDE \"USANS_Includes \""205 Execute/P "INSERTINCLUDE \"USANS_Includes_v230\"" 206 206 Execute/P "COMPILEPROCEDURES " 207 207 Execute/P ("ShowUSANSPanel()") … … 216 216 case "Unload NCNR USANS Reduction Macros": 217 217 // very dangerous - don't really want to implement this because it will surely crash 218 Execute/P "DELETEINCLUDE \"USANS_Includes \""218 Execute/P "DELETEINCLUDE \"USANS_Includes_v230\"" 219 219 Execute/P "COMPILEPROCEDURES " 220 220 DoWindow USANS_Panel … … 274 274 String itemStr 275 275 276 if (str2num(stringByKey("IGORVERS",IgorInfo(0))) < 6. 02)277 Abort "Your version of Igor is lower than 6. 02, these macros need version 6.02or higher.... "276 if (str2num(stringByKey("IGORVERS",IgorInfo(0))) < 6.1) 277 Abort "Your version of Igor is lower than 6.1, these macros need version 6.1 or higher.... " 278 278 endif 279 279 -
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/Wrapper_v40.ipf
r668 r693 1 1 #pragma rtGlobals=1 // Use modern global access method. 2 #pragma version=4. 002 #pragma version=4.10 3 3 #pragma IgorVersion=6.1 4 4 … … 9 9 10 10 Function Init_WrapperPanel() 11 12 if(itemsinlist(WinList("SA_includes_v400.ipf", ";","INCLUDE:6"),";") != 0) 13 //must be opening a v4.00 or earlier template 14 DoAlert 0,"This experiment was created with an old version (v4.0) of the macros. I'll try to make this work, but please start new work with a current version" 15 endif 16 11 17 //make sure that folders exist - this is the first initialization to be called 12 18 NewDataFolder/O root:Packages … … 14 20 15 21 //Create useful globals 16 Variable/G root:Packages:NIST:SANS_ANA_VERSION=4. 0022 Variable/G root:Packages:NIST:SANS_ANA_VERSION=4.10 17 23 String/G root:Packages:NIST:SANS_ANA_EXTENSION="_v40" 18 24 //Set this variable to 1 to force use of trapezoidal integration routine for USANS smearing -
sans/Dev/trunk/NCNR_User_Procedures/Analysis/SA_includes_v400.ipf
r665 r693 3 3 #pragma IgorVersion=6.1 4 4 5 //************* 6 // the list of files to include in the SANS reduction experiment 7 // - files must be located somewhere in the User Procedures folder 8 // or sub-folders 5 6 // now simply point to the current version of the includes v410 7 // -- then if this file is open, I'll know the experiment is "old" 8 #include "SA_includes_v410" 9 10 ////************* 11 //// the list of files to include in the SANS reduction experiment 12 //// - files must be located somewhere in the User Procedures folder 13 //// or sub-folders 14 //// 9 15 // 10 11 //always include the picker 12 #include "SANSModelPicker_v40" version>=4.00 13 //utility procedures 14 #include "GaussUtils_v40" version>=4.00 15 #include "NIST_XML_V40" //added September 2008 16 #include "PlotUtilsMacro_v40" version>=4.00 17 #include "PlotManager_v40" version>=4.00 18 #include "NCNR_GenFitUtils" // April 2009, compiles OK if XOP not present 19 #include "NCNR_Utils" 20 21 #include "USANS_SlitSmearing_v40" 22 #include "WriteModelData_v40" 23 #include "Wrapper_v40" 24 #include "PlotUtils2D_v40" 25 #include "GizmoCylinder_v40" 26 27 #include "CheckVersionFTP" //added June 2008 28 29 #include "DataSetHandling" //added Nov 2009 AJJ 30 31 Menu "SANS Models" 32 "Fit Manager", Init_WrapperPanel() 33 "Load Model Functions",Execute/P "INSERTINCLUDE \"SANSModelPicker_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "ModelPicker_Panel()" 34 "Load and Plot Manager", Show_Plot_Manager() 35 "Freeze Model" 36 "Write Model Data" 37 "ReWrite Experimental Data",ReWrite1DData() 38 "1D Arithmetic Panel",MakeDAPanel() 39 "-" 40 Submenu "Packages" 41 "Sum Two Models",Execute/P "INSERTINCLUDE \"SumSANSModels_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "Init_SumModelPanel()" 42 "Global Fitting",Execute/P "INSERTINCLUDE \"GlobalFit2_NCNR_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "WM_NewGlobalFit1#InitNewGlobalFitPanel()" 43 "Simple Global Fitting",Execute/P "INSERTINCLUDE \"GlobalFit2_NCNR_v40\"";Execute/P "INSERTINCLUDE \"SimpleGlobalFit_NCNR_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "Init_SimpleGlobalFit()" 44 "Determine Invariant",Execute/P "INSERTINCLUDE \"Invariant_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "Make_Invariant_Panel()" 45 "Do Linear Fits",Execute/P "INSERTINCLUDE \"LinearizedFits_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "A_OpenFitPanel()" 46 GenOpFlagEnable()+"Genetic Optimization Enabled", Init_GenOp() 47 GenOpFlagDisable()+"Genetic Optimization Disabled", UnSet_GenOp() 48 End 49 "-" 50 Submenu "2D Utilities" 51 "Generate Fake QxQy Data",FakeQxQy() 52 "Show Cylinder Orientation" 53 "Change Angle" 54 end 55 "-" 56 "NCNR Preferences",Show_Preferences_Panel() 57 "Feedback or Bug Report",OpenTracTicketPage() 58 "Open Help Movie Page",OpenHelpMoviePage() 59 "Check for Updates",CheckForLatestVersion() 60 End 61 16 ////always include the picker 17 //#include "SANSModelPicker_v40" version>=4.00 18 ////utility procedures 19 //#include "GaussUtils_v40" version>=4.00 20 //#include "NIST_XML_V40" //added September 2008 21 //#include "PlotUtilsMacro_v40" version>=4.00 22 //#include "PlotManager_v40" version>=4.00 23 //#include "NCNR_GenFitUtils" // April 2009, compiles OK if XOP not present 24 //#include "NCNR_Utils" 25 // 26 //#include "USANS_SlitSmearing_v40" 27 //#include "WriteModelData_v40" 28 //#include "Wrapper_v40" 29 //#include "PlotUtils2D_v40" 30 //#include "GizmoCylinder_v40" 31 // 32 //#include "CheckVersionFTP" //added June 2008 33 // 34 //#include "DataSetHandling" //added Nov 2009 AJJ 35 // 36 //Menu "SANS Models" 37 // "Fit Manager", Init_WrapperPanel() 38 // "Load Model Functions",Execute/P "INSERTINCLUDE \"SANSModelPicker_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "ModelPicker_Panel()" 39 // "Load and Plot Manager", Show_Plot_Manager() 40 // "Freeze Model" 41 // "Write Model Data" 42 // "ReWrite Experimental Data",ReWrite1DData() 43 // "1D Arithmetic Panel",MakeDAPanel() 44 // "-" 45 // Submenu "Packages" 46 // "Sum Two Models",Execute/P "INSERTINCLUDE \"SumSANSModels_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "Init_SumModelPanel()" 47 // "Global Fitting",Execute/P "INSERTINCLUDE \"GlobalFit2_NCNR_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "WM_NewGlobalFit1#InitNewGlobalFitPanel()" 48 // "Simple Global Fitting",Execute/P "INSERTINCLUDE \"GlobalFit2_NCNR_v40\"";Execute/P "INSERTINCLUDE \"SimpleGlobalFit_NCNR_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "Init_SimpleGlobalFit()" 49 // "Determine Invariant",Execute/P "INSERTINCLUDE \"Invariant_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "Make_Invariant_Panel()" 50 // "Do Linear Fits",Execute/P "INSERTINCLUDE \"LinearizedFits_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "A_OpenFitPanel()" 51 // GenOpFlagEnable()+"Genetic Optimization Enabled", Init_GenOp() 52 // GenOpFlagDisable()+"Genetic Optimization Disabled", UnSet_GenOp() 53 // End 54 // "-" 55 // Submenu "2D Utilities" 56 // "Generate Fake QxQy Data",FakeQxQy() 57 // "Show Cylinder Orientation" 58 // "Change Angle" 59 // end 60 // "-" 61 // "NCNR Preferences",Show_Preferences_Panel() 62 // "Feedback or Bug Report",OpenTracTicketPage() 63 // "Open Help Movie Page",OpenHelpMoviePage() 64 // "Check for Updates",CheckForLatestVersion() 65 //End 66 // -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/HFIR_Utils.ipf
r692 r693 429 429 // 430 430 // there is a field for this in the header, write "True", so I don't need to guess again. 431 // -- but this field is often incorrect - for some sample data ALL FILES were "True" 432 // -- better to check the physical location every time 431 433 // 432 434 Function isTransFile(fName) /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 433 435 String fname 434 436 437 Variable beamtrap_1y=0,beamtrap_2y=0,beamtrap_3y=0,beamtrap_4y=0,tol=451 435 438 //Check by key "transsmission" 436 if (stringmatch( getIsTrans(fName),"True")>0)437 return (1)438 else439 // if (stringmatch( getIsTrans(fName),"True")>0) 440 // return (1) 441 // else 439 442 //Check from beam stop motor position 440 Variable beamtrap_1y=0,beamtrap_2y=0,beamtrap_3y=0,beamtrap_4y=0,tol=451441 443 // if(your test here) 442 444 beamtrap_1y=getRealValueFromHeader(fname,"//Motor_Positions/trap_y_101mm","mm") … … 451 453 else 452 454 //some other file 455 Write_isTransmissionToHeader(fName,"False") 453 456 return (0) 454 457 endif 455 endif 458 459 // endif 460 456 461 return (0) 457 462 End -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Includes.ipf
r668 r693 5 5 6 6 7 // SRK 7 APR 201 27 // SRK 7 APR 2010 8 8 // as of version 5.1, this is now a pointer to the current version of the includes 9 9 #include "Includes_v520" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Includes_v520.ipf
r668 r693 1 1 #pragma rtGlobals=1 // Use modern global access method. 2 #pragma version=5. 02 #pragma version=5.2 3 3 #pragma IgorVersion=6.1 4 4 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Initialize.ipf
r683 r693 1 1 #pragma rtGlobals=1 // Use modern global access method. 2 #pragma version=5. 12 #pragma version=5.2 3 3 #pragma IgorVersion=6.1 4 4 … … 28 28 Proc Initialize() 29 29 30 Variable/G root:SANS_RED_VERSION=5.10 31 30 Variable curVersion = 5.2 31 Variable oldVersion = NumVarOrDefault("root:SANS_RED_VERSION",curVersion) 32 33 //check for really old versions 32 34 if(itemsinlist(WinList("Includes.ipf", ";","INCLUDE:6"),";") != 0) 33 35 //must be opening a v4.2 or earlier template 34 DoAlert 0,"This experiment was created with an old version of the macros. I'll try to make this work, but please start new work with a current template" 36 oldVersion = 4.2 37 endif 38 39 if(itemsinlist(WinList("Includes_v510.ipf", ";","INCLUDE:6"),";") != 0) 40 oldVersion = 5.10 41 endif 42 if(itemsinlist(WinList("Includes_v500.ipf", ";","INCLUDE:6"),";") != 0) 43 oldVersion = 5.00 44 endif 45 46 if(itemsinlist(WinList("Includes_v520.ipf", ";","INCLUDE:6"),";") != 0) 47 oldVersion = 5.20 48 //must just be a new startup with the current version 49 Variable/G root:SANS_RED_VERSION=5.20 50 endif 51 52 if(oldVersion < curVersion) 53 String str = "This experiment was created with version "+num2str(oldVersion)+" of the macros. I'll try to make this work, but please start new work with a current template" 54 DoAlert 0,str 35 55 endif 36 56 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MultipleReduce.ipf
r646 r693 546 546 Endif 547 547 548 list = NumWave2 CommaList(numW)548 list = NumWave2IntegerCommaList(numW) 549 549 550 550 //force an update If the SVAR exists, then the panel does too - MRED cleans up after itself when done -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NSORT.ipf
r686 r693 1694 1694 1695 1695 if(WinType("NSORT_Panel") == 0) 1696 DoAlert 0, "The NSORT Panel must b oopen to combine the files"1696 DoAlert 0, "The NSORT Panel must be open to combine the files" 1697 1697 return(0) 1698 1698 endif 1699 1699 1700 DoAlert 1,"Do you have all the assignments set in the bottom table? If not, < no> will exit."1700 DoAlert 1,"Do you have all the assignments set in the bottom table? If not, < No > will exit." 1701 1701 if(V_flag == 2) 1702 1702 return(0) //no, get out -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SANS_Utilities.ipf
r647 r693 36 36 do 37 37 list += textw[ii] + ";" 38 ii+=1 39 while(ii<num) 40 return(list) 41 End 42 43 Function/S NumWave2IntegerCommaList(numW) 44 Wave numW 45 46 String list="" 47 Variable num=numpnts(numW),ii=0 48 do 49 list += num2iStr(numW[ii]) + "," 38 50 ii+=1 39 51 while(ii<num) … … 91 103 list = "" 92 104 else 93 list=NumWave2 CommaList(w)105 list=NumWave2IntegerCommaList(w) 94 106 endif 95 107 return(list) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/WriteQIS.ipf
r628 r693 642 642 // Removed the SAVE of the 2D resolution waves - I'm not sure they are correct. Can't verify the 643 643 // smearing of the 2D data yet. For a future minor release... 644 // -- when the Qz and resolution are written, be sure to change the tw[15] in the header back to the 645 // proper labels 644 646 // 645 647 // … … 729 731 labelWave[13] = "" 730 732 labelWave[14] = "*** Data written from "+type+" folder and may not be a fully corrected data file ***" 731 labelWave[15] = "Data columns are Qx - Qy - I(Qx,Qy) - Qz - SigmaQx - SigmaQy - fSubS(beam stop shadow)" 733 labelWave[15] = "Data columns are Qx - Qy - I(Qx,Qy)" 734 // labelWave[15] = "Data columns are Qx - Qy - I(Qx,Qy) - Qz - SigmaQx - SigmaQy - fSubS(beam stop shadow)" 732 735 labelWave[16] = "" 733 736 labelWave[17] = "ASCII data created " +date()+" "+time() -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/Main_USANS.ipf
r668 r693 43 43 // 44 44 Proc ShowUSANSPanel() 45 46 if(itemsinlist(WinList("USANS_Includes.ipf", ";","INCLUDE:6"),";") != 0) 47 //must be opening a v2.2 or earlier template 48 DoAlert 0,"This experiment was created with an old version (v2.2 or earlier) of the macros. I'll try to make this work, but please start new work with a current template" 49 endif 50 45 51 //version number 46 Variable/G root:USANS_RED_VERSION=2. 21//distribution as of Jan 200752 Variable/G root:USANS_RED_VERSION=2.3 //distribution as of Jan 2007 47 53 48 54 Init_MainUSANS() -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/USANS_Includes.ipf
r608 r693 3 3 #pragma IgorVersion=6.1 4 4 5 //************* 6 // the list of files to include in the USANS reduction experiment 7 // - files must be located somewhere in the User Procedures folder 8 // or sub-folders 5 6 ///point to the current version, so I can recognize old experiments 7 #include "USANS_Includes_v230" 8 9 10 ////************* 11 //// the list of files to include in the USANS reduction experiment 12 //// - files must be located somewhere in the User Procedures folder 13 //// or sub-folders 14 //// 9 15 // 10 11 #include "BT5_Loader",version >= 2.20 12 #include "COR_Graph",version >= 2.20 13 #include "Main_USANS",version >= 2.20 14 #include "PlotUtilsMacro_v40",version >= 2.20 15 #include "NIST_XML_v40" 16 #include "USANS_SlitSmearing_v40" 17 #include "WriteUSANSData",version >= 2.20 18 #include "LakeDesmearing_JB",version >= 2.20 19 #include "USANSCatNotebook",version >= 2.20 20 #include "CheckVersionFTP" //added June 2008 21 #include "GaussUtils_v40" //added Oct 2008 for unified file loading 22 #include "BT5_AddFiles" //Oct 2009 to add raw data files 23 24 // USANS simulation and required procedures 25 #include "U_CALC" 26 #include "USANS_EmptyWaves" 27 #include "MultScatter_MonteCarlo_2D" 28 #include "SASCALC" 29 #include "NCNR_DataReadWrite" 30 #include "SANS_Utilities" 31 #include "NCNR_Utils" 32 #include "MultipleReduce" 33 34 //AJJ for data set output? 35 //#include "DataSetHandling" 36 //#Include "WriteModelData_v40" 16 //#include "BT5_Loader",version >= 2.20 17 //#include "COR_Graph",version >= 2.20 18 //#include "Main_USANS",version >= 2.20 19 //#include "PlotUtilsMacro_v40",version >= 2.20 20 //#include "NIST_XML_v40" 21 //#include "USANS_SlitSmearing_v40" 22 //#include "WriteUSANSData",version >= 2.20 23 //#include "LakeDesmearing_JB",version >= 2.20 24 //#include "USANSCatNotebook",version >= 2.20 25 //#include "CheckVersionFTP" //added June 2008 26 //#include "GaussUtils_v40" //added Oct 2008 for unified file loading 27 //#include "BT5_AddFiles" //Oct 2009 to add raw data files 28 // 29 //// USANS simulation and required procedures 30 //#include "U_CALC" 31 //#include "USANS_EmptyWaves" 32 //#include "MultScatter_MonteCarlo_2D" 33 //#include "SASCALC" 34 //#include "NCNR_DataReadWrite" 35 //#include "SANS_Utilities" 36 //#include "NCNR_Utils" 37 //#include "MultipleReduce" 38 // 39 ////AJJ for data set output? 40 ////#include "DataSetHandling" 41 ////#Include "WriteModelData_v40"
Note: See TracChangeset
for help on using the changeset viewer.