#pragma rtGlobals=1 // Use modern global access method. #pragma version=5.0 #pragma IgorVersion=6.1 //*********************** // Vers. 1.2 092101 // //procedures to display a schematic layout of the data reduction procedure //that was used to reduce a given file. useful for diagnosing //data reduction problems // // - due to pixelation differences between Mac/Windows, there are // two different procedures, one for each platform. // //************************ //main entry procedure for drawing schematics of the data reduction //process - switches on platform, since screen pixels are different //on each, and no realiable platform independent method could //be found // Proc ShowSchematic() Dowindow/F Schematic_Layout if(V_flag==1) Abort "Please close the existing schematic before creating a new one. Print it out if you want to save it." //DoWindow/K Schematic_Layout endif Variable oldScaling=root:myGlobals:gLogScalingAsDefault Variable num=getNewScaling() if(num==-99) //use cancel Abort else root:myGlobals:gLogScalingAsDefault=num endif if(cmpstr("Macintosh",IgorInfo(2)) == 0) DrawMacSchematic() else DrawWinSchematic() Endif //reset scaling back to old value root:myGlobals:gLogScalingAsDefault=oldScaling End //returns the new color mapping //global is not changed by this function // // returns 0 for linear scaling, 1 for log scaling, -99 for user cancel // Function getNewScaling() String scaleStr="Log" Prompt scaleStr,"Select the color mapping for the 2D data",popup, "Log;Linear" doPrompt "Color Mapping",scaleStr if(V_flag==1) return(-99) else return(cmpstr(scaleStr,"Linear")) endif end //inStr is a keyword=value string (semicolon delimited) //outStr is "stacked" for nice printing, replacing the semicolons //with returns // Function/S StackText(inStr) String inStr String item="",outStr="" Variable ii=0,num=0 num = ItemsInList(inStr, ";") do item = StringFromList(ii, inStr, ";") outStr += item outStr += "\r" ii+=1 while(ii