Changeset 1239 for sans/Dev/trunk/NCNR_User_Procedures/Reduction
- Timestamp:
- Feb 14, 2020 2:44:16 PM (3 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_DetectorCorrections.ipf
r1236 r1239 2200 2200 ///////////// 2201 2201 2202 // 2203 // 2204 // testing function to calculate the correction for the attenuation 2205 // of the scattered beam by windows downstream of the sample 2206 // (the back window of the sample block, the Si window) 2207 // 2208 // For implementation, this function could be made identical 2209 // to the large angle transmission correction, since the math is 2210 // identical - only the Tw value is different (and should ideally be 2211 // quite close to 1). With Tw near 1, this would be a few percent correction 2212 // at the largest scattering angles. 2213 // 2214 // 2215 Function V_WindowTransmission(tw) 2216 Variable tw 2217 2218 Make/O/D/N=100 theta,method1,method2,arg 2219 2220 theta = p/2 2221 theta = theta/360*2*pi //convert to radians 2222 2223 // method1 = exp( -ln(tw)/cos(theta) )/tw 2224 2225 Variable tau 2226 tau = -ln(tw) 2227 arg = (1-cos(theta))/cos(theta) 2228 2229 if(tau < 0.01) 2230 method2 = 1 - 0.5*tau*arg 2231 else 2232 method2 = ( 1 - exp(-tau*arg) )/(tau*arg) 2233 endif 2234 2235 return(0) 2236 end 2237 2238 2239 // 2240 // Large angle transmission correction for the downstream window 2241 // 2242 // DIVIDE the intensity by this correction to get the right answer 2243 // 2244 // -- this is a duplication of the math for the large angle 2245 // sample tranmission correction. Same situation, but now the 2246 // scattered neutrons are attenuated by whatever windows are 2247 // downstream of the scattering event. 2248 // (the back window of the sample block, the Si window) 2249 // 2250 // For implementation, this function is made identical 2251 // to the large angle transmission correction, since the math is 2252 // identical - only the Tw value is different (and should ideally be 2253 // quite close to 1). With Tw near 1, this would be a few percent correction 2254 // at the largest scattering angles. 2255 // 2256 // 2257 Function V_DownstreamWindowTransmission(w,w_err,fname,detStr,destPath) 2258 Wave w,w_err 2259 String fname,detStr,destPath 2260 2261 Variable sdd,xCtr,yCtr,uval 2262 2263 // get all of the geometry information 2264 // orientation = V_getDet_tubeOrientation(fname,detStr) 2265 sdd = V_getDet_ActualDistance(fname,detStr) 2266 2267 // this is ctr in mm 2268 xCtr = V_getDet_beam_center_x_mm(fname,detStr) 2269 yCtr = V_getDet_beam_center_y_mm(fname,detStr) 2270 2271 // get the value of the overall transmission of the downstream components 2272 // + error if available. 2273 // trans = V_getSampleTransmission(fname) 2274 // trans_err = V_getSampleTransError(fname) 2275 // TODO -- HARD WIRED values, need to set a global or find a place in the header (instrument block?) (reduction?) 2276 // currently globals are forced to one in WorkFolderUtils.ipf as the correction is done 2277 NVAR trans = root:Packages:NIST:VSANS:Globals:gDownstreamWinTrans 2278 NVAR trans_err = root:Packages:NIST:VSANS:Globals:gDownstreamWinTransErr 2279 2280 SetDataFolder $(destPath + ":entry:instrument:detector_"+detStr) 2281 2282 Wave data_realDistX = data_realDistX 2283 Wave data_realDistY = data_realDistY 2284 2285 Duplicate/O w dwt_corr,tmp_theta,tmp_dist,dwt_err,tmp_err //in the current df 2286 2287 //// calculate the scattering angle 2288 // dx = (distX - xctr) //delta x in mm 2289 // dy = (distY - yctr) //delta y in mm 2290 tmp_dist = sqrt((data_realDistX - xctr)^2 + (data_realDistY - yctr)^2) 2291 2292 tmp_dist /= 10 // convert mm to cm 2293 // sdd is in [cm] 2294 2295 tmp_theta = atan(tmp_dist/sdd) //this is two_theta, the scattering angle 2296 2297 Variable ii,jj,numx,numy,dx,dy,cos_th,arg,tmp 2298 numx = DimSize(tmp_theta,0) 2299 numy = DimSize(tmp_theta,1) 2300 2301 2302 //optical thickness 2303 uval = -ln(trans) //use natural logarithm 2304 2305 for(ii=0 ;ii<numx;ii+=1) 2306 for(jj=0;jj<numy;jj+=1) 2307 2308 cos_th = cos(tmp_theta[ii][jj]) 2309 arg = (1-cos_th)/cos_th 2310 2311 // a Taylor series around uval*arg=0 only needs about 4 terms for very good accuracy 2312 // correction= 1 - 0.5*uval*arg + (uval*arg)^2/6 - (uval*arg)^3/24 + (uval*arg)^4/120 2313 // OR 2314 if((uval<0.01) || (cos_th>0.99)) 2315 //small arg, approx correction 2316 dwt_corr[ii][jj] = 1-0.5*uval*arg 2317 else 2318 //large arg, exact correction 2319 dwt_corr[ii][jj] = (1-exp(-uval*arg))/(uval*arg) 2320 endif 2321 2322 // (DONE) 2323 // x- properly calculate and apply the 2D error propagation 2324 if(trans == 1) 2325 dwt_err[ii][jj] = 0 //no correction, no error 2326 else 2327 //sigT, calculated from the Taylor expansion 2328 tmp = (1/trans)*(arg/2-arg^2/3*uval+arg^3/8*uval^2-arg^4/30*uval^3) 2329 tmp *= tmp 2330 tmp *= trans_err^2 2331 tmp = sqrt(tmp) //sigT 2332 2333 dwt_err[ii][jj] = tmp 2334 endif 2335 2336 endfor 2337 endfor 2338 2339 // Here it is! Apply the correction to the intensity (divide -- to get the proper correction) 2340 w /= dwt_corr 2341 2342 // relative errors add in quadrature to the current 2D error 2343 tmp_err = (w_err/dwt_corr)^2 + (dwt_err/dwt_corr)^2*w*w/dwt_corr^2 2344 tmp_err = sqrt(tmp_err) 2345 2346 w_err = tmp_err 2347 2348 // DONE x- clean up after I'm satisfied computations are correct 2349 KillWaves/Z tmp_theta,tmp_dist,tmp_err,dwt_err 2350 2351 return(0) 2352 end 2353 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_IQ_Annular.ipf
r1126 r1239 21 21 // Mask(translucent?), like a "thresholding" operation, but act on the Q-value, not the Z- value. 22 22 // 23 // TODO!!!23 // DONE 24 24 // x- none of these procedures are aware of the BACK detector 25 25 // … … 27 27 // 28 28 // 29 Proc Annular_Binning(folderStr,detGroup,qCtr_Ann,qWidth)29 Proc V_Annular_Binning(folderStr,detGroup,qCtr_Ann,qWidth) 30 30 String folderStr="SAM",detGroup="F" 31 31 Variable qCtr_Ann=0.1,qWidth=0.01 // +/- in A^-1 … … 37 37 End 38 38 39 40 // TODO -- binType == 4 (slit mode) should never end up here, as it makes no sense 41 // 42 // -- really, the only binning that makes any sense is "one", treating each panel individually, 43 // so I may scrap the parameter, or ignore it. so don't count on it in the future. 39 // 40 // entry procedure for annular averaging 41 // 42 // detGroup defines which of the three carriages are used for the annulus 43 // (defined by qCtr and qWidth) 44 // 45 // currently the q-range defined is only checked on a single carriage. No crossing 46 // of the ring is allowed to spill onto other carriages. Probably not a significant issue 47 // but may come up in the future. 48 // 49 // All of the detector panels for a given carriage are used for the averaging, although 50 // in practice this cound be specified as say, ML+MR only if the panels were closed together 51 // and MT and MB were blocked. This would speed up the calculation. 44 52 // 45 53 Function V_QBinAllPanels_Annular(folderStr,detGroup,qCtr_Ann,qWidth) … … 65 73 endswitch 66 74 67 68 // right now, use all of the detectors. There is a lot of waste in this and it could be 69 // done a lot faster, but... 70 71 // TODO 72 // detStr = "FLRTB" or "MLRTB", depending which panel the q-ring is centered on/ 73 // for now, no crossing of the rings onto different carriages 74 75 // right now, use all of the detectors. There is a lot of waste in this and it could be 76 // done a lot faster, but... 77 78 // detStr = "FLRTB" or "MLRTB", depending which panel the q-ring is centered on/ 79 // for now, no crossing of the rings onto different carriages 80 75 81 V_fDoAnnularBin_QxQy2D(folderStr,detStr,qCtr_Ann,qWidth) 76 82 … … 350 356 endif 351 357 352 // TODO -- nq will need to be larger, once the back detector is installed 353 // 354 // note that the back panel of 320x320 (1mm res) results in 447 data points! 355 // - so I upped nq to 600 358 // TODO -- nq may need to be larger, if annular averaging on the back detector 356 359 357 360 nq = 600 … … 385 388 Variable nphi,dphi,isIn,phiij,iphi 386 389 387 // TODO: define nphi390 // DONE: define nphi (this is now set as a preference) 388 391 // dr = 1 //minimum annulus width, keep this fixed at one 389 392 NVAR numPhiSteps = root:Packages:NIST:VSANS:Globals:gNPhiSteps … … 402 405 // 403 406 // this needs to be a double loop now... 404 // TODO:405 // -- the iErr (=2D) wave and accumulation of error is NOT CALCULATED CORRECTLY YET406 // -- the solid angle per pixel is notcompletely implemented.407 // itwill be present for WORK data other than RAW, but not for RAW407 // DONE: 408 // x- the iErr (=2D) wave and accumulation of error is correctly propagated through all steps 409 // x- the solid angle per pixel is completely implemented. 410 // -Solid angle will be present for WORK data other than RAW, but not for RAW 408 411 409 412 // if any of the masks don't exist, display the error, and proceed with the averaging, using all data … … 600 603 // after looping through all of the data on the panels, calculate errors on I(q), 601 604 // just like in CircSectAve.ipf 602 // TODO:603 // -- 2D Errors were NOT properly acculumated through reduction, so this loop of calculations is NOT MEANINGFUL (yet)605 // DONE: 606 // x- 2D Errors ARE properly acculumated through reduction, so this loop of calculations is correct 604 607 // x- the error on the 1D intensity, is correctly calculated as the standard error of the mean. 605 608 for(ii=0;ii<nphi;ii+=1) … … 694 697 end 695 698 696 // TODO:697 // - - this is a temporary solution before a realwriter is created698 // - - resolution is not generated here (and it shouldn't be) since resolution is not known yet.699 // -- but a real writer will need to be aware of resolution, and there may be different forms699 // DONE: 700 // - this is a basic solution before a more complete writer is created 701 // - resolution is not generated here and is generally not reported for annualr data 702 // (although it could be) 700 703 // 701 704 // this will bypass save dialogs 702 // -- AND WILL OVERWITE DATA WITH THE SAME NAME 703 // 704 // V_Write1DData_ITX("root:Packages:NIST:VSANS:",type,saveName,binType) 705 // - AND WILL OVERWITE DATA WITH THE SAME NAME 706 // 705 707 // 706 708 Function V_fWrite1DAnnular(pathStr,folderStr,detGroup,saveName) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Menu.ipf
r1229 r1239 27 27 "-" 28 28 "Show Mask for Averaging",V_Display_Four_Panels() 29 // "Annular Binning", Annular_Binning()29 // "Annular Binning",V_Annular_Binning() 30 30 // "Write Annular Data",V_Write1DAnnular() 31 31 // "Trim I(q) points",V_CombineDataGraph() -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_RAW_Data_Panel.ipf
r1150 r1239 4 4 5 5 // 6 // this will become the equivalent of "RawWindowHook"7 // 8 // Procedures to:6 // this panel and proceudres is the equivalent of "RawWindowHook" for SANS 7 // 8 // This includes procedures to: 9 9 // display the detector data 10 10 // visualization tools … … 12 12 // status information necessary to understand the data 13 13 // buttons to more functionality to process data 14 15 16 // TODO17 // 18 // -- have the status automatically fill in when a new file is loaded, rather than needing a click of the "status" button14 // 15 16 // DONE 17 // 18 // x- have the status automatically fill in when a new file is loaded, rather than needing a click of the "status" button 19 19 // x- need a place somewhere to show the currently displayed folder 20 20 // x- checkboxes for "active" corrections? … … 29 29 // call this after loading data to either draw the data display panel or to update the contents 30 30 // 31 // TODO32 // -- make sure that the "type" input is correctly used for the updating of the data, values, etc.33 // -- add a procedure to define the global variables for pos, counts, QxQy, etc.31 // DONE 32 // x- make sure that the "type" input is correctly used for the updating of the data, values, etc. 33 // x- add a procedure to define the global variables for pos, counts, QxQy, etc. 34 34 // 35 35 Function V_UpdateDisplayInformation(type) … … 46 46 endif 47 47 48 // TODO: update the information here - in either case49 // what isn't automatically picked up? What is "stale" on the display?48 // DONE: 49 // faking clicks on the buttons updates the information 50 50 String/G root:Packages:NIST:VSANS:Globals:gCurDispType = type 51 51 … … 126 126 127 127 128 // TODO 128 // TODO_MEDIUM 129 129 // 130 130 // -- now that the sliders work, label them and move them to a better location … … 472 472 // 473 473 // 474 // TODO 474 // TODO_LOW 475 475 // -- add all of the controls of the VCALC panel (log scaling, adjusting the axes, etc.) 476 476 // x- get the panel to be correctly populated first, rather than needing to click everywhere to fill in … … 915 915 916 916 // 917 // TODO:918 // -- simply calls the missing parameter dialog to do the average.917 // DONE: 918 // x- simply calls the missing parameter dialog to do the average. 919 919 // see the file V_IQ_Annular.ipf for all of the features yet to be added. 920 920 // … … 928 928 // click code here 929 929 930 Execute " Annular_Binning()"930 Execute "V_Annular_Binning()" 931 931 932 932 break … … 1006 1006 1007 1007 1008 // TODO :1008 // TODO_VERIFY: 1009 1009 // x- link this to the preferences for the display. this is done in UpdateDisplayInformation (the main call) so that 1010 1010 // the panels are rescaled only once, rather than toggled three times (F, M, B) if I call from the tabProc … … 1082 1082 End 1083 1083 1084 // TODO 1085 // possiblyfunction to "tag" files right here in the disaply with things1084 // TODO_LOW 1085 // -- possibly use this function to "tag" files right here in the disaply with things 1086 1086 // like their intent, or other values that reduction will need, kind of like a "quick patch" 1087 1087 // with limited functionality (since full function would be a nightmare!) … … 1103 1103 End 1104 1104 1105 // TODO 1105 // TODO_LOW 1106 // -- currently this button is NOT visible on the RAW data display. Any saving of data 1107 // must go through a protocol (RAW can't be saved) 1106 1108 // -- fill in more functionality 1107 1109 // -- currently a straight concatentation of all data, no options … … 1132 1134 // binType = (V_flag == 0) ? 1 : V_flag // if binType not defined, set binType == 1 1133 1135 1134 String saveName="" 1136 String saveName="",exten="" 1135 1137 // write out the data set to a file 1136 1138 if(strlen(saveName)==0) … … 1140 1142 endif 1141 1143 1142 V_Write1DData_ITX("root:Packages:NIST:VSANS:",type,saveName,binType) 1144 // V_Write1DData_ITX("root:Packages:NIST:VSANS:",type,saveName,binType) 1145 1146 V_Write1DData_Individual("root:Packages:NIST:VSANS:",type,saveName,exten,binType) 1143 1147 1144 1148 Print "Saved file: " + saveName + ".itx" … … 1151 1155 End 1152 1156 1153 //TODO 1157 //TODO_LOW 1154 1158 // 1155 1159 //link this to the beam center finding panel -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_VSANS_Preferences.ipf
r1237 r1239 27 27 Initialize_VSANSPreferences() 28 28 endif 29 // these variables were recently created, so they may not exist if someone 30 // opens an old experiment -- then errors will result 31 if(exists("root:Packages:NIST:VSANS:Globals:gDoDownstreamWindowCor") != 2) 32 V_InitializeWindowTrans() //set up the globals (need to check in multiple places) 33 endif 34 29 35 VSANSPref_Panel() 30 36 Endif … … 90 96 Variable/G root:Packages:NIST:VSANS:Globals:gDoMonitorNormalization = 1 91 97 92 val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gDoDownstreamWindowCorPref", 1 ) 93 Variable/G root:Packages:NIST:VSANS:Globals:gDoDownstreamWindowCorPref = 0 98 val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gDoDownstreamWindowCor", 1 ) 99 Variable/G root:Packages:NIST:VSANS:Globals:gDoDownstreamWindowCor = 1 100 V_InitializeWindowTrans() //set up the globals (need to check in multiple places) 94 101 95 102 // Special global to prevent fake data from "B" detector from being written out … … 127 134 end 128 135 136 Function V_InitializeWindowTrans() 137 138 Variable/G root:Packages:NIST:VSANS:Globals:gDoDownstreamWindowCor = 1 139 140 // TODO -- when correcting this, search for all occurences!!! also in V_WorkFolderUtils !!! 141 // these global values need to be replaced with real numbers 142 // error is currently set to zero 143 Variable/G root:Packages:NIST:VSANS:Globals:gDownstreamWinTrans = 1 144 Variable/G root:Packages:NIST:VSANS:Globals:gDownstreamWinTransErr = 0 145 146 end 147 129 148 Function V_LogScalePrefCheck(ctrlName,checked) : CheckBoxControl 130 149 String ctrlName … … 239 258 Variable checked 240 259 241 NVAR gVal = root:Packages:NIST:VSANS:Globals:gDoDownstreamWindowCor Pref260 NVAR gVal = root:Packages:NIST:VSANS:Globals:gDoDownstreamWindowCor 242 261 gVal = checked 243 262 End … … 284 303 285 304 //on tab(1) - VSANS - initially visible 286 CheckBox PrefCtrl_1a,pos={21, 100},size={171,14},proc=V_LogScalePrefCheck,title="Use Log scaling for 2D data display"305 CheckBox PrefCtrl_1a,pos={21,80},size={171,14},proc=V_LogScalePrefCheck,title="Use Log scaling for 2D data display" 287 306 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."} 288 307 CheckBox PrefCtrl_1a,value= root:Packages:NIST:VSANS:Globals:gLogScalingAsDefault … … 290 309 // 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."} 291 310 // CheckBox PrefCtrl_1b,value= root:Packages:NIST:VSANS:Globals:gAllowDRK 292 CheckBox PrefCtrl_1c,pos={21,1 40},size={137,14},proc=V_UnityTransPref,title="Check for Transmission = 1"311 CheckBox PrefCtrl_1c,pos={21,100},size={137,14},proc=V_UnityTransPref,title="Check for Transmission = 1" 293 312 CheckBox PrefCtrl_1c,help={"Checking this will check for SAM or EMP Trans = 1 during data correction"} 294 313 CheckBox PrefCtrl_1c,value= root:Packages:NIST:VSANS:Globals:gDoTransCheck 295 SetVariable PrefCtrl_1d,pos={21,1 70},size={200,15},title="Averaging Bin Width (pixels)"314 SetVariable PrefCtrl_1d,pos={21,130},size={200,15},title="Averaging Bin Width (pixels)" 296 315 SetVariable PrefCtrl_1d,limits={1,100,1},value= root:Packages:NIST:VSANS:Globals:gBinWidth 297 SetVariable PrefCtrl_1e,pos={21,1 95},size={200,15},title="# Phi Steps (annular avg)"316 SetVariable PrefCtrl_1e,pos={21,155},size={200,15},title="# Phi Steps (annular avg)" 298 317 SetVariable PrefCtrl_1e,limits={1,360,1},value= root:Packages:NIST:VSANS:Globals:gNPhiSteps 318 SetVariable PrefCtrl_1p,pos={21,180},size={200,15},title="Window Transmission" 319 SetVariable PrefCtrl_1p,limits={0.01,1,0.001},value= root:Packages:NIST:VSANS:Globals:gDownstreamWinTrans 320 299 321 300 322 CheckBox PrefCtrl_1f title="Do Transmssion Correction?",size={140,14},value=root:Packages:NIST:VSANS:Globals:gDoTransmissionCor,proc=V_DoTransCorrPref … … 314 336 CheckBox PrefCtrl_1l value=root:Packages:NIST:VSANS:Globals:gDoNonLinearCor,pos={255,180},help={"Non-linear correction can't be turned off"} 315 337 CheckBox PrefCtrl_1m title="Do Downstream Window Corr?",size={140,14},proc=V_DoDownstreamWindowCorPref 316 CheckBox PrefCtrl_1m value=root:Packages:NIST:VSANS:Globals:gDoDownstreamWindowCor Pref,pos={255,200},help={"TURN OFF ONLY FOR DEBUGGING."}338 CheckBox PrefCtrl_1m value=root:Packages:NIST:VSANS:Globals:gDoDownstreamWindowCor,pos={255,200},help={"TURN OFF ONLY FOR DEBUGGING."} 317 339 // CheckBox PrefCtrl_1n title="Do Monitor Normalization?",size={140,14},proc=V_DoMonitorNormPref 318 340 // CheckBox PrefCtrl_1n value=root:Packages:NIST:VSANS:Globals:gDoMonitorNormalization,pos={255,220},help={"TURN OFF ONLY FOR DEBUGGING."} … … 329 351 // CheckBox PrefCtrl_1h,disable=1 330 352 // CheckBox PrefCtrl_1g,value=0,disable=2 // angle dependent efficiency not done yet 331 CheckBox PrefCtrl_1m,value=0,disable=2 // downstream window transmission no done yet353 // CheckBox PrefCtrl_1m,value=0,disable=2 // downstream window transmission no done yet 332 354 333 355 //on tab(2) - Analysis -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WhiteBeamSmear.ipf
r1100 r1239 6 6 // testing routines to compare various integration methods and approximations 7 7 // for calculating the resolution smearing from the white beam wavelength distribution 8 // 9 // none of these functions are used in the final version of the resolution smearing 10 // for white beam or super white beam. Functions and definitions of WB and SWB are contatined 11 // in the file: V_WhiteBeamDistribution.ipf 12 // 13 // 8 14 // 9 15 // … … 27 33 // writing fitting functions for all of these cases. The built-in Integrate may be limited 28 34 // 29 // TODO-- beware what might happen to the calculations since there is a single global string35 // NOTE: -- beware what might happen to the calculations since there is a single global string 30 36 // containing the function name. 31 37 // 32 // TODO:38 // NOTE: 33 39 // -- a significant problem with using the coef waves that are used in the wrapper are that 34 40 // they are set up with a dependency, so doing the WB calculation also does the "regular" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WorkFolderUtils.ipf
r1236 r1239 810 810 Print "Tube efficiency+shadowing correction NOT DONE" 811 811 endif 812 813 // (6) angle dependent transmission correction 812 813 // (6) Downstream window angle dependent transmission correction 814 // TODO: 815 // -- HARD WIRED value 816 // x- find a temporary way to pass this value into the function (global?) 817 // 818 // -- currently the transmission is set as a global (in V_VSANS_Preferences.ipf) 819 // -- need a permanent location in the file header to store the transmission value 820 // 821 NVAR/Z gDoWinTrans = root:Packages:NIST:VSANS:Globals:gDoDownstreamWindowCor 822 if(NVAR_Exists(gDoWinTrans) != 1) 823 V_InitializeWindowTrans() //set up the globals (need to check in multiple places) 824 endif 825 826 if (gDoWinTrans == 1) 827 Print "Doing Large-angle Downstream window transmission correction"// for "+ detStr 828 829 for(ii=0;ii<ItemsInList(ksDetectorListAll);ii+=1) 830 detStr = StringFromList(ii, ksDetectorListAll, ";") 831 832 if(cmpstr(detStr,"B") == 0 && gIgnoreDetB == 1) 833 // do nothing 834 else 835 Wave w = V_getDetectorDataW(fname,detStr) 836 Wave w_err = V_getDetectorDataErrW(fname,detStr) 837 838 V_DownstreamWindowTransmission(w,w_err,fname,detStr,destPath) 839 endif 840 endfor 841 else 842 Print "Downstream Window Transmission correction NOT DONE" 843 endif 844 845 // (7) angle dependent transmission correction 814 846 // TODO: 815 847 // x- this still needs to be filled in … … 822 854 NVAR gDoTrans = root:Packages:NIST:VSANS:Globals:gDoTransmissionCor 823 855 if (gDoTrans == 1) 824 Print "Doing Large-angle transmission correction"// for "+ detStr856 Print "Doing Large-angle sample transmission correction"// for "+ detStr 825 857 for(ii=0;ii<ItemsInList(ksDetectorListAll);ii+=1) 826 858 detStr = StringFromList(ii, ksDetectorListAll, ";") … … 839 871 endif 840 872 841 // (7) normalize to default monitor counts 873 874 // (8) normalize to default monitor counts 842 875 // TODO(DONE) x- each detector is rescaled separately, but the rescaling factor is global (only one monitor!) 843 876 // TODO -- but there are TWO monitors - so how to switch? … … 893 926 Print "Monitor Normalization correction NOT DONE" 894 927 endif 895 896 897 // (not done) angle dependent efficiency correction 898 // -- efficiency and shadowing are now done together (step 5) 899 NVAR doEfficiency = root:Packages:NIST:VSANS:Globals:gDoDetectorEffCor 928 929 930 // flag to allow adding raw data files with different attenuation (normally not done) 931 // -- yet to be implemented as a prefrence panel item 932 // NVAR gAdjustRawAtten = root:Packages:NIST:VSANS:Globals:gDoAdjustRAW_Atten 933 934 935 // // (not done) angle dependent efficiency correction 936 // // -- efficiency and shadowing are now done together (step 5) 937 // NVAR doEfficiency = root:Packages:NIST:VSANS:Globals:gDoDetectorEffCor 900 938 901 939 // -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Write_VSANS_QIS.ipf
r1192 r1239 121 121 fprintf refnum, "COLLIMATION=%s\r\n",proto[9] 122 122 123 // TODO123 // DONE 124 124 // x- make this work for 6-columns (or??) 125 125 formatStr = "%15.4g %15.4g %15.4g %15.4g %15.4g %15.4g\r\n" … … 347 347 348 348 349 // TODO: 350 // -- this is a temporary solution before a real writer is created 351 // -- resolution is not generated here (and it shouldn't be) since resolution is not known yet. 352 // -- but a real writer will need to be aware of resolution, and there may be different forms 349 // DONE: 350 // - this is a temporary solution before a real writer is created 351 // -- it has been replaced with V_Write1DData_Individual 352 // - resolution is not generated here (and it shouldn't be) since resolution is not known yet. 353 // - but a real writer will need to be aware of resolution, and there may be different forms 353 354 // 354 355 // This saves the data in Igor Text format, an ASCII format, but NOT standard SANS columns
Note: See TracChangeset
for help on using the changeset viewer.