#pragma rtGlobals=1 // Use modern global access method. #pragma version=5.0 #pragma IgorVersion=6.1 //********************* // Vers 1.2 090501 // //********************* // // Utility procedures for displaying workfiles from data folders and // conversion utilities for log/linear scaling of data // NIH color index is also defined here // // plots the data in the "type" folder as a wireframe 3D surface. // uses (dynamically) the log/lin scaling of data in the folder // Proc Plot3DSurface(type) String type Prompt type,"Display 2-D data type",popup,"SAM;EMP;BGD;DIV;COR;CAL;RAW;ABS;MSK;STO;SUB;DRK;RealTime" //macro will take whatever is in "type" folder //check the contents of "type" to make sure that data exists String wavePath = "root:Packages:NIST:"+type+":data" if(WaveExists($wavePath) == 0) String errString="There is no data in "+type Abort errString Endif PauseUpdate; Silent 1 // Building window... // Do nothing if the Surface Plotter XOP is not available. if (exists("CreateSurfer") !=4) DoAlert 0, "Surface Plotter XOP must be installed" return endif //creates a default-styled surface plot of the specified data DoWindow/F Surface_3D if(V_flag==0) CreateSurfer Endif MoveWindow 4,44,517,382 ModifySurfer FactoryDefaults, Update=0 ModifySurfer/K=1 ModifySurfer/N=Surface_3D ModifySurfer/T=wavePath ModifySurfer srcWave=$wavePath ModifySurfer srcType=1,plotType=3 ModifySurfer setControlView=3 ModifySurfer theta=37.5, phi=308.9, zScale=1, xStep=4, yStep=2 ModifySurfer frame=895, drawFrame=1 ModifySurfer drawBox=1 ModifySurfer drawTicks=5 ModifySurfer topRGB={0,0,0}, bottomRGB={30583,30583,30583}, backRGB={65535,65535,65535} ModifySurfer palette=YellowHot ModifySurfer fillFrameRGB={21845,21845,21845} ModifySurfer topContourRGB={0,26214,26214} ModifySurfer gridRGB={0,0,0} ModifySurfer grids=1 ModifySurfer numContourLevels=15 ModifySurfer marker=19, markerSize=1, markerColorType=2 ModifySurfer scatterDepthCue=1 ModifySurfer rotationType=0 ModifySurfer Update=1 End //*************** //a 'fake' version of the NIH "Fire 2" color table, preferable to IGOR's built-in //color tables - used by an image plot as a colorIndex wave // Function NIHColorIndex() Variable numberofColors=8,hi=65535,mid=35000,lo=0,step=16,ii=0,incr=0 Make/O/N=((numberOfColors-1)*step,3) $"root:myGlobals:NIHColors" WAVE NIHColors = $"root:myGlobals:NIHColors" ii=0 incr = 0 do NIHColors[ii+incr][0] = lo //black to blue NIHColors[ii+incr][1] = lo NIHColors[ii+incr][2] = lo + (hi-lo)/step*ii ii+=1 while(ii