- Timestamp:
- Jan 19, 2016 11:41:53 AM (7 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_MainPanel.ipf
r972 r973 279 279 String ctrlName 280 280 281 Show_ Preferences_Panel()281 Show_VSANSPreferences_Panel() 282 282 End 283 283 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_VSANS_Preferences.ipf
r971 r973 1 1 #pragma rtGlobals=3 // Use modern global access method and strict wave access. 2 3 //4 // The full version of the preferences panel resides in PlotUtilsMacro_v40.ipf5 // and is common to SANS/USANS reduction and Analysis routines.6 //7 // This version has been specifically pulled out to remove the entanglement.8 //9 // SANSPreferences.ipf file is unused (in SANS folder of SVN)10 //11 // DEC 201512 //13 2 14 3 … … 17 6 // -- update all of the function names to be unique to VSANS so that there are no 18 7 // name clashes with the "duplicate" version that is in PlotUtils.ipf 8 // 9 // -- Make this a VSANS-only panel 10 // -- eliminate the USANS tab 11 // -- be sure the general tab is either unique, or eliminate it 12 // -- be sure the Analysis tab is unique, or eliminate it 19 13 // 20 14 // … … 38 32 End 39 33 34 35 // TODO -- there are more detector specific corrections here that need to be added 36 // 37 // create the globals here if they are not already present 38 // each package initialization should call this to repeat the initialization 39 // without overwriting what was already set 40 40 Proc Initialize_VSANSPreferences() 41 // create the globals here if they are not already present42 43 // each package initialization should call this to repeat the initialization44 // without overwriting what was already set45 41 46 42 Variable val 47 43 44 // GENERAL tab 45 /// General items for everyone 46 val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gXML_Write", 0 ) 47 Variable/G root:Packages:NIST:VSANS:Globals:gXML_Write = val 48 49 50 // VSANS tab 48 51 ///// items for VSANS reduction 49 52 val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gLogScalingAsDefault", 1 ) 50 53 Variable/G root:Packages:NIST:VSANS:Globals:gLogScalingAsDefault=val 51 54 52 val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gAllowDRK", 0 )53 Variable/G root:Packages:NIST:VSANS:Globals:gAllowDRK=val //don't show DRK as default55 // val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gAllowDRK", 0 ) 56 // Variable/G root:Packages:NIST:VSANS:Globals:gAllowDRK=val //don't show DRK as default 54 57 55 58 val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gDoTransCheck", 1 ) … … 70 73 71 74 // flag to allow adding raw data files with different attenuation (normally not done) 72 val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gDoAdjustRAW_Atten",0) 73 Variable/G root:Packages:NIST:VSANS:Globals:gDoAdjustRAW_Atten=val 74 75 /// items for SANS Analysis 76 77 78 /// items for USANS Reduction 79 80 81 /// items for everyone 82 val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gXML_Write", 0 ) 83 Variable/G root:Packages:NIST:VSANS:Globals:gXML_Write = val 75 // val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gDoAdjustRAW_Atten",0) 76 // Variable/G root:Packages:NIST:VSANS:Globals:gDoAdjustRAW_Atten=val 77 78 79 // VSANS ANALYSIS tab 80 /// items for VSANS Analysis 84 81 85 82 86 83 end 87 84 88 Function LogScalePrefCheck(ctrlName,checked) : CheckBoxControl85 Function V_LogScalePrefCheck(ctrlName,checked) : CheckBoxControl 89 86 String ctrlName 90 87 Variable checked … … 95 92 End 96 93 97 Function DRKProtocolPref(ctrlName,checked) : CheckBoxControl98 String ctrlName99 Variable checked100 101 NVAR gDRK = root:Packages:NIST:VSANS:Globals:gAllowDRK102 gDRK = checked103 //Print "DRK preference = ",checked104 End105 106 Function UnityTransPref(ctrlName,checked) : CheckBoxControl94 //Function DRKProtocolPref(ctrlName,checked) : CheckBoxControl 95 // String ctrlName 96 // Variable checked 97 // 98 // NVAR gDRK = root:Packages:NIST:VSANS:Globals:gAllowDRK 99 // gDRK = checked 100 // //Print "DRK preference = ",checked 101 //End 102 103 Function V_UnityTransPref(ctrlName,checked) : CheckBoxControl 107 104 String ctrlName 108 105 Variable checked … … 112 109 End 113 110 114 Function XMLWritePref(ctrlName,checked) : CheckBoxControl111 Function V_XMLWritePref(ctrlName,checked) : CheckBoxControl 115 112 String ctrlName 116 113 Variable checked … … 120 117 End 121 118 122 Function DoTransCorrPref(ctrlName,checked) : CheckBoxControl119 Function V_DoTransCorrPref(ctrlName,checked) : CheckBoxControl 123 120 String ctrlName 124 121 Variable checked … … 128 125 End 129 126 130 Function DoEfficiencyCorrPref(ctrlName,checked) : CheckBoxControl127 Function V_DoEfficiencyCorrPref(ctrlName,checked) : CheckBoxControl 131 128 String ctrlName 132 129 Variable checked … … 136 133 End 137 134 138 Function DoRawAttenAdjPref(ctrlName,checked) : CheckBoxControl135 Function V_DoRawAttenAdjPref(ctrlName,checked) : CheckBoxControl 139 136 String ctrlName 140 137 Variable checked … … 144 141 End 145 142 146 Function PrefDoneButtonProc(ctrlName) : ButtonControl143 Function V_PrefDoneButtonProc(ctrlName) : ButtonControl 147 144 String ctrlName 148 145 … … 152 149 Proc VSANSPref_Panel() 153 150 PauseUpdate; Silent 1 // building window... 154 NewPanel /W=(646,208,1070,468)/K=2 as " NCNRPreference Panel"151 NewPanel /W=(646,208,1070,468)/K=2 as "VSANS Preference Panel" 155 152 DoWindow/C VSANSPref_Panel 156 153 ModifyPanel cbRGB=(49694,61514,27679) … … 159 156 ////// 160 157 //on main portion of panel, always visible 161 Button PrefPanelButtonA,pos={354,12},size={50,20},proc= PrefDoneButtonProc,title="Done"162 163 TabControl PrefTab,pos={7,49},size={410,202},tabLabel(0)="General",proc= PrefTabProc164 TabControl PrefTab,tabLabel(1)="VSANS",tabLabel(2)=" USANS",tabLabel(3)="Analysis"165 TabControl PrefTab,value= 0158 Button PrefPanelButtonA,pos={354,12},size={50,20},proc=V_PrefDoneButtonProc,title="Done" 159 160 TabControl PrefTab,pos={7,49},size={410,202},tabLabel(0)="General",proc=V_PrefTabProc 161 TabControl PrefTab,tabLabel(1)="VSANS",tabLabel(2)="Analysis" 162 TabControl PrefTab,value=1 166 163 TabControl PrefTab labelBack=(49694,61514,27679) 167 164 168 //on tab(0) - General - initially visible169 CheckBox PrefCtrl_0a,pos={21,96},size={124,14},proc= XMLWritePref,title="Use canSAS XML Output"165 //on tab(0) - General 166 CheckBox PrefCtrl_0a,pos={21,96},size={124,14},proc=V_XMLWritePref,title="Use canSAS XML Output" 170 167 CheckBox PrefCtrl_0a,help={"Checking this will set the default output format to be canSAS XML rather than NIST 6 column"} 171 168 CheckBox PrefCtrl_0a,value= root:Packages:NIST:VSANS:Globals:gXML_Write 172 169 173 //on tab(1) - SANS 174 CheckBox PrefCtrl_1a,pos={21,100},size={171,14},proc=LogScalePrefCheck,title="Use Log scaling for 2D data display" 170 CheckBox PrefCtrl_0a,disable=1 171 172 173 //on tab(1) - VSANS - initially visible 174 CheckBox PrefCtrl_1a,pos={21,100},size={171,14},proc=V_LogScalePrefCheck,title="Use Log scaling for 2D data display" 175 175 CheckBox PrefCtrl_1a,help={"Checking this will display 2D VSANS data with a logarithmic color scale of neutron counts. If not checked, the color mapping will be linear."} 176 176 CheckBox PrefCtrl_1a,value= root:Packages:NIST:VSANS:Globals:gLogScalingAsDefault 177 CheckBox PrefCtrl_1b,pos={21,120},size={163,14},proc=DRKProtocolPref,title="Allow DRK correction in protocols"178 CheckBox PrefCtrl_1b,help={"Checking this will allow DRK correction to be used in reduction protocols. You will need to re-draw the protocol panel for this change to be visible."}179 CheckBox PrefCtrl_1b,value= root:Packages:NIST:VSANS:Globals:gAllowDRK180 CheckBox PrefCtrl_1c,pos={21,140},size={137,14},proc= UnityTransPref,title="Check for Transmission = 1"177 // CheckBox PrefCtrl_1b,pos={21,120},size={163,14},proc=V_DRKProtocolPref,title="Allow DRK correction in protocols" 178 // CheckBox PrefCtrl_1b,help={"Checking this will allow DRK correction to be used in reduction protocols. You will need to re-draw the protocol panel for this change to be visible."} 179 // CheckBox PrefCtrl_1b,value= root:Packages:NIST:VSANS:Globals:gAllowDRK 180 CheckBox PrefCtrl_1c,pos={21,140},size={137,14},proc=V_UnityTransPref,title="Check for Transmission = 1" 181 181 CheckBox PrefCtrl_1c,help={"Checking this will check for SAM or EMP Trans = 1 during data correction"} 182 182 CheckBox PrefCtrl_1c,value= root:Packages:NIST:VSANS:Globals:gDoTransCheck … … 185 185 SetVariable PrefCtrl_1e,pos={21,195},size={200,15},title="# Phi Steps (annular avg)" 186 186 SetVariable PrefCtrl_1e,limits={1,360,1},value= root:Packages:NIST:VSANS:Globals:gNPhiSteps 187 CheckBox PrefCtrl_1f title="Do Transmssion Correction?",size={140,14},value=root:Packages:NIST:VSANS:Globals:gDoTransmissionCorr,proc= DoTransCorrPref187 CheckBox PrefCtrl_1f title="Do Transmssion Correction?",size={140,14},value=root:Packages:NIST:VSANS:Globals:gDoTransmissionCorr,proc=V_DoTransCorrPref 188 188 CheckBox PrefCtrl_1f pos={255,100},help={"TURN OFF ONLY FOR DEBUGGING. This corrects the data for angle dependent transmssion."} 189 CheckBox PrefCtrl_1g title="Do Efficiency Correction?",size={140,14},proc= DoEfficiencyCorrPref189 CheckBox PrefCtrl_1g title="Do Efficiency Correction?",size={140,14},proc=V_DoEfficiencyCorrPref 190 190 CheckBox PrefCtrl_1g value=root:Packages:NIST:VSANS:Globals:gDoDetectorEffCorr,pos={255,120},help={"TURN OFF ONLY FOR DEBUGGING. This corrects the data for angle dependent detector efficiency."} 191 CheckBox PrefCtrl_1h title="Adjust RAW attenuation?",size={140,14},proc= DoRawAttenAdjPref191 CheckBox PrefCtrl_1h title="Adjust RAW attenuation?",size={140,14},proc=V_DoRawAttenAdjPref 192 192 CheckBox PrefCtrl_1h value=root:Packages:NIST:VSANS:Globals:gDoAdjustRAW_Atten,pos={255,140},help={"This is normally not done"} 193 193 194 CheckBox PrefCtrl_1a,disable=1195 CheckBox PrefCtrl_1b,disable=1196 CheckBox PrefCtrl_1c,disable=1197 SetVariable PrefCtrl_1d,disable=1198 SetVariable PrefCtrl_1e,disable=1199 CheckBox PrefCtrl_1f,disable=1200 CheckBox PrefCtrl_1g,disable=1201 CheckBox PrefCtrl_1h,disable=1202 203 //on tab(2) - USANS194 // CheckBox PrefCtrl_1a,disable=1 195 // CheckBox PrefCtrl_1b,disable=1 196 // CheckBox PrefCtrl_1c,disable=1 197 // SetVariable PrefCtrl_1d,disable=1 198 // SetVariable PrefCtrl_1e,disable=1 199 // CheckBox PrefCtrl_1f,disable=1 200 // CheckBox PrefCtrl_1g,disable=1 201 // CheckBox PrefCtrl_1h,disable=1 202 203 //on tab(2) - Analysis 204 204 GroupBox PrefCtrl_2a pos={21,100},size={1,1},title="nothing to set",fSize=12 205 205 206 206 GroupBox PrefCtrl_2a,disable=1 207 207 208 209 //on tab(3) - Analysis 210 GroupBox PrefCtrl_3a pos={21,100},size={1,1},title="nothing to set",fSize=12 211 212 GroupBox PrefCtrl_3a,disable=1 213 214 EndMacro 208 End 215 209 216 210 // function to control the drawing of controls in the TabControl on the main panel … … 221 215 // in this way, they will always be drawn correctly.. 222 216 // 223 Function PrefTabProc(name,tab)217 Function V_PrefTabProc(name,tab) 224 218 String name 225 219 Variable tab
Note: See TracChangeset
for help on using the changeset viewer.