- Timestamp:
- May 22, 2018 3:29:01 PM (5 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_BeamCenter.ipf
r1100 r1101 863 863 Edit panelWave,newXCtr_cm,newYCtr_cm 864 864 865 DoAlert 0, "enter the measured beam center for FR and MRpanels"865 DoAlert 0, "enter the measured beam center reference for Front and Middle panels" 866 866 V_fDeriveBeamCenters() 867 867 … … 900 900 901 901 902 // d ummyvalue for B903 newXCtr_cm[8] = 340904 newYCtr_cm[8] = 828902 // default value for B 903 newXCtr_cm[8] = 0 904 newYCtr_cm[8] = 0 905 905 906 906 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_DetectorCorrections.ipf
r1095 r1101 272 272 endif 273 273 274 Print "***Cal_X and Cal_Y for Back are using default values instead offile values ***"275 276 cal_x[0] = VCALC_getPixSizeX(detStr)*10 // pixel size in mm VCALC_getPixSizeX(detStr) is [cm]277 cal_x[1] = 1278 cal_x[2] = 10000279 cal_y[0] = VCALC_getPixSizeY(detStr)*10 // pixel size in mm VCALC_getPixSizeX(detStr) is [cm]280 cal_y[1] = 1281 cal_y[2] = 10000274 Print "***Cal_X and Cal_Y for Back are using file values ***" 275 276 // cal_x[0] = VCALC_getPixSizeX(detStr)*10 // pixel size in mm VCALC_getPixSizeX(detStr) is [cm] 277 // cal_x[1] = 1 278 // cal_x[2] = 10000 279 // cal_y[0] = VCALC_getPixSizeY(detStr)*10 // pixel size in mm VCALC_getPixSizeX(detStr) is [cm] 280 // cal_y[1] = 1 281 // cal_y[2] = 10000 282 282 283 283 … … 300 300 // Wave cal_y = V_getDet_cal_y(folder,detStr) 301 301 302 data_realDistX[][] = cal_x[0]*p 303 data_realDistY[][] = cal_y[0]*q 302 data_realDistX[][] = cal_x[0]*p*10 // cal_x and cal_y are in [cm], need mm 303 data_realDistY[][] = cal_y[0]*q*10 304 304 305 305 return(0) … … 551 551 552 552 553 DoAlert 0,"Error - Beam center is being interpreted as pixels, but needs to be in cm. V_ConvertBeamCtr_to_mmB()"553 // DoAlert 0,"Error - Beam center is being interpreted as pixels, but needs to be in cm. V_ConvertBeamCtr_to_mmB()" 554 554 555 555 Wave data_realDistX = $(destPath + ":entry:instrument:detector_"+detStr+":data_realDistX") … … 1433 1433 String destPath="" 1434 1434 1435 NVAR gIgnoreDetB = root:Packages:NIST:VSANS:Globals:gIgnoreDetB 1436 if(cmpstr(detStr,"B")==0 && gIgnoreDetB) 1437 return(0) 1438 endif 1439 1440 1435 1441 if(WaveExists(data) == 0) 1436 1442 Print "The data wave does not exist in V_DIVCorrection()" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_EventMode_Utils.ipf
r1100 r1101 998 998 // 999 999 //main entry procedure to open the panel, initializing if necessary 1000 Macro V_ReduceEventFiles()1000 Proc V_ReduceEventFilesPanel() 1001 1001 1002 1002 DoWindow/F V_Event_Reduce_Panel -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_RW_Utils.ipf
r1093 r1101 173 173 V_NonLinearCorrection_B(folder,w,cal_x,cal_y,detStr,destPath) 174 174 175 if(kBCTR_CM) 176 177 Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 178 Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 179 WAVE x_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 180 WAVE y_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 181 x_mm[0] = V_getDet_beam_center_x(folder,detStr) * 10 // convert cm to mm 182 y_mm[0] = V_getDet_beam_center_y(folder,detStr) * 10 // convert cm to mm 183 184 // now I need to convert the beam center in mm to pixels 185 // and have some rational place to look for it... 186 V_ConvertBeamCtr_to_pixB(folder,detStr,destPath) 187 else 175 // "B" is always naturally defined in terms of a pixel center. This can be converted to mm, 176 // but the experiment will measure pixel x,y - just like ordela detectors. 177 178 // if(kBCTR_CM) 179 // 180 // Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 181 // Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 182 // WAVE x_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 183 // WAVE y_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 184 // x_mm[0] = V_getDet_beam_center_x(folder,detStr) * 10 // convert cm to mm 185 // y_mm[0] = V_getDet_beam_center_y(folder,detStr) * 10 // convert cm to mm 186 // 187 // // now I need to convert the beam center in mm to pixels 188 // // and have some rational place to look for it... 189 // V_ConvertBeamCtr_to_pixB(folder,detStr,destPath) 190 // else 191 188 192 // beam center is in pixels, so use the old routine 189 193 V_ConvertBeamCtr_to_mmB(folder,detStr,destPath) 190 194 191 endif195 // endif 192 196 V_Detector_CalcQVals(folder,detStr,destPath) 193 197 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_Read.ipf
r1097 r1101 1216 1216 1217 1217 // == diameter if shape = CIRCLE 1218 // value is expected in [mm] diameter 1218 1219 Function V_getBeamStopC2_size(fname) 1219 1220 String fname … … 1904 1905 1905 1906 // shape (data folder) 1907 // height and width are reported in [cm] 1906 1908 Function V_getSampleAp2_height(fname) 1907 1909 String fname -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Initialize.ipf
r1100 r1101 341 341 342 342 NewDataFolder/O root:Packages:NIST:VSANS:Globals:Protocols 343 Make/O/T $"root:Packages:NIST:VSANS:Globals:Protocols:Base"={"none","none","ask","ask","none","AVTYPE=Circular;SAVE=Yes;NAME= Manual;PLOT=Yes","DRK=none,DRKMODE=0,","","","","",""}344 Make/O/T $"root:Packages:NIST:VSANS:Globals:Protocols:DoAll"={"ask","ask","ask","ask","ask","AVTYPE=Circular;SAVE=Yes;NAME= Manual;PLOT=Yes","DRK=none,DRKMODE=0,","","","","",""}343 Make/O/T $"root:Packages:NIST:VSANS:Globals:Protocols:Base"={"none","none","ask","ask","none","AVTYPE=Circular;SAVE=Yes;NAME=Auto;PLOT=Yes;BINTYPE=F4-M4-B;","DRK=none,DRKMODE=0,","","","","",""} 344 Make/O/T $"root:Packages:NIST:VSANS:Globals:Protocols:DoAll"={"ask","ask","ask","ask","ask","AVTYPE=Circular;SAVE=Yes;NAME=Auto;PLOT=Yes;BINTYPE=F4-M4-B;","DRK=none,DRKMODE=0,","","","","",""} 345 345 Make/O/T/N=(kNumProtocolSteps) $"root:Packages:NIST:VSANS:Globals:Protocols:CreateNew" //null wave 346 346 //Initialize waves to store values in … … 348 348 String/G root:Packages:NIST:VSANS:Globals:Protocols:gProtoStr="" 349 349 String/G root:Packages:NIST:VSANS:Globals:Protocols:gNewStr="" 350 String/G root:Packages:NIST:VSANS:Globals:Protocols:gAvgInfoStr = "AVTYPE=Circular;SAVE=Yes;NAME=Auto;PLOT=Yes;BINTYPE= One;"350 String/G root:Packages:NIST:VSANS:Globals:Protocols:gAvgInfoStr = "AVTYPE=Circular;SAVE=Yes;NAME=Auto;PLOT=Yes;BINTYPE=F4-M4-B;" 351 351 352 352 String/G root:Packages:NIST:VSANS:Globals:Protocols:gBegPtsStr="" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MainPanel.ipf
r1095 r1101 315 315 V_Show_Event_Panel() 316 316 endif 317 318 End 319 320 Proc V_Event_MultReduceButtonProc(ctrlName) : ButtonControl 321 String ctrlName 322 323 V_ReduceEventFilesPanel() 317 324 318 325 End … … 459 466 // Button MainButton_3f,pos={150,120},size={110,20},title="WorkFile Math",proc=V_WorkMath_MainButtonProc 460 467 // Button MainButton_3f,help={"Perfom simple math operations on workfile data"} 461 Button MainButton_3g,pos={150,1 80},size={100,20},title="Event Data",proc=V_Event_MainButtonProc468 Button MainButton_3g,pos={150,150},size={100,20},title="Event Data",proc=V_Event_MainButtonProc 462 469 Button MainButton_3g,help={"Manipulate VSANS Event Mode data"} 470 Button MainButton_3h,pos={150,180},size={140,20},title="Event Reduction",proc=V_Event_MultReduceButtonProc 471 Button MainButton_3h,help={"Reduce VSANS Event Mode data"} 472 463 473 464 474 Button MainButton_3a,disable=1 … … 469 479 // Button MainButton_3f,disable=1 470 480 Button MainButton_3g,disable=1 481 Button MainButton_3h,disable=1 471 482 472 483 //on tab(4) - Miscellaneous operations -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Protocol_Reduction.ipf
r1100 r1101 89 89 String/G root:Packages:NIST:VSANS:Globals:Protocols:gMASK="ask" 90 90 String/G root:Packages:NIST:VSANS:Globals:Protocols:gAbsStr="ask" 91 String/G root:Packages:NIST:VSANS:Globals:Protocols:gAVE="AVTYPE=Circular;SAVE=Yes - Concatenate;NAME=Auto;PLOT=No;BINTYPE= One;"91 String/G root:Packages:NIST:VSANS:Globals:Protocols:gAVE="AVTYPE=Circular;SAVE=Yes - Concatenate;NAME=Auto;PLOT=No;BINTYPE=F4-M4-B;" 92 92 String/G root:Packages:NIST:VSANS:Globals:Protocols:gDRK="DRK=none,DRKMODE=0," 93 93 … … 2781 2781 // activeType = "COR" 2782 2782 //add in DRK mode (0= not used, 10 = used) 2783 val = NumberByKey("DRKMODE",drkStr,"=","," ) 2784 mode += val 2783 // TODO: DRK has been de-activated for now 2784 // val = NumberByKey("DRKMODE",drkStr,"=","," ) 2785 // mode += val 2786 2785 2787 // print "mode = ",mode 2788 2786 2789 err = V_Correct(mode) 2787 2790 if(err) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WorkFolderUtils.ipf
r1094 r1101 599 599 600 600 V_NonLinearCorrection_B(fname,w,cal_x,cal_y,detStr,destPath) 601 602 if(kBCTR_CM) 603 604 Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 605 Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 606 WAVE x_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 607 WAVE y_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 608 x_mm[0] = V_getDet_beam_center_x(fname,detStr) * 10 // convert cm to mm 609 y_mm[0] = V_getDet_beam_center_y(fname,detStr) * 10 // convert cm to mm 610 611 // now I need to convert the beam center in mm to pixels 612 // and have some rational place to look for it... 613 V_ConvertBeamCtr_to_pixB(fname,detStr,destPath) 614 else 601 602 // "B" is always naturally defined in terms of a pixel center. This can be converted to mm, 603 // but the experiment will measure pixel x,y - just like ordela detectors. 604 605 // if(kBCTR_CM) 606 // 607 // Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 608 // Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 609 // WAVE x_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 610 // WAVE y_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 611 // x_mm[0] = V_getDet_beam_center_x(fname,detStr) * 10 // convert cm to mm 612 // y_mm[0] = V_getDet_beam_center_y(fname,detStr) * 10 // convert cm to mm 613 // 614 // // now I need to convert the beam center in mm to pixels 615 // // and have some rational place to look for it... 616 // V_ConvertBeamCtr_to_pixB(fname,detStr,destPath) 617 // else 615 618 // beam center is in pixels, so use the old routine 616 619 V_ConvertBeamCtr_to_mmB(fname,detStr,destPath) 617 620 618 endif621 // endif 619 622 V_Detector_CalcQVals(fname,detStr,destPath) 620 623
Note: See TracChangeset
for help on using the changeset viewer.