- Timestamp:
- Apr 6, 2018 3:02:01 PM (5 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_BeamCenter.ipf
r1083 r1094 881 881 // FB 882 882 newXCtr_cm[3] = xFR - (2.02 + 2.06)/2 883 newYCtr_cm[3] = yFR - (0.12 + 0.19)/2 883 newYCtr_cm[3] = yFR - (0.12 + 0.19)/2 // (-) is correct here 884 884 // FT (duplicate FB) 885 885 newXCtr_cm[2] = newXCtr_cm[3] … … 901 901 902 902 // dummy value for B 903 newXCtr_cm[8] = 50904 newYCtr_cm[8] = 50903 newXCtr_cm[8] = 340 904 newYCtr_cm[8] = 828 905 905 906 906 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_DetectorCorrections.ipf
r1093 r1094 549 549 Function V_ConvertBeamCtr_to_mmB(folder,detStr,destPath) 550 550 String folder,detStr,destPath 551 552 553 DoAlert 0,"Error - Beam center is being interpreted as pixels, but needs to be in cm. V_ConvertBeamCtr_to_mmB()" 551 554 552 555 Wave data_realDistX = $(destPath + ":entry:instrument:detector_"+detStr+":data_realDistX") -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_Read.ipf
r1092 r1094 2466 2466 End 2467 2467 2468 // THIS IS A NON-NICE ENTERED FIELD 2469 // -- this is the panel string where the box coordinates refer to (for the open beam and transmission) 2470 Function/S V_getReduction_BoxPanel(fname) 2471 String fname 2472 2473 String path = "entry:reduction:box_panel" 2474 Variable num=60 2475 return(V_getStringFromHDF5(fname,path,num)) 2476 End 2477 2468 2478 Function/WAVE V_getBoxCoordinates(fname) 2469 2479 String fname -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_Write.ipf
r1092 r1094 7044 7044 return(err) 7045 7045 end 7046 7047 // THIS IS A NON-NICE ENTERED FIELD 7048 // -- this is the panel string where the box coordinates refer to (for the open beam and transmission) 7049 Function V_writeReduction_BoxPanel(fname,str) 7050 String fname,str 7051 7052 // String path = "entry:reduction:comments" 7053 7054 Make/O/T/N=1 tmpTW 7055 String groupName = "/entry/reduction" 7056 String varName = "box_panel" 7057 tmpTW[0] = str // 7058 7059 variable err 7060 err = V_WriteTextWaveToHDF(fname, groupName, varName, tmpTW) 7061 if(err) 7062 Print "HDF write err = ",err 7063 endif 7064 7065 // now be sure to kill the data folder to force a re-read of the data next time this file is read in 7066 // err = V_KillNamedDataFolder(fname) 7067 // if(err) 7068 // Print "DataFolder kill err = ",err 7069 // endif 7070 7071 return(err) 7072 End 7046 7073 7047 7074 //box counts -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Marquee_Operations.ipf
r1084 r1094 301 301 Print "X-center (cm) = ",x_mm/10 302 302 Print "Y-center (cm) = ",y_mm/10 303 304 if(cmpstr(detStr,"FR") == 0) 305 Print "FRONT Reference X-center (cm) = ",x_mm/10 306 Print "FRONT Reference Y-center (cm) = ",y_mm/10 307 endif 308 309 if(cmpstr(detStr,"MR") == 0) 310 Print "MIDDLE Reference X-center (cm) = ",x_mm/10 311 Print "MIDDLE Reference Y-center (cm) = ",y_mm/10 312 endif 313 314 // if measured on the LEFT panel, convert to the RIGHT coordinates for the reference value 315 // these corrections are exactly the opposite of what is done in V_fDeriveBeamCenters(xFR,yFR,xMR,yMR) 316 if(cmpstr(detStr,"FL") == 0) 317 Print "FRONT Reference X-center (cm) = ",x_mm/10 + (0.03 + 0.03)/2 318 Print "FRONT Reference Y-center (cm) = ",y_mm/10 - (0.34 + 0.32)/2 319 endif 320 321 if(cmpstr(detStr,"ML") == 0) 322 Print "MIDDLE Reference X-center (cm) = ",x_mm/10 + (0.06 + 0.05)/2 323 Print "MIDDLE Reference Y-center (cm) = ",y_mm/10 - (0.14 + 0.01)/2 324 endif 303 325 endif 304 326 … … 311 333 312 334 // 313 //function will write new box coordinates to the data file 335 //function writes new box coordinates to the data file 336 // 337 // also writes the panel where the coordinates were set (non-nice field in /reduction) 314 338 // 315 339 Function V_UpdateBoxCoords() : GraphMarquee … … 338 362 339 363 V_writeBoxCoordinates(gCurrentFile,V_List2NumWave(boxStr,";","inW")) 364 365 V_writeReduction_BoxPanel(gCurrentFile,detStr) 340 366 341 367 // count = V_SumCountsInBox(x1,x2,y1,y2,ct_err,gCurDispType,detStr) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Transmission.ipf
r1084 r1094 259 259 gSamMatchList = quote + V_getFileIntentPurposeIDList("SAMPLE","SCATTERING",gTrnGrpID,0) + quote 260 260 // this resets a global string, since I can't pass a parameter (only constants) in value=fn() 261 PopupMenu popup_0,mode=1,value=#gSamMatchList 261 // PopupMenu popup_0,mode=1,value=#gSamMatchList 262 PopupMenu popup_0,mode=1,value=V_getSamListForPopup() 262 263 263 264 break … … 269 270 End 270 271 272 Function/S V_getSamListForPopup() 273 274 // String quote = "\"" 275 NVAR gTrnGrpID = root:Packages:NIST:VSANS:Globals:Transmission:gTrnGrpID 276 277 return(V_getFileIntentPurposeIDList("SAMPLE","SCATTERING",gTrnGrpID,0)) 278 End 271 279 272 280 Function V_TEmpBeamPopMenuProc(pa) : PopupMenuControl … … 281 289 SetVariable setvar_4,value=_STR:V_getSampleDescription(popStr) 282 290 283 // SetVariable setvar_6,value =_STR:"ML"284 291 285 292 WAVE boxCoord = V_getBoxCoordinates(popStr) … … 287 294 SetVariable setvar_5,value=_STR:V_NumWave2List(boxCoord,";") 288 295 296 String detStr = V_getReduction_BoxPanel(popStr) 297 SetVariable setvar_6,value =_STR:detStr 289 298 290 299 break … … 373 382 for(ii=0;ii<num;ii+=1) 374 383 SamFile = StringFromList(ii, list, ";") 375 V_CalcOneTransmission(SamFile,TransFile,EmptyFile) 384 385 if(ii==0) 386 // calculate the transmission for the first file 387 V_CalcOneTransmission(SamFile,TransFile,EmptyFile) 388 else 389 // then just write in the values (globals) that V_CalcOne determined 390 NVAR gTrans = root:Packages:NIST:VSANS:Globals:Transmission:gTrans 391 NVAR gTransErr = root:Packages:NIST:VSANS:Globals:Transmission:gTransErr 392 393 // write both out to the sample *scattering* file on disk 394 V_writeSampleTransmission(SamFile,gTrans) 395 V_writeSampleTransError(SamFile,gTransErr) 396 397 endif 376 398 endfor 377 399 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WorkFolderUtils.ipf
r1093 r1094 498 498 // so that they are DP, not integer 499 499 // TODO 500 // -- currently only redimensioning the data and linear_data_error - Whatelse???501 // -- ?? some of this is done at load time for RAW data. shouldn't be an issueto re-do the redimension500 // -- currently only redimensioning the data and linear_data_error - anything else??? 501 // -- ?? some of this is done at load time for RAW data. Not a problem to re-do the redimension 502 502 for(ii=0;ii<ItemsInList(ksDetectorListAll);ii+=1) 503 503 detStr = StringFromList(ii, ksDetectorListAll, ";") … … 533 533 // x- the "B" detector is calculated in its own routines 534 534 // -- document what is generated here: 535 // **in each detector folder: data_realDistX and data_realDistY (2D waves of the mm? position of thepixel)535 // **in each detector folder: data_realDistX and data_realDistY (2D waves of the [mm] position of each pixel) 536 536 // x- these spatial calculations ARE DONE as the RAW data is loaded. It allows the RAW 537 537 // data to be properly displayed, but without all of the (complete) set of detector corrections … … 625 625 626 626 // (3) dead time correction 627 // TODO:628 // -- test for correct operation627 // DONE: 628 // x- test for correct operation 629 629 // x- loop over all of the detectors 630 630 // x- B detector is a special case (do separately, then loop over NoB) 631 // -- this DOES alter the data632 // -- verify the error propagation (not done yet)631 // x- this DOES alter the data 632 // x- verify the error propagation (not done yet) 633 633 // 634 634 Variable countRate
Note: See TracChangeset
for help on using the changeset viewer.