Changeset 958 for sans/Dev/trunk/NCNR_User_Procedures/Reduction
- Timestamp:
- Jun 5, 2015 1:26:01 PM (8 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/BroadPeak_Pix_2D.ipf
r956 r958 33 33 34 34 Make/O/D coef_PeakPix2D = {10, 3, 10, 0.3, 10, 2, 0.1, 8,4, 100, 100} 35 Make/O/D tmp_Pix2D = {10, 3, 10, 0.3, 10, 2, 0.1} //without the pixel ctrs35 // Make/O/D tmp_Pix2D = {10, 3, 10, 0.3, 10, 2, 0.1} //without the pixel ctrs 36 36 make/o/t parameters_PeakPix2D = {"Porod Scale", "Porod Exponent","Lorentzian Scale","Lor Screening Length","Peak position","Lorentzian Exponent","Bgd [1/cm]", "xPix size (mm)","yPix size (mm)", "xCtr (pixels)", "yCtr (pixels)"} 37 37 Edit parameters_PeakPix2D,coef_PeakPix2D … … 227 227 endif 228 228 229 // qval = sqrt((xw-xCtr)^2+(yw-yCtr)^2) // use if the pixels are square230 // qval = sqrt((xw-xCtr)^2+(yw-yCtr)^2/4) // use for LR panels where the y pixels are half the size of x231 // qval = sqrt((xw-xCtr)^2/4+(yw-yCtr)^2) // use for TB panels where the y pixels are twice the size of x232 233 229 if(qval<.001) 234 230 return(bgd) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/Nexus_VSANS_Write.ipf
r956 r958 222 222 Make/O/D/N=1 wavelength_spread = 0.8 223 223 // description_of_distribution 224 NewDataFolder/O/S root:VSANS_file:entry1:instrument:beam:monochromator:polarizer225 Make/O/T/N=1 type = "supermirror"226 Make/O/T/N=1 composition = "multilayer"227 Make/O/D/N=1 efficiency = 0.95228 Make/O/T/N=1 status = "in"229 NewDataFolder/O/S root:VSANS_file:entry1:instrument:beam:monochromator:flipper230 Make/O/T/N=1 status = "on"231 Make/O/D/N=1 driving_current = 42232 Make/O/T/N=1 waveform = "sine"233 Make/O/D/N=1 frequency = 400234 Make/O/D/N=1 transmitted_power = 0.99235 NewDataFolder/O/S root:VSANS_file:entry1:instrument:beam:monochromator:polarizer_analyzer236 Make/O/T/N=1 status = "down"237 Make/O/D/N=1 guide_field_current_1 = 33238 Make/O/D/N=1 guide_field_current_2 = 32239 Make/O/D/N=1 solenoid_current = 21240 Make/O/D/N=1 cell_index = 1241 Make/O/T/N=(5) cell_names = {"Burgundy","Olaf","Jim","Bob","Joe"}242 Make/O/D/N=(5,2) cell_parameters = 1243 NewDataFolder/O/S root:VSANS_file:entry1:instrument:beam:monochromator:chopper244 Make/O/T/N=1 type = "single"245 Make/O/D/N=1 rotation_speed = 12000246 Make/O/D/N=1 distance_from_source = 400247 Make/O/D/N=1 distance_from_sample = 1500248 Make/O/D/N=1 slits = 2249 Make/O/D/N=1 angular_opening = 15250 Make/O/D/N=1 duty_cycle = 0.25224 NewDataFolder/O/S root:VSANS_file:entry1:instrument:beam:chopper 225 Make/O/T/N=1 type = "single" 226 Make/O/D/N=1 rotation_speed = 12000 227 Make/O/D/N=1 distance_from_source = 400 228 Make/O/D/N=1 distance_from_sample = 1500 229 Make/O/D/N=1 slits = 2 230 Make/O/D/N=1 angular_opening = 15 231 Make/O/D/N=1 duty_cycle = 0.25 232 NewDataFolder/O/S root:VSANS_file:entry1:instrument:beam:polarizer 233 Make/O/T/N=1 type = "supermirror" 234 Make/O/T/N=1 composition = "multilayer" 235 Make/O/D/N=1 efficiency = 0.95 236 Make/O/T/N=1 status = "in" 237 NewDataFolder/O/S root:VSANS_file:entry1:instrument:beam:flipper 238 Make/O/T/N=1 status = "on" 239 Make/O/D/N=1 driving_current = 42 240 Make/O/T/N=1 waveform = "sine" 241 Make/O/D/N=1 frequency = 400 242 Make/O/D/N=1 transmitted_power = 0.99 243 NewDataFolder/O/S root:VSANS_file:entry1:instrument:beam:polarizer_analyzer 244 Make/O/T/N=1 status = "down" 245 Make/O/D/N=1 guide_field_current_1 = 33 246 Make/O/D/N=1 guide_field_current_2 = 32 247 Make/O/D/N=1 solenoid_current = 21 248 Make/O/D/N=1 cell_index = 1 249 Make/O/T/N=(5) cell_names = {"Burgundy","Olaf","Jim","Bob","Joe"} 250 Make/O/D/N=(5,2) cell_parameters = 1 251 251 // +? 252 252 … … 897 897 Note/K wavelength, "units=A" 898 898 //wavelength_spread 899 // description_of_distribution 900 SetDataFolder root:VSANS_file:entry1:instrument:beam:monochromator:polarizer 901 //type 902 //composition 903 //efficiency 904 //status 905 SetDataFolder root:VSANS_file:entry1:instrument:beam:monochromator:flipper 906 //status 907 //driving_current 908 Note/K driving_current, "units=A" 909 //waveform 910 //frequency 911 Note/K frequency, "units=Hz" 912 //transmitted_power 913 SetDataFolder root:VSANS_file:entry1:instrument:beam:monochromator:polarizer_analyzer 914 //status 915 //guide_field_current_1 916 Note/K guide_field_current_1, "units=A" 917 //guide_field_current_2 918 Note/K guide_field_current_2, "units=A" 919 //solenoid_current 920 Note/K solenoid_current, "units=A" 921 //cell_index 922 //cell_names 923 //cell_parameters 924 SetDataFolder root:VSANS_file:entry1:instrument:beam:monochromator:chopper 925 Make/O/N=0 Igor___folder_attributes 926 Note/K Igor___folder_attributes, "NX_class=NXdisk_chopper" 927 //type 928 //rotation_speed 929 Note/K rotation_speed, "units=RPM" 930 //distance_from_source 931 Note/K distance_from_source, "units=m" 932 //distance_from_sample 933 Note/K distance_from_sample, "units=m" 934 //slits 935 //angular_opening 936 Note/K angular_opening, "units=degrees" 937 //duty_cycle 899 // description_of_distribution 900 SetDataFolder root:VSANS_file:entry1:instrument:beam:chopper 901 Make/O/N=0 Igor___folder_attributes 902 Note/K Igor___folder_attributes, "NX_class=NXdisk_chopper" 903 //type 904 //rotation_speed 905 Note/K rotation_speed, "units=RPM" 906 //distance_from_source 907 Note/K distance_from_source, "units=m" 908 //distance_from_sample 909 Note/K distance_from_sample, "units=m" 910 //slits 911 //angular_opening 912 Note/K angular_opening, "units=degrees" 913 //duty_cycle 914 SetDataFolder root:VSANS_file:entry1:instrument:beam:polarizer 915 //type 916 //composition 917 //efficiency 918 //status 919 SetDataFolder root:VSANS_file:entry1:instrument:beam:flipper 920 //status 921 //driving_current 922 Note/K driving_current, "units=A" 923 //waveform 924 //frequency 925 Note/K frequency, "units=Hz" 926 //transmitted_power 927 SetDataFolder root:VSANS_file:entry1:instrument:beam:polarizer_analyzer 928 //status 929 //guide_field_current_1 930 Note/K guide_field_current_1, "units=A" 931 //guide_field_current_2 932 Note/K guide_field_current_2, "units=A" 933 //solenoid_current 934 Note/K solenoid_current, "units=A" 935 //cell_index 936 //cell_names 937 //cell_parameters 938 938 939 // +? 939 940 … … 1651 1652 wavelength = VCALC_getWavelength() 1652 1653 wavelength_spread = 0.8 1653 // description_of_distribution 1654 SetDataFolder root:VSANS_file:entry1:instrument:beam:monochromator:polarizer 1655 type = "supermirror" 1656 composition = "multilayer" 1657 efficiency = 0.95 1658 status = "in" 1659 SetDataFolder root:VSANS_file:entry1:instrument:beam:monochromator:flipper 1660 status = "on" 1661 driving_current = 42 1662 waveform = "sine" 1663 frequency = 400 1664 transmitted_power = 0.99 1665 SetDataFolder root:VSANS_file:entry1:instrument:beam:monochromator:polarizer_analyzer 1666 status = "down" 1667 guide_field_current_1 = 33 1668 guide_field_current_2 = 32 1669 solenoid_current = 21 1670 cell_index = 1 1671 cell_names = {"Burgundy","Olaf","Jim","Bob","Joe"} 1672 cell_parameters = 1 1673 SetDataFolder root:VSANS_file:entry1:instrument:beam:monochromator:chopper 1674 type = "single" 1675 rotation_speed = 12000 1676 distance_from_source = 400 1677 distance_from_sample = 1500 1678 slits = 2 1679 angular_opening = 15 1680 duty_cycle = 0.25 1654 // description_of_distribution 1655 SetDataFolder root:VSANS_file:entry1:instrument:beam:chopper 1656 type = "single" 1657 rotation_speed = 12000 1658 distance_from_source = 400 1659 distance_from_sample = 1500 1660 slits = 2 1661 angular_opening = 15 1662 duty_cycle = 0.25 1663 SetDataFolder root:VSANS_file:entry1:instrument:beam:polarizer 1664 type = "supermirror" 1665 composition = "multilayer" 1666 efficiency = 0.95 1667 status = "in" 1668 SetDataFolder root:VSANS_file:entry1:instrument:beam:flipper 1669 status = "on" 1670 driving_current = 42 1671 waveform = "sine" 1672 frequency = 400 1673 transmitted_power = 0.99 1674 SetDataFolder root:VSANS_file:entry1:instrument:beam:polarizer_analyzer 1675 status = "down" 1676 guide_field_current_1 = 33 1677 guide_field_current_2 = 32 1678 solenoid_current = 21 1679 cell_index = 1 1680 cell_names = {"Burgundy","Olaf","Jim","Bob","Joe"} 1681 cell_parameters = 1 1682 1681 1683 // +? 1682 1684 … … 2083 2085 2084 2086 2085 2087 ////////////// fake DIV file tests 2088 2089 // 2090 // Make/O/T/N=1 file_name = "VSANS_DIV_test.h5" 2091 // 2092 // simple generation of a fake div file. for sans, nothing other than the creation date was written to the 2093 // file header. nothing more is needed (possibly) 2094 // 2095 // TODO -- I want to re-visit the propagation of errors in the DIV file. No errors are ever calculated/saved 2096 // during the generation of the file, but there's no reason it couldn't. the idea is that the plex 2097 // is counted so long that the errors are insignificant compared to the data errors, but that may not 2098 // always be the case. A bit of math may prove this. or not. Plus, the situation for VSANS may be different. 2099 // 2100 Proc H_Setup_VSANS_DIV_Structure() 2101 2102 NewDataFolder/O/S root:VSANS_DIV_file 2103 2104 NewDataFolder/O/S root:VSANS_DIV_file:entry1 2105 Make/O/T/N=1 title = "title of entry1" 2106 Make/O/T/N=1 start_date = "2015-02-28T08:15:30-5:00" 2107 NewDataFolder/O/S root:VSANS_DIV_file:entry1:instrument 2108 Make/O/T/N=1 name = "NGB30mSANS" 2109 NewDataFolder/O/S root:VSANS_DIV_file:entry1:data_B 2110 Make/O/I/N=(320,320) data = trunc(abs(gnoise(p+q))) 2111 Make/O/D/N=(320,320) error = 0.01*abs(gnoise(p+q)) 2112 NewDataFolder/O/S root:VSANS_DIV_file:entry1:data_MR 2113 Make/O/I/N=(48,256) data = trunc(abs(gnoise(p+q))) 2114 Make/O/D/N=(48,256) error = 0.01*abs(gnoise(p+q)) 2115 NewDataFolder/O/S root:VSANS_DIV_file:entry1:data_ML 2116 Make/O/I/N=(48,256) data = trunc(abs(gnoise(p+q))) 2117 Make/O/D/N=(48,256) error = 0.01*abs(gnoise(p+q)) 2118 NewDataFolder/O/S root:VSANS_DIV_file:entry1:data_MT 2119 Make/O/I/N=(128,48) data = trunc(abs(gnoise(p+q))) 2120 Make/O/D/N=(128,48) error = 0.01*abs(gnoise(p+q)) 2121 NewDataFolder/O/S root:VSANS_DIV_file:entry1:data_MB 2122 Make/O/I/N=(128,48) data = trunc(abs(gnoise(p+q))) 2123 Make/O/D/N=(128,48) error = 0.01*abs(gnoise(p+q)) 2124 NewDataFolder/O/S root:VSANS_DIV_file:entry1:data_FR 2125 Make/O/I/N=(48,256) data = trunc(abs(gnoise(p+q))) 2126 Make/O/D/N=(48,256) error = 0.01*abs(gnoise(p+q)) 2127 NewDataFolder/O/S root:VSANS_DIV_file:entry1:data_FL 2128 Make/O/I/N=(48,256) data = trunc(abs(gnoise(p+q))) 2129 Make/O/D/N=(48,256) error = 0.01*abs(gnoise(p+q)) 2130 NewDataFolder/O/S root:VSANS_DIV_file:entry1:data_FT 2131 Make/O/I/N=(128,48) data = trunc(abs(gnoise(p+q))) 2132 Make/O/D/N=(128,48) error = 0.01*abs(gnoise(p+q)) 2133 NewDataFolder/O/S root:VSANS_DIV_file:entry1:data_FB 2134 Make/O/I/N=(128,48) data = trunc(abs(gnoise(p+q))) 2135 Make/O/D/N=(128,48) error = 0.01*abs(gnoise(p+q)) 2136 2137 SetDataFolder root: 2138 2139 End -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_BeamCenter.ipf
r957 r958 5 5 // -- adjust the guesses to some better starting conditions 6 6 // -- multiple fit options with different things held 7 // -- when selecting the detector, set the x/y pixel sizes8 // -- figure out how to re-plot the images when swapping between LR and TB panels7 // x- when selecting the detector, set the x/y pixel sizes 8 // x- figure out how to re-plot the images when swapping between LR and TB panels 9 9 // 10 10 … … 16 16 Window DetectorPanelFit() : Panel 17 17 PauseUpdate; Silent 1 // building window... 18 NewPanel /W=(662,418,1586,1108)/N=PanelFit19 ShowTools/A20 18 21 19 // plot the default model to be sure some data is present … … 23 21 PlotBroadPeak_Pix2D() 24 22 endif 25 23 24 NewPanel /W=(662,418,1586,1108)/N=PanelFit/K=1 25 // ShowTools/A 26 26 27 PopupMenu popup_0,pos={20,20},size={109,20},proc=SetDetPanelPopMenuProc,title="Detector Panel" 27 28 PopupMenu popup_0,mode=1,popvalue="FL",value= #"\"FL;FR;FT;FB;MR;ML;MT;MB;B;\"" … … 42 43 AppendImage curDispPanel 43 44 ModifyImage curDispPanel ctab= {*,*,ColdWarm,0} 44 ModifyGraph width={Plan,1,bottom,left}45 // ModifyGraph width={Plan,1,bottom,left} 45 46 Label left "Y pixels" 46 47 Label bottom "X pixels" … … 52 53 AppendImage PeakPix2D_mat 53 54 ModifyImage PeakPix2D_mat ctab= {*,*,ColdWarm,0} 54 ModifyGraph width={Plan,1,bottom,left}55 // ModifyGraph width={Plan,1,bottom,left} 55 56 Label left "Y pixels" 56 57 Label bottom "X pixels" … … 104 105 // need to make it more generic, especially for RAW data 105 106 107 Variable xDim,yDim 106 108 Wave dispW=root:curDispPanel 107 109 Wave cw = root:coef_PeakPix2D 110 111 cw[7] = 4 112 cw[8] = 8 113 114 Wave xwave_PeakPix2D=root:xwave_PeakPix2D 115 Wave ywave_PeakPix2D=root:ywave_PeakPix2D 116 Wave zwave_PeakPix2D=root:zwave_PeakPix2D 117 118 //plot it in the subwindow with the proper aspect and positioning 108 119 strswitch(str) 109 120 case "FL": 121 xDim=48 122 yDim=256 123 MoveSubWindow/W=PanelFit#DetData fnum=(20,80,180,600) 124 MoveSubWindow/W=PanelFit#ModelData fnum=(200,80,360,600) 125 cw[7] = 8 126 cw[8] = 4 110 127 wave newW = root:Packages:NIST:VSANS:VCALC:Front:det_FL 111 128 break 112 129 case "FR": 130 xDim=48 131 yDim=256 132 MoveSubWindow/W=PanelFit#DetData fnum=(20,80,180,600) 133 MoveSubWindow/W=PanelFit#ModelData fnum=(200,80,360,600) 134 cw[7] = 8 135 cw[8] = 4 113 136 wave newW = root:Packages:NIST:VSANS:VCALC:Front:det_FR 114 137 break 115 138 case "FT": 139 xDim=128 140 yDim=48 141 MoveSubWindow/W=PanelFit#DetData fnum=(20,80,464,235) 142 MoveSubWindow/W=PanelFit#ModelData fnum=(20,280,464,435) 143 cw[7] = 4 144 cw[8] = 8 116 145 wave newW = root:Packages:NIST:VSANS:VCALC:Front:det_FT 117 146 break 118 147 case "FB": 148 xDim=128 149 yDim=48 150 MoveSubWindow/W=PanelFit#DetData fnum=(20,80,464,235) 151 MoveSubWindow/W=PanelFit#ModelData fnum=(20,280,464,435) 152 cw[7] = 4 153 cw[8] = 8 119 154 wave newW = root:Packages:NIST:VSANS:VCALC:Front:det_FB 120 155 break 121 156 case "ML": 157 xDim=48 158 yDim=256 159 MoveSubWindow/W=PanelFit#DetData fnum=(20,80,180,600) 160 MoveSubWindow/W=PanelFit#ModelData fnum=(200,80,360,600) 161 cw[7] = 8 162 cw[8] = 4 122 163 wave newW = root:Packages:NIST:VSANS:VCALC:Middle:det_ML 123 164 break 124 165 case "MR": 166 xDim=48 167 yDim=256 168 MoveSubWindow/W=PanelFit#DetData fnum=(20,80,180,600) 169 MoveSubWindow/W=PanelFit#ModelData fnum=(200,80,360,600) 170 cw[7] = 8 171 cw[8] = 4 125 172 wave newW = root:Packages:NIST:VSANS:VCALC:Middle:det_MR 126 173 break 127 174 case "MT": 175 xDim=128 176 yDim=48 177 MoveSubWindow/W=PanelFit#DetData fnum=(20,80,464,235) 178 MoveSubWindow/W=PanelFit#ModelData fnum=(20,280,464,435) 179 cw[7] = 4 180 cw[8] = 8 128 181 wave newW = root:Packages:NIST:VSANS:VCALC:Middle:det_MT 129 182 break 130 183 case "MB": 184 xDim=128 185 yDim=48 186 MoveSubWindow/W=PanelFit#DetData fnum=(20,80,464,235) 187 MoveSubWindow/W=PanelFit#ModelData fnum=(20,280,464,435) 188 cw[7] = 4 189 cw[8] = 8 131 190 wave newW = root:Packages:NIST:VSANS:VCALC:Middle:det_MB 132 191 break 133 192 case "B": 193 134 194 return(0) //just exit 135 195 break … … 137 197 return(0) //just exit 138 198 endswitch 139 199 200 // set the simulated detector data to be point-scaling for display and fitting, not q-scaling 140 201 duplicate/O newW dispW 141 202 SetScale/P x 0,1, dispW 142 203 SetScale/P y 0,1, dispW 143 204 144 // then plot it in the subwindow with the proper aspect and positioning 145 146 205 206 // re-dimension the model calculation to be the proper dimensions 207 Redimension/N=(xDim*yDim) xwave_PeakPix2D, ywave_PeakPix2D,zwave_PeakPix2D 208 FillPixTriplet(xwave_PeakPix2D, ywave_PeakPix2D,zwave_PeakPix2D,xDim,yDim) 209 Make/O/D/N=(xDim,yDim) PeakPix2D_mat // use the point scaling of the matrix (=pixels) 210 Duplicate/O $"PeakPix2D_mat",$"PeakPix2D_lin" //keep a linear-scaled version of the data 147 211 148 212 return(0) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_HDF5_VSANS_Utils.ipf
r955 r958 126 126 127 127 End 128 129 130 // TODO 131 // currently, there are no dummy fill values or attributes for the fake DIV file 132 // 133 Macro Setup_VSANS_DIV_Struct() 134 135 // lays out the tree and fills with dummy values 136 H_Setup_VSANS_DIV_Structure() 137 138 // writes in the attributes 139 // H_Fill_VSANS_Attributes() 140 141 // fill in with VCALC simulation bits 142 // H_Fill_VSANS_wSim() 143 144 End 145 146 Macro Save_VSANS_DIV_Nexus(fileName) 147 String fileName="Test_VSANS_DIV_file" 148 149 // save as HDF5 (no attributes saved yet) 150 Save_VSANS_file("root:VSANS_DIV_file", fileName+".h5") 151 152 // read in a data file using the gateway-- reads from the home path 153 H_HDF5Gate_Read_Raw(fileName+".h5") 154 155 // after reading in a "partial" file using the gateway (to generate the xref) 156 // Save the xref to disk (for later use) 157 Save_HDF5___xref("root:"+fileName,"HDF5___xref") 158 159 // after you've generated the HDF5___xref, load it in and copy it 160 // to the necessary folder location. 161 Copy_HDF5___xref("root:VSANS_DIV_file", "HDF5___xref") 162 163 // writes out the contents of a data folder using the gateway 164 H_HDF5Gate_Write_Raw("root:VSANS_DIV_file", fileName+".h5") 165 166 // re-load the data file using the gateway-- reads from the home path 167 // now with attributes 168 H_HDF5Gate_Read_Raw(fileName+".h5") 169 170 End 171 172 173 174 175 176 177 178 128 179 129 180 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_VCALCPanel_MockUp.ipf
r955 r958 72 72 PopupMenu popup_a,mode=1,popvalue="Low Q",value= root:Packages:NIST:VSANS:VCALC:gPresetPopStr 73 73 74 PopupMenu popup_b,pos={690,310},size={142,20},title="Binning type" 74 PopupMenu popup_b,pos={690,310},size={142,20},title="Binning type",proc=V_RebinIQ_PopProc 75 75 PopupMenu popup_b,mode=1,popvalue="One",value= root:Packages:NIST:VSANS:VCALC:gBinTypeStr 76 76 … … 196 196 // tab(5) - Simulation setup 197 197 SetVariable VCALCCtrl_5a,pos={40,290},size={200,15},title="Neutrons on Sample (imon)" 198 SetVariable VCALCCtrl_5a,limits={1e7,1e15,1e7},disable=1,value=_NUM:1e10 198 SetVariable VCALCCtrl_5a,limits={1e7,1e15,1e7},disable=1,value=_NUM:1e10,proc=V_SimImon_SetVarProc 199 199 PopupMenu VCALCCtrl_5b,pos={40,260},size={180,20},title="Model Function",disable=1 200 PopupMenu VCALCCtrl_5b,mode=1,popvalue="Debye",value= root:Packages:NIST:VSANS:VCALC:gModelFunctionType 201 202 End 203 200 PopupMenu VCALCCtrl_5b,mode=1,popvalue="Debye",value= root:Packages:NIST:VSANS:VCALC:gModelFunctionType,proc=V_SimModelFunc_PopProc 201 202 End 203 204 // 205 // just recalculates the detector panels, doesn't adjust the views 206 // 207 Function Recalculate_AllDetectors() 208 209 fPlotBackPanels() 210 fPlotMiddlePanels() 211 fPlotFrontPanels() 212 213 return(0) 214 End 204 215 205 216 // function to control the drawing of controls in the TabControl on the main panel … … 274 285 Execute "MiddlePanels_AsQ()" 275 286 Execute "BackPanels_AsQ()" 276 break 277 case -1: // control being killed 278 break 279 endswitch 280 281 return 0 282 End 283 284 285 287 288 break 289 case -1: // control being killed 290 break 291 endswitch 292 293 return 0 294 End 295 296 // 297 // recalculate the detectors with a preset model function 298 // 299 Function V_SimModelFunc_PopProc(ctrlName,popNum,popStr) : PopupMenuControl 300 String ctrlName 301 Variable popNum // which item is currently selected (1-based) 302 String popStr // contents of current popup item as string 303 304 Recalculate_AllDetectors() 305 306 return(0) 307 End 308 309 310 // 311 // recalculate the I(q) binning. no need to adjust model function or views 312 // just rebin 313 // 314 Function V_RebinIQ_PopProc(ctrlName,popNum,popStr) : PopupMenuControl 315 String ctrlName 316 Variable popNum // which item is currently selected (1-based) 317 String popStr // contents of current popup item as string 318 319 // do the q-binning for front panels to get I(Q) 320 Execute "BinAllFrontPanels()" 321 Execute "Front_IQ_Graph()" 322 323 // do the q-binning for middle panels to get I(Q) 324 Execute "BinAllMiddlePanels()" 325 Execute "Middle_IQ_Graph()" 326 327 // do the q-binning for the back panel to get I(Q) 328 Execute "BinAllBackPanels()" 329 Execute "Back_IQ_Graph()" 330 331 return(0) 332 End 333 334 335 336 337 338 // 286 339 // setVar for the wavelength 287 340 // … … 296 349 String sval = sva.sval 297 350 298 // don't need to recalculate the views, but need to recalculate the detectors 299 fPlotBackPanels() 300 fPlotMiddlePanels() 301 fPlotFrontPanels() 302 351 // // don't need to recalculate the views, but need to recalculate the detectors 352 // fPlotBackPanels() 353 // fPlotMiddlePanels() 354 // fPlotFrontPanels() 355 356 Recalculate_AllDetectors() 357 358 break 359 case -1: // control being killed 360 break 361 endswitch 362 363 return 0 364 End 365 366 // 367 // setVar for the simulation monitor count 368 // 369 Function V_SimImon_SetVarProc(sva) : SetVariableControl 370 STRUCT WMSetVariableAction &sva 371 372 switch( sva.eventCode ) 373 case 1: // mouse up 374 case 2: // Enter key 375 case 3: // Live update 376 Variable dval = sva.dval 377 String sval = sva.sval 378 379 Recalculate_AllDetectors() 380 303 381 break 304 382 case -1: // control being killed -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VSANS_Includes.ipf
r956 r958 16 16 // for possible peak fitting 17 17 #include "BroadPeak_Pix_2D" 18 #include "VC_BeamCenter"
Note: See TracChangeset
for help on using the changeset viewer.