- Timestamp:
- Oct 14, 2016 12:53:52 PM (6 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_BeamCenter.ipf
r1005 r1015 11 11 // -- add method to be able to write the values to the local folder / or better, to file on disk 12 12 // -- graphically show the beam center / radius of where it is in relation to the panel 13 // 14 // -- move everything into it's own folder, rather than root: 15 // 13 16 14 17 … … 16 19 DoWindow/F PanelFit 17 20 if(V_flag==0) 21 22 NewDataFolder/O root:Packages:NIST:VSANS:Globals:BeamCenter 23 18 24 Execute "DetectorPanelFit()" 19 25 endif … … 39 45 PopupMenu popup_1,mode=1,popvalue="BroadPeak",value= #"\"BroadPeak;other;\"" 40 46 PopupMenu popup_2,pos={20,20},size={109,20},title="Data Source"//,proc=SetFldrPopMenuProc 41 PopupMenu popup_2,mode=1,popvalue=" VCALC",value= #"\"RAW;SAM;VCALC;\""47 PopupMenu popup_2,mode=1,popvalue="RAW",value= #"\"RAW;SAM;VCALC;\"" 42 48 43 49 Button button_0,pos={486,20},size={80,20},proc=DetFitGuessButtonProc,title="Guess" … … 49 55 50 56 51 52 duplicate/O root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_FL:det_FL curDispPanel 57 SetDataFolder root:Packages:NIST:VSANS:Globals:BeamCenter 58 59 duplicate/O root:Packages:NIST:VSANS:RAW:entry:instrument:detector_FL:data curDispPanel 53 60 SetScale/P x 0,1, curDispPanel 54 61 SetScale/P y 0,1, curDispPanel 55 62 56 63 SetDataFolder root: 64 57 65 // draw the correct images 58 66 DrawDetPanel("FL") … … 156 164 Variable nPix_X,nPix_Y,pixSize_X,pixSize_Y 157 165 158 159 Wave dispW=root: curDispPanel166 167 Wave dispW=root:Packages:NIST:VSANS:Globals:BeamCenter:curDispPanel 160 168 Wave cw = root:coef_PeakPix2D 161 169 … … 320 328 cw[8] = pixSize_Y*10 321 329 330 SetDataFolder root:Packages:NIST:VSANS:Globals:BeamCenter 322 331 // generate the new panel display 323 332 duplicate/O newW curDispPanel … … 333 342 RenameWindow #,DetData 334 343 SetActiveSubwindow ## 344 345 SetDataFolder root: 346 335 347 336 348 … … 392 404 case 2: // mouse up 393 405 // click code here 394 Wave dispW=root: curDispPanel406 Wave dispW=root:Packages:NIST:VSANS:Globals:BeamCenter:curDispPanel 395 407 Wave coefW=root:coef_PeakPix2D 396 408 … … 454 466 // click code here 455 467 456 Wave dispW=root: curDispPanel468 Wave dispW=root:Packages:NIST:VSANS:Globals:BeamCenter:curDispPanel 457 469 Wave coefW=root:coef_PeakPix2D 458 470 … … 597 609 // this works if the proper centers are in the file - otherwise, it's a mess 598 610 // "B" is skipped here, as it should be... 611 612 // TODO --?? is this a problem?? 599 613 SVAR type = root:Packages:NIST:VSANS:Globals:gCurDispType 600 614 … … 622 636 Function V_SpreadOutPanels() 623 637 638 // TODO ?? is this a problem?? 624 639 SVAR type = root:Packages:NIST:VSANS:Globals:gCurDispType 625 640 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MaskUtils.ipf
r1014 r1015 21 21 ///// LOADING 22 22 23 // TODO - when ma ksis loaded, need to be sure to clean up the "extra" waves that may be present23 // TODO - when mask is loaded, need to be sure to clean up the "extra" waves that may be present 24 24 // - the overlay and the currentTube waves since these are not overwritten or killed when new mask 25 25 // data is read in from HDF. need to manually? check for these and delete then, or the data and … … 63 63 // x- draw a mask 64 64 // x- save a mask (all panels) 65 // -- move everything into it's own folder, rather than root: 65 66 // -- be able to save the mask name to the RAW data file 66 67 // -- be able to read a mask based on what name is in the data file … … 87 88 DoWindow/F MaskEditPanel 88 89 if(V_flag==0) 89 Variable/G root:Packages:NIST:VSANS:Globals:gMaskTube = 0 90 Variable/G root:Packages:NIST:VSANS:Globals:gMaskMaxIndex = 47 90 91 NewDataFolder/O root:Packages:NIST:VSANS:Globals:Mask 92 93 Variable/G root:Packages:NIST:VSANS:Globals:Mask:gMaskTube = 0 94 Variable/G root:Packages:NIST:VSANS:Globals:Mask:gMaskMaxIndex = 47 95 96 // check for a mask, if not present, generate a default mask 97 String str="FT" 98 wave/Z maskW = $("root:Packages:NIST:VSANS:MSK:entry:instrument:detector_"+str+":data") 99 if(!WaveExists(maskW)) 100 V_GenerateDefaultMask() 101 endif 102 91 103 Execute "MaskEditorPanel()" 92 104 endif … … 113 125 114 126 SetVariable setvar0,pos={257.00,20.00},size={150.00,14.00},title="tube number" 115 SetVariable setvar0,limits={0,127,1},value=root:Packages:NIST:VSANS:Globals: gMaskTube127 SetVariable setvar0,limits={0,127,1},value=root:Packages:NIST:VSANS:Globals:Mask:gMaskTube 116 128 Button button_0,pos={257,46.00},size={50.00,20.00},proc=AddToMaskButtonProc,title="Add" 117 129 Button button_1,pos={319.00,46.00},size={50.00,20.00},proc=RemoveFromMaskButtonProc,title="Del" … … 184 196 185 197 SetVariable setvar0,limits={0,val,1} 186 NVAR gVal = root:Packages:NIST:VSANS:Globals: gMaskTube187 NVAR gMax = root:Packages:NIST:VSANS:Globals: gMaskMaxIndex198 NVAR gVal = root:Packages:NIST:VSANS:Globals:Mask:gMaskTube 199 NVAR gMax = root:Packages:NIST:VSANS:Globals:Mask:gMaskMaxIndex 188 200 gMax = val 189 201 if(gVal > val) … … 234 246 STRUCT WMButtonAction ba 235 247 ba.eventCode = 2 236 NVAR tubeVal = root:Packages:NIST:VSANS:Globals: gMaskTube248 NVAR tubeVal = root:Packages:NIST:VSANS:Globals:Mask:gMaskTube 237 249 if(s.specialKeyCode == 100) 238 250 //left arrow … … 253 265 254 266 // enforce the limits on the setvar 255 NVAR gMax = root:Packages:NIST:VSANS:Globals: gMaskMaxIndex267 NVAR gMax = root:Packages:NIST:VSANS:Globals:Mask:gMaskMaxIndex 256 268 if(tubeVal > gMax) 257 269 tubeVal = gMax … … 545 557 endswitch 546 558 559 SetDataFolder root:Packages:NIST:VSANS:Globals:Mask 560 547 561 // generate the new panel display 548 562 duplicate/O newW curDispPanel … … 561 575 DoUpdate 562 576 577 SetDataFolder root: 563 578 return(0) 564 579 End … … 654 669 // click code here 655 670 671 // fills in a "default mask" in a separate folder to then write out 656 672 Execute "H_Setup_VSANS_MASK_Structure()" 657 673 658 674 // fill with current "stuff" 659 675 SetDataFolder root:VSANS_MASK_file:entry 660 676 Wave/T title = title 661 677 title = "This is a custom MASK file for VSANS" … … 663 679 664 680 665 // copy over for all of the detector panels681 // copy over what was actually drawn for all of the detector panels 666 682 667 683 Variable ii … … 754 770 End 755 771 772 773 // this default mask is only generated on startup of the panel, if a mask 774 // has not been previously loaded. If any mask is present ("FT" is tested) then 775 // this function is skipped and the existing mask is not overwritten 776 Function V_GenerateDefaultMask() 777 778 NewDataFolder/O/S root:Packages:NIST:VSANS:MSK:entry 779 Make/O/T/N=1 title = "This is a fake MASK file for VSANS" 780 Make/O/T/N=1 start_date = "2015-02-28T08:15:30-5:00" 781 NewDataFolder/O/S root:Packages:NIST:VSANS:MSK:entry:instrument 782 Make/O/T/N=1 name = "NG3_VSANS" 783 NewDataFolder/O/S root:Packages:NIST:VSANS:MSK:entry:instrument:detector_B 784 Make/O/I/N=(150,150) data = 0 785 NewDataFolder/O/S root:Packages:NIST:VSANS:MSK:entry:instrument:detector_MR 786 Make/O/I/N=(48,128) data = 0 787 NewDataFolder/O/S root:Packages:NIST:VSANS:MSK:entry:instrument:detector_ML 788 Make/O/I/N=(48,128) data = 0 789 NewDataFolder/O/S root:Packages:NIST:VSANS:MSK:entry:instrument:detector_MT 790 Make/O/I/N=(128,48) data = 0 791 data[0,49][] = 1 792 data[78,127][] = 1 793 data[50,77][] = 0 794 795 NewDataFolder/O/S root:Packages:NIST:VSANS:MSK:entry:instrument:detector_MB 796 Make/O/I/N=(128,48) data = 0 797 data[0,49][] = 1 798 data[78,127][] = 1 799 data[50,77][] = 0 800 801 NewDataFolder/O/S root:Packages:NIST:VSANS:MSK:entry:instrument:detector_FR 802 Make/O/I/N=(48,128) data = 0 803 NewDataFolder/O/S root:Packages:NIST:VSANS:MSK:entry:instrument:detector_FL 804 Make/O/I/N=(48,128) data = 0 805 NewDataFolder/O/S root:Packages:NIST:VSANS:MSK:entry:instrument:detector_FT 806 Make/O/I/N=(128,48) data = 0 807 data[0,49][] = 1 808 data[78,127][] = 1 809 data[50,77][] = 0 810 811 NewDataFolder/O/S root:Packages:NIST:VSANS:MSK:entry:instrument:detector_FB 812 Make/O/I/N=(128,48) data = 0 813 data[0,49][] = 1 814 data[78,127][] = 1 815 data[50,77][] = 0 816 817 SetDataFolder root: 818 819 end 820 756 821 ////////////////////// MASK FILE 757 822 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Menu.ipf
r994 r1015 21 21 Submenu "In Progress Panels" 22 22 "VSANS Preferences",Show_VSANSPreferences_Panel() 23 "Beam Center Panel", DetectorPanelFit()23 "Beam Center Panel",V_FindBeamCenter() 24 24 End 25 25 Submenu "Work Files"
Note: See TracChangeset
for help on using the changeset viewer.