Changeset 923
- Timestamp:
- Sep 19, 2013 2:24:48 PM (10 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_KR_Parser.ipf
r840 r923 392 392 Button button_2,pos={178,50},size={150,20},proc=KR_GenerateButtonProc,title="Generate Structure" 393 393 Button button_4,pos={178,80},size={120,20},proc=KR_DoCalcButtonProc,title="Do Calculation" 394 Button button_3,pos={600,50},size={120,20},proc=KR_DeleteRow,title="Delete Row(s)" 394 Button button_3,pos={600,60},size={120,20},proc=KR_DeleteRow,title="Delete Row(s)" 395 Button button_5,pos={600,10},size={120,20},proc=KR_SaveTable,title="Save Table" 396 Button button_6,pos={600,35},size={120,20},proc=KR_ImportTable,title="Import Table" 395 397 ValDisplay valdisp_0,pos={339,16},size={80,13},title="FFT_T" 396 398 ValDisplay valdisp_0,limits={0,0,0},barmisc={0,1000},value= #"root:FFT_T" … … 462 464 End 463 465 466 Function KR_SaveTable(ba) : ButtonControl 467 STRUCT WMButtonAction &ba 468 469 switch( ba.eventCode ) 470 case 2: // mouse up 471 472 // xx,yy,zz,rri,hti,rotx,roty,sld 473 Save/T/P=home/I xx,yy,zz,rri,hti,rotx,roty,sld as "SavedCyl.itx" 474 475 break 476 endswitch 477 478 return 0 479 End 480 481 Function KR_ImportTable(ba) : ButtonControl 482 STRUCT WMButtonAction &ba 483 484 switch( ba.eventCode ) 485 case 2: // mouse up 486 487 LoadWave/T/O/P=home 488 break 489 endswitch 490 491 return 0 492 End 464 493 465 494 //just generates the structure, no calculation … … 505 534 // fDoBinned_KR_FFTPanel(npt,qmin,qmax) 506 535 // 536 537 //force a redraw (re-coloring) of the gizmo window 538 FFTMakeGizmoButtonProc("") 507 539 508 540 break 509 541 endswitch 510 542 543 544 511 545 return 0 512 546 End -
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_Panel.ipf
r849 r923 540 540 Execute "Gizmo_VoxelMat()" 541 541 endif 542 ColorizeGizmo() 542 543 End 543 544 … … 919 920 return(est) 920 921 End 922 923 -
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_VoxelDisplay.ipf
r840 r923 46 46 End 47 47 48 49 Function ColorizeGizmo() 50 51 Wave mat = root:mat 52 ParseMatrix3D_rho(mat) 53 54 Wave rho3D = root:rho3D 55 NVAR solventSLD = root:FFT_SolventSLD 56 57 Variable np,val,ii,ind 58 string str 59 60 // how many different SLDs are there? 61 //loop through the rho wave, disregarding the solvent 62 Duplicate/O rho3D tmpSLD 63 Make/O/D/N=0 SLD_id 64 SLD_id = 0 65 np = 0 66 67 if(numpnts(rho3D)==0) 68 return(0) //nothing in matrix, get out 69 endif 70 71 do 72 val = WaveMin(tmpSLD) 73 if(val != solventSLD && val != 1e10) 74 np += 1 75 InsertPoints numpnts(SLD_id),1,SLD_id 76 SLD_id[np-1] = val 77 endif 78 tmpSLD = (tmpSLD == val) ? 1e10 : tmpSLD // set the values to 1e10 79 while(val != 1e10) 80 KillWaves/Z tmpSLD 81 82 Variable numDiffSLD = numpnts(SLD_id) 83 if(numdiffSLD > 5) 84 DoAlert 0,"Only 5 different colors can be displayed. Some SLDs will not be displayed." 85 endif 86 // print SLD_id 87 88 //// now loop through and colorize the different parts 89 Make/O/D/N=5 rr,gg,bb,aa 90 rr = {0,1,4.57771e-05,0.8,0} 91 gg = {0.244434,0,0.6,0.799954,0} 92 bb = {1,0,0,0,0} 93 aa = 0.2 94 95 for(ii=0;ii<5;ii+=1) 96 ind = ii 97 // for(ii=0;ii<numDiffSLD;ii+=1) 98 // ind = mod(ii,5) //loop through the 5 colors 99 str = "ModifyGizmo/N=Gizmo_VoxelMat ModifyObject=voxelgram0 property={ valueRGBA," 100 str += num2istr(ind)+"," 101 str += num2istr(SLD_id[ind])+"," 102 str += num2str(rr[ind])+"," 103 str += num2str(gg[ind])+"," 104 str += num2str(bb[ind])+"," 105 str += num2str(aa[ind])+"}" 106 107 // ModifyGizmo/N=Gizmo_VoxelMat ModifyObject=voxelgram0 property={ valueRGBA,ii,SLD_id[ii],rr[ii],gg[ii],bb[ii],aa[ii]} 108 // print str 109 execute str 110 endfor 111 112 return(0) 113 End 48 114 49 115 // a simple slice viewer ? where did this come from? -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_FlipperPanel.ipf
r915 r923 1224 1224 Variable num,ii,refnum 1225 1225 1226 fname = "CellDecay PanelSaveState"1226 fname = "CellDecaySaveState" 1227 1227 1228 1228 // get a list of the Decay waves … … 1337 1337 Variable num,ii,refnum 1338 1338 1339 fname = "Flipper PanelSaveState"1339 fname = "FlipperSaveState" 1340 1340 1341 1341 // get a list of the "Condition" waves … … 1352 1352 Endif 1353 1353 1354 Open/P=home refnum //as fname // creates a new file, or overwrites the existing file1354 Open/P=home refnum as fname // creates a new file, or overwrites the existing file 1355 1355 fprintf refNum,"IGOR\r" 1356 1356 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_PolarizationCorrection.ipf
r915 r923 152 152 153 153 154 Open/P=home refnum //as fname // creates a new file, or overwrites the existing file154 Open/P=home refnum as fname // creates a new file, or overwrites the existing file 155 155 fprintf refNum,"IGOR\r" 156 156 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/EventModeProcessing.ipf
r918 r923 247 247 Button button14,pos={488,350},size={120,20},proc=Stream_LoadDecim,title="Load Split List" 248 248 Button button19,pos={619,350},size={120,20},proc=Stream_LoadAdjustedList,title="Load Edited List" 249 Button button20,pos={650,376},size={90,20},proc=ShowList_ToLoad,title="Show List" 249 250 SetVariable setvar3,pos={487,378},size={150,16},title="Decimation factor" 250 251 SetVariable setvar3,fSize=10 … … 1108 1109 1109 1110 SetDataFolder root:Packages:NIST:Event 1111 1112 Wave slicedData = slicedData 1113 Wave logSlicedData = logSlicedData 1114 Wave dispSliceData = dispSliceData 1115 1110 1116 if(checked) 1117 logslicedData = log(slicedData) 1111 1118 Duplicate/O logslicedData dispsliceData 1112 1119 else … … 2371 2378 2372 2379 // load in the waves, saved as Igor text to preserve the data type 2373 LoadWave/T/O 2380 LoadWave/T/O/P=catPathName 2374 2381 filePathStr = S_fileName 2375 2382 if(strlen(S_fileName) == 0) … … 2983 2990 SVAR str = root:Packages:NIST:Event:gSplitFileList 2984 2991 2985 Make/O/T/N=1 root:Packages:NIST:Event:SplitFileWave 2986 WAVE tw = root:Packages:NIST:Event:SplitFileWave 2987 2992 WAVE/T/Z tw = root:Packages:NIST:Event:SplitFileWave 2993 if(waveExists(tw) != 1) 2994 Make/O/T/N=1 root:Packages:NIST:Event:SplitFileWave 2995 WAVE/T/Z tw = root:Packages:NIST:Event:SplitFileWave 2996 endif 2997 2988 2998 List2TextWave(str,tw) 2989 2999 Edit tw … … 3038 3048 case 2: 3039 3049 DoAlert 0,"The accumulated data is now the display data and is ready for display or export." 3040 Duplicate/O accumulatedData slicedData 3050 Duplicate/O accumulatedData slicedData 3051 // do something to "touch" the display to force it to update 3052 NVAR gLog = root:Packages:NIST:Event:gEvent_logint 3053 LogIntEvent_Proc("",gLog) 3041 3054 break 3042 3055 default: … … 3367 3380 End 3368 3381 3382 Function ShowList_ToLoad(ctrlName) 3383 String ctrlName 3384 3385 ShowSplitFileTable() 3386 3387 return(0) 3388 End 3369 3389 3370 3390
Note: See TracChangeset
for help on using the changeset viewer.