Ignore:
Timestamp:
Apr 6, 2010 4:56:48 PM (13 years ago)
Author:
srkline
Message:

Made preferences a common panel (moved to PlotUtilsMacro?.ipf and globals to root:Packages:NIST:) and added menu items for all packages. Many files had to be modified so that the preferences could be properly accessed

File Open dialog now is set to "All files" so that XML can be selected. I think that all open access that doesn't already have the full path go through this common function.

Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/Models_2D/GizmoCylinder_v40.ipf

    r570 r665  
    66end 
    77 
    8 Window Gizmo1() : GizmoPlot 
     8Window Gizmo1() 
    99        PauseUpdate; Silent 1   // Building Gizmo 6 window... 
    1010 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/Wrapper_v40.ipf

    r662 r665  
    2828        //Ugly. Put this here to make sure things don't break 
    2929        String/G root:Packages:NIST:gXMLLoader_Title 
    30         Variable/G root:Packages:NIST:gXML_Write = 1 
     30         
     31         
     32        //initializes preferences. this includes XML y/n, and SANS Reduction items.  
     33        // if they already exist, they won't be overwritten 
     34        Execute "init_pref()"            
    3135         
    3236        DoWindow/F WrapperPanel 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/SA_includes_v400.ipf

    r661 r665  
    5454        end 
    5555        "-" 
     56        "NCNR Preferences",Show_Preferences_Panel() 
    5657        "Feedback or Bug Report",OpenTracTicketPage() 
    5758        "Open Help Movie Page",OpenHelpMoviePage() 
  • sans/Dev/trunk/NCNR_User_Procedures/Common/NIST_XML_v40.ipf

    r664 r665  
    922922        if(dialog) 
    923923                PathInfo/S catPathName 
    924                 fullPath = DoSaveFileDialog("Save data as")             //won't actually open the file 
     924                fullPath = DoSaveFileDialog("Save XML data as",fname="",suffix=".ABSx")         //won't actually open the file 
    925925                If(cmpstr(fullPath,"")==0) 
    926926                        //user cancel, don't write out a file 
  • sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtils2D_v40.ipf

    r570 r665  
    818818 
    819819// unused - all of this functionality has been added to the Wrapper Panel 
    820 Window Plot_2D_Controls() : Panel 
     820Window Plot_2D_Controls() 
    821821        PauseUpdate; Silent 1           // building window... 
    822822        NewPanel /W=(950,44,1250,244) 
  • sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtilsMacro_v40.ipf

    r662 r665  
    101101                fileStr = DoOpenFileDialog("Select a data file to load") 
    102102                if (cmpstr(fileStr,"") == 0) 
     103                        String/G root:Packages:NIST:gLastFileName = "" 
    103104                        return          //get out if no file selected 
    104105                endif 
     
    873874 
    874875//returns the path to the file, or null if cancel 
     876// 
     877// either the T="????" or the /F flags work to set the filter to "all files" 
     878// but the T is essentially obsolete, /F is new for Igor 6.1 and recommended 
    875879Function/S DoOpenFileDialog(msg) 
    876880        String msg 
     
    880884        String outputPath 
    881885         
    882         Open/D/R/T="????"/M=msg refNum 
     886        String fileFilters = "All Files:.*;" 
     887                 
     888//      Open/D/R/T="????"/M=msg refNum 
     889        Open/D/R/F=fileFilters/M=msg refNum 
    883890        outputPath = S_fileName 
    884891         
     
    952959        Variable maxLength=25 
    953960        Variable nameTooLong=0 
    954          
     961        String/G root:Packages:NIST:gShortNameStr = inStr[0,maxLength-1] 
     962        SVAR newStr = root:Packages:NIST:gShortNameStr 
     963 
    955964        if(strlen(inStr) <= maxLength) 
    956965                return (inStr)          //length OK 
     
    968977         
    969978                        if(V_flag == 2)         //not OK, do something about it 
    970                                 String/G root:myGlobals:gShortNameStr = inStr[0,maxLength-1] 
    971                                 SVAR newStr = root:myGlobals:gShortNameStr 
    972979                                 
    973980                                DoWindow/F ShorterNameInput             //it really shouldn't exist... 
    974981                                if(V_flag==0) 
    975                                         NewPanel /W=(570,152,915,280) as "Enter a Shorter Name" 
     982                                 
     983                                        NewPanel /W=(166,90,666,230) as "Enter a Shorter Name" 
    976984                                        DoWindow/C ShorterNameInput 
    977985                                        SetDrawLayer UserBack 
    978986                                        TitleBox title0,pos={35,8},size={261,20},title=" Enter a shorter file name. It must be 25 characters or less " 
    979                                         TitleBox title0,fStyle=1 
     987                                        TitleBox title0,fSize=12,fStyle=1 
    980988                                        SetVariable setvar0,pos={21,52},size={300,15},title="New name",value= _STR:newStr 
    981                                         SetVariable setvar0,proc=ShorterNameSetVarProc 
     989                                        SetVariable setvar0,proc=ShorterNameSetVarProc,fsize=12 
    982990                                        SetVariable setvar0 valueBackColor=(65535,49151,49151) 
    983991                                        Button button0,pos={259,87},size={60,20},title="Done" 
    984992                                        Button button0,proc=ShorterNameDoneButtonProc 
     993                                 
    985994                                endif 
    986995                                 
     
    988997                                 
    989998                                // this really should force a good name, but there could be errors that I'm not catching 
    990                                 Print newStr, strlen(newStr) 
     999//                              Print newStr, strlen(newStr) 
    9911000                                nameTooLong = 0 
    9921001                        endif 
     
    10311040        switch (ba.eventCode) 
    10321041                case 2: 
    1033                         SVAR newStr = root:myGlobals:gShortNameStr 
     1042                        SVAR newStr = root:Packages:NIST:gShortNameStr 
    10341043                        ControlInfo setvar0 
    10351044                        newStr = S_value 
     
    11741183        return(list) 
    11751184End 
     1185 
     1186 
     1187/////////////////////////////////////////////////// 
     1188// old SANSPreferences have been moved here to a common place and renamed to "NCNR Preferences" so that they  
     1189// are common to all of the packages (and will appear on all of the menus) 
     1190// 
     1191// globals moved to root:Packages:NIST: since this is generated by all packages. 
     1192// 
     1193/////////////////////////// 
     1194// user preferences 
     1195//  
     1196// globals are created in initialize.ipf 
     1197// 
     1198// this panel allows for user modification 
     1199/////////////////////////// 
     1200Proc Show_Preferences_Panel() 
     1201 
     1202        DoWindow/F Pref_Panel 
     1203        if(V_flag==0) 
     1204                Init_Pref() 
     1205                Pref_Panel() 
     1206        Endif 
     1207//      Print "Preferences Panel stub" 
     1208End 
     1209 
     1210Proc init_pref() 
     1211        // create the globals here if they are not already present 
     1212         
     1213        // each package initialization should call this to repeat the initialization 
     1214        // without overwriting what was already set 
     1215         
     1216        Variable val 
     1217         
     1218        ///// items for SANS reduction 
     1219        val = NumVarOrDefault("root:Packages:NIST:gLogScalingAsDefault", 1 ) 
     1220        Variable/G root:Packages:NIST:gLogScalingAsDefault=val 
     1221         
     1222        val = NumVarOrDefault("root:Packages:NIST:gAllowDRK", 0 ) 
     1223        Variable/G root:Packages:NIST:gAllowDRK=val                     //don't show DRK as default 
     1224         
     1225        val = NumVarOrDefault("root:Packages:NIST:gDoTransCheck", 1 ) 
     1226        Variable/G root:Packages:NIST:gDoTransCheck=val 
     1227         
     1228        val = NumVarOrDefault("root:Packages:NIST:gBinWidth", 1 ) 
     1229        Variable/G root:Packages:NIST:gBinWidth=val 
     1230         
     1231        val = NumVarOrDefault("root:Packages:NIST:gNPhiSteps", 72 ) 
     1232        Variable/G root:Packages:NIST:gNPhiSteps=val 
     1233         
     1234        /// items for SANS Analysis 
     1235         
     1236         
     1237        /// items for USANS Reduction 
     1238         
     1239         
     1240        /// items for everyone 
     1241        val = NumVarOrDefault("root:Packages:NIST:gXML_Write", 1 ) 
     1242        Variable/G root:Packages:NIST:gXML_Write = val 
     1243         
     1244         
     1245end 
     1246 
     1247Function LogScalePrefCheck(ctrlName,checked) : CheckBoxControl 
     1248        String ctrlName 
     1249        Variable checked 
     1250         
     1251        NVAR gLog = root:Packages:NIST:gLogScalingAsDefault 
     1252        glog=checked 
     1253        //print "log pref checked = ",checked 
     1254End 
     1255 
     1256Function DRKProtocolPref(ctrlName,checked) : CheckBoxControl 
     1257        String ctrlName 
     1258        Variable checked 
     1259         
     1260        NVAR gDRK = root:Packages:NIST:gAllowDRK 
     1261        gDRK = checked 
     1262        //Print "DRK preference = ",checked 
     1263End 
     1264 
     1265Function UnityTransPref(ctrlName,checked) : CheckBoxControl 
     1266        String ctrlName 
     1267        Variable checked 
     1268         
     1269        NVAR gVal = root:Packages:NIST:gDoTransCheck 
     1270        gVal = checked 
     1271End 
     1272 
     1273Function XMLWritePref(ctrlName,checked) : CheckBoxControl 
     1274        String ctrlName 
     1275        Variable checked 
     1276         
     1277        NVAR gVal = root:Packages:NIST:gXML_Write 
     1278        gVal = checked 
     1279End 
     1280 
     1281Function PrefDoneButtonProc(ctrlName) : ButtonControl 
     1282        String ctrlName 
     1283         
     1284        DoWindow/K pref_panel 
     1285End 
     1286 
     1287// draws the panel 
     1288// each checkbox should actively change a global value 
     1289Proc Pref_Panel() 
     1290        PauseUpdate; Silent 1           // building window... 
     1291        NewPanel /W=(607,158,958,580)/K=2 as "SANS Preference Panel" 
     1292        DoWindow/C pref_panel 
     1293        ModifyPanel cbRGB=(49694,61514,27679) 
     1294        SetDrawLayer UserBack 
     1295        DrawText 34,288,"nothing to set" 
     1296        DrawText 34,370,"nothing to set" 
     1297        CheckBox check0,pos={21,99},size={171,14},proc=LogScalePrefCheck,title="Use Log scaling for 2D data display" 
     1298        CheckBox check0,help={"Checking this will display 2D SANS data with a logarithmic color scale of neutron counts. If not checked, the color mapping will be linear."} 
     1299        CheckBox check0,value= root:Packages:NIST:gLogScalingAsDefault 
     1300        CheckBox check1,pos={21,119},size={163,14},proc=DRKProtocolPref,title="Allow DRK correction in protocols" 
     1301        CheckBox check1,help={"Checking this will allow DRK correction to be used in reduction protocols. You will need to re-draw the protocol panel for this change to be visible."} 
     1302        CheckBox check1,value= root:Packages:NIST:gAllowDRK 
     1303        CheckBox check2,pos={21,139},size={137,14},proc=UnityTransPref,title="Check for Transmission = 1" 
     1304        CheckBox check2,help={"Checking this will check for SAM or EMP Trans = 1 during data correction"} 
     1305        CheckBox check2,value= root:Packages:NIST:gDoTransCheck 
     1306        Button button0,pos={282,379},size={50,20},proc=PrefDoneButtonProc,title="Done" 
     1307        SetVariable setvar0,pos={21,169},size={200,15},title="Averaging Bin Width (pixels)" 
     1308        SetVariable setvar0,limits={1,100,1},value= root:Packages:NIST:gBinWidth 
     1309        SetVariable setvar1,pos={21,194},size={200,15},title="# Phi Steps (annular avg)" 
     1310        SetVariable setvar1,limits={1,360,1},value= root:Packages:NIST:gNPhiSteps 
     1311        CheckBox check3,pos={21,34},size={124,14},proc=XMLWritePref,title="Use canSAS XML Output" 
     1312        CheckBox check3,help={"Checking this will set the default output format to be canSAS XML rather than NIST 6 column"} 
     1313        CheckBox check3,value= root:Packages:NIST:gXML_Write 
     1314        GroupBox group0,pos={9,6},size={230,54},title="Global Preferences",fSize=12 
     1315        GroupBox group0_1,pos={9,74},size={230,149},title="SANS Reduction",fSize=12 
     1316        GroupBox group0_2,pos={9,238},size={230,68},title="USANS Reduction",fSize=12 
     1317        GroupBox group0_3,pos={9,319},size={230,68},title="Analysis",fSize=12 
     1318         
     1319        //keep these hidden for now so that nobody can accidentally change them from 
     1320        //the default values set in Initialize.ipf (128x128) 
     1321//      SetVariable setvar2,pos={10,125},size={200,15},title="Detector Pixels (X)" 
     1322//      SetVariable setvar2,limits={1,2000,1},value= root:Packages:NIST:gNPixelsX 
     1323//      SetVariable setvar3,pos={10,145},size={200,15},title="Detector Pixels (Y)" 
     1324//      SetVariable setvar3,limits={1,2000,1},value= root:Packages:NIST:gNPixelsY 
     1325 
     1326End 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/CircSectAve.ipf

    r570 r665  
    6868        dtdist = 1000*reals[18]         // det distance in mm 
    6969         
    70         NVAR binWidth=root:myGlobals:gBinWidth 
     70        NVAR binWidth=root:Packages:NIST:gBinWidth 
    7171         
    7272        dr = binWidth           // ***********annulus width set by user, default is one*********** 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Correct.ipf

    r570 r665  
    8787         
    8888        //check for trans==1 
    89         NVAR doCheck=root:myGlobals:gDoTransCheck 
     89        NVAR doCheck=root:Packages:NIST:gDoTransCheck 
    9090        Wave/Z samR=root:Packages:NIST:SAM:RealsRead 
    9191        Wave/Z empR=root:Packages:NIST:EMP:RealsRead 
     
    978978         
    979979        if(newCode==1) 
    980                 Variable/G root:myGlobals:gDoTransCheck=0       //turn off checking 
     980                Variable/G root:Packages:NIST:gDoTransCheck=0   //turn off checking 
    981981        endif 
    982982         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Initialize.ipf

    r662 r665  
    102102        //global to set log scale as the default for display of RAW data 
    103103        //these can be set using the Misc->Preferences panel 
    104         Variable/G root:myGlobals:gLogScalingAsDefault=1 
    105         Variable/G root:myGlobals:gAllowDRK=0                   //don't show DRK as default 
    106         Variable/G root:myGlobals:gDoTransCheck=1 
    107         Variable/G root:myGlobals:gBinWidth=1 
    108         Variable/G root:myGlobals:gNPhiSteps=72 
     104        //initializes preferences. this includes XML y/n, and SANS Reduction items.  
     105        // if they already exist, they won't be overwritten 
     106        Execute "init_pref()"    
     107 
    109108         
    110109        // flags to turn detector corrections on/off for testing (you should leave these ON) 
     
    117116        //set XML globals 
    118117        String/G root:Packages:NIST:gXMLLoader_Title = "" 
    119         Variable/G root:Packages:NIST:gXML_Write = 1 
    120  
    121118         
    122119        Return(0) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MaskUtils.ipf

    r570 r665  
    512512         
    513513        PathInfo/S catPathName 
    514         fullPath = DoSaveFileDialog("Save data as")             //won't actually open the file 
     514        fullPath = DoSaveFileDialog("Save Mask file as",fname="",suffix=".MASK")                //won't actually open the file 
    515515        If(cmpstr(fullPath,"")==0) 
    516516                //user cancel, don't write out a file 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Menu.ipf

    r661 r665  
    4242        End 
    4343        "-" 
     44        "NCNR Preferences",Show_Preferences_Panel() 
    4445        "Feedback or Bug Report",OpenTracTicketPage() 
    4546        "Open Help Movie Page",OpenHelpMoviePage() 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NSORT.ipf

    r648 r665  
    242242        if(dialog) 
    243243                PathInfo/S catPathName 
    244                 fullPath = DoSaveFileDialog("Save data as")             //won't actually open the file 
     244                fullPath = DoSaveFileDialog("Save data as",fname="",suffix=".ABS")              //won't actually open the file 
    245245                If(cmpstr(fullPath,"")==0) 
    246246                        //user cancel, don't write out a file 
     
    14911491                ModifyTable/W=CombinePanel#FilesToCombine width(:myGlobals:CombineTable:Labels)=180 
    14921492                 
    1493                 ModifyTable width(Point)=0              //JUN04, remove point numbers - confuses users since point != run 
     1493                ModifyTable/W=CombinePanel#FilesToCombine width(Point)=0                //JUN04, remove point numbers - confuses users since point != run 
    14941494//      Endif 
    14951495 
     
    17171717        Wave/T saveName = root:myGlobals:CombineTable:saveName 
    17181718 
    1719         Variable/G useTable=1 
     1719        Variable/G root:myGlobals:CombineTable:useTable=1 
    17201720         
    17211721        Variable num=numpnts(lowRun),ii,lowFile,medFile,hiFile 
     
    17411741        while(ii<num) 
    17421742 
    1743         Variable/G useTable=0 
     1743        Variable/G root:myGlobals:CombineTable:useTable=0               //turn this off immediately 
    17441744         
    17451745        return(0) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ProDiv.ipf

    r618 r665  
    6767         
    6868        //temporarily set data display to linear 
    69         NVAR gLog = root:myGlobals:gLogScalingAsDefault 
     69        NVAR gLog = root:Packages:NIST:gLogScalingAsDefault 
    7070        Variable oldState = gLog 
    7171        gLog=0  //linear 
     
    286286                         
    287287                        //temporarily set data display to linear 
    288                         NVAR gLog = root:myGlobals:gLogScalingAsDefault 
     288                        NVAR gLog = root:Packages:NIST:gLogScalingAsDefault 
    289289                        Variable oldState = gLog 
    290290                        gLog=0  //linear 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ProtocolAsPanel.ipf

    r661 r665  
    887887        CheckBox prot_check_6,pos={6,363},size={113,14},proc=DrkCheckProc,title="Use DRK correction" 
    888888        CheckBox prot_check_6,help={"If checked, the selected file will be used for DRK correction. Typically this is NOT checked"} 
    889         CheckBox prot_check_6,value= 0,disable = (!root:myGlobals:gAllowDRK) 
     889        CheckBox prot_check_6,value= 0,disable = (!root:Packages:NIST:gAllowDRK) 
    890890        SetVariable drkStr,pos={120,363},size={150,15},title="." 
    891         SetVariable drkStr,help={"DRK detector count file"},disable = (!root:myGlobals:gAllowDRK) 
     891        SetVariable drkStr,help={"DRK detector count file"},disable = (!root:Packages:NIST:gAllowDRK) 
    892892        SetVariable drkStr,limits={-Inf,Inf,0},value= root:myGlobals:Protocols:gDRK 
    893893        Button export_button, size={60,20},pos={125,384},title="Export",proc=ExportProtocol 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/RawWindowHook.ipf

    r570 r665  
    182182        //now that button state and data are sure to match (both are linear) 
    183183        // set the display to log scale, if the global has been set 
    184         NVAR gLogScalingAsDefault=root:myGlobals:gLogScalingAsDefault 
     184        NVAR gLogScalingAsDefault=root:Packages:NIST:gLogScalingAsDefault 
    185185        if(gLogScalingAsDefault) 
    186186                Log_lin("bisLin") 
     
    458458 
    459459Function ToggleDefaultMapping() 
    460         NVAR value = root:myGlobals:gLogScalingAsDefault 
     460        NVAR value = root:Packages:NIST:gLogScalingAsDefault 
    461461        value = !(value) 
    462462End 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/RectAnnulAvg.ipf

    r570 r665  
    8181        NVAR pixelsY = root:myGlobals:gNPixelsY 
    8282         
    83         NVAR binWidth=root:myGlobals:gBinWidth 
     83        NVAR binWidth=root:Packages:NIST:gBinWidth 
    8484        dr = binWidth           // annulus width set by user, default is one 
    8585        ddr = dr*sx             //step size, in mm (this is the value to pass to the resolution calculation, not dr 18NOV03) 
     
    491491         
    492492        dr = 1                  //minimum annulus width, keep this fixed at one 
    493         NVAR numPhiSteps = root:myGlobals:gNPhiSteps 
     493        NVAR numPhiSteps = root:Packages:NIST:gNPhiSteps 
    494494        nphi = numPhiSteps              //number of anular sectors is set by users 
    495495         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SANSPreferences.ipf

    r601 r665  
    44 
    55 
    6 /////////////////////////// 
    7 // user preferences 
    8 //  
    9 // globals are created in initialize.ipf 
    10 // 
    11 // this panel allows for user modification 
    12 /////////////////////////// 
    13 Proc Show_Preferences_Panel() 
    14  
    15         DoWindow/F Pref_Panel 
    16         if(V_flag==0) 
    17                 Init_Pref() 
    18                 Pref_Panel() 
    19         Endif 
    20 //      Print "Preferences Panel stub" 
    21 End 
    22  
    23 Proc init_pref() 
    24         // all creation of global values for the pref panel 
    25         // should be done in the experiment initialization 
    26         // since all these globals will be in active use 
    27         // even if the preferences are never actively set 
    28 end 
    29  
    30 Function LogScalePrefCheck(ctrlName,checked) : CheckBoxControl 
    31         String ctrlName 
    32         Variable checked 
    33          
    34         NVAR gLog = root:myGlobals:gLogScalingAsDefault 
    35         glog=checked 
    36         //print "log pref checked = ",checked 
    37 End 
    38  
    39 Function DRKProtocolPref(ctrlName,checked) : CheckBoxControl 
    40         String ctrlName 
    41         Variable checked 
    42          
    43         NVAR gDRK = root:myGlobals:gAllowDRK 
    44         gDRK = checked 
    45         //Print "DRK preference = ",checked 
    46 End 
    47  
    48 Function UnityTransPref(ctrlName,checked) : CheckBoxControl 
    49         String ctrlName 
    50         Variable checked 
    51          
    52         NVAR gVal = root:myGlobals:gDoTransCheck 
    53         gVal = checked 
    54 End 
    55  
    56 Function XMLWritePref(ctrlName,checked) : CheckBoxControl 
    57         String ctrlName 
    58         Variable checked 
    59          
    60         NVAR gVal = root:Packages:NIST:gXML_Write 
    61         gVal = checked 
    62 End 
    63  
    64 Function PrefDoneButtonProc(ctrlName) : ButtonControl 
    65         String ctrlName 
    66          
    67         DoWindow/K pref_panel 
    68 End 
    69  
    70 // draws the panel 
    71 // each checkbox should actively change a global value 
    72 Proc Pref_Panel() 
    73         PauseUpdate; Silent 1           // building window... 
    74         NewPanel /K=2 /W=(607,158,899,360) as "SANS Preference Panel" 
    75         DoWindow/C pref_panel 
    76         ModifyPanel cbRGB=(49694,61514,27679) 
    77         CheckBox check0,pos={10,10},size={186,14},proc=LogScalePrefCheck,title="Use Log scaling for 2D data display" 
    78         CheckBox check0,help={"Checking this will display 2D SANS data with a logarithmic color scale of neutron counts. If not checked, the color mapping will be linear."} 
    79         CheckBox check0,value= root:myGlobals:gLogScalingAsDefault 
    80         CheckBox check1,pos={10,30},size={184,14},proc=DRKProtocolPref,title="Allow DRK correction in protocols" 
    81         CheckBox check1,help={"Checking this will allow DRK correction to be used in reduction protocols. You will need to re-draw the protocol panel for this change to be visible."} 
    82         CheckBox check1,value= root:myGlobals:gAllowDRK 
    83         CheckBox check2,pos={10,50},size={184,14},proc=UnityTransPref,title="Check for Transmission = 1" 
    84         CheckBox check2,help={"Checking this will check for SAM or EMP Trans = 1 during data correction"} 
    85         CheckBox check2,value= root:myGlobals:gDoTransCheck 
    86         Button button0,pos={226,168},size={50,20},proc=PrefDoneButtonProc,title="Done" 
    87         SetVariable setvar0,pos={10,80},size={200,15},title="Averaging Bin Width (pixels)" 
    88         SetVariable setvar0,limits={1,100,1},value= root:myGlobals:gBinWidth 
    89         SetVariable setvar1,pos={10,105},size={200,15},title="# Phi Steps (annular avg)" 
    90         SetVariable setvar1,limits={1,360,1},value= root:myGlobals:gNPhiSteps 
    91         CheckBox check3,pos={10,130},size={184,14},proc=XMLWritePref,title="Use canSAS XML Output" 
    92         CheckBox check3,help={"Checking this will set the default output format to be canSAS XML rather than NIST 6 column"} 
    93         CheckBox check3,value=root:Packages:NIST:gXML_Write 
    94         //keep these hidden for now so that nobody can accidentally change them from 
    95         //the default values set in Initialize.ipf (128x128) 
    96 //      SetVariable setvar2,pos={10,125},size={200,15},title="Detector Pixels (X)" 
    97 //      SetVariable setvar2,limits={1,2000,1},value= root:myGlobals:gNPixelsX 
    98 //      SetVariable setvar3,pos={10,145},size={200,15},title="Detector Pixels (Y)" 
    99 //      SetVariable setvar3,limits={1,2000,1},value= root:myGlobals:gNPixelsY 
    100  
    101 End 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SASCALC.ipf

    r630 r665  
    8787        // other variables 
    8888        // -(hard coded right now - look for NVAR declarations) 
    89         Variable/G root:Packages:NIST:SAS:gBinWidth=1 
     89        Variable/G root:Packages:NIST:gBinWidth=1               //uses global preference 
    9090        Variable/G root:Packages:NIST:SAS:gisLogScale=0 
    9191        String/G root:Packages:NIST:SAS:FileList = "SASCALC" 
     
    11251125        dtdist = 1000*reals[18]         // det distance in mm 
    11261126         
    1127         NVAR binWidth=root:Packages:NIST:SAS:gBinWidth 
     1127        NVAR binWidth=root:Packages:NIST:gBinWidth 
    11281128//      Variable binWidth = 1 
    11291129         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Schematic.ipf

    r570 r665  
    2929        endif 
    3030         
    31         Variable oldScaling=root:myGlobals:gLogScalingAsDefault 
     31        Variable oldScaling=root:Packages:NIST:gLogScalingAsDefault 
    3232 
    3333        Variable num=getNewScaling() 
     
    3535                Abort 
    3636        else 
    37                 root:myGlobals:gLogScalingAsDefault=num 
     37                root:Packages:NIST:gLogScalingAsDefault=num 
    3838        endif 
    3939         
     
    4444        Endif 
    4545        //reset scaling back to old value 
    46         root:myGlobals:gLogScalingAsDefault=oldScaling 
     46        root:Packages:NIST:gLogScalingAsDefault=oldScaling 
    4747End 
    4848 
     
    317317                return (1) 
    318318        else 
    319                 NVAR doLogScaling = root:myGlobals:gLogScalingAsDefault 
     319                NVAR doLogScaling = root:Packages:NIST:gLogScalingAsDefault 
    320320                 
    321321                wave data = $("root:Packages:NIST:"+type+":data") 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Tile_2D.ipf

    r652 r665  
    145145         
    146146        // get the current state 
    147         NVAR defaultScaling = root:myGlobals:gLogScalingAsDefault 
     147        NVAR defaultScaling = root:Packages:NIST:gLogScalingAsDefault 
    148148        Variable oldState = defaultScaling 
    149149        defaultScaling = 0              //set the scaling to linear 
     
    264264         
    265265        // get the current state 
    266         NVAR defaultScaling = root:myGlobals:gLogScalingAsDefault 
     266        NVAR defaultScaling = root:Packages:NIST:gLogScalingAsDefault 
    267267        Variable oldState = defaultScaling 
    268268        defaultScaling = 0              //set the scaling to linear 
     
    569569         
    570570        // get the current state 
    571         NVAR defaultScaling = root:myGlobals:gLogScalingAsDefault 
     571        NVAR defaultScaling = root:Packages:NIST:gLogScalingAsDefault 
    572572        Variable oldState = defaultScaling 
    573573        defaultScaling = 0              //set the scaling to linear 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/LakeDesmearing_JB.ipf

    r624 r665  
    10761076        SetDataFolder root: 
    10771077        Execute "A_LoadOneDDataWithName(\"\",0)" 
     1078        SVAR fileStr = root:Packages:NIST:gLastFileName 
     1079        if (cmpstr(fileStr,"") == 0) 
     1080                return(0)               //get out if no file selected 
     1081        endif 
    10781082        //define the waves that the smoothing will be looking for... 
    10791083        SVAR fname = $("root:Packages:NIST:gLastFileName")              //this changes as any data is loaded 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/Main_USANS.ipf

    r662 r665  
    3232        "USANS Simulator",Show_UCALC() 
    3333        "-" 
     34        "NCNR Preferences",Show_Preferences_Panel() 
    3435        "Feedback or Bug Report",OpenTracTicketPage() 
    3536        "Open Help Movie Page",OpenHelpMoviePage() 
     
    6869        //NB This is also hardcoded a bit further down - search for "WHY WHY WHY" AJJ Sept 08 
    6970         
    70         //Preference value to determine if we are outputting XML 
    71         Variable/G root:Packages:NIST:gXML_Write = 1 
    72          
     71 
    7372        Make/O/T/N=1 fileWave,samWave,empWave,curWave //Added curWave Sept 06 A. Jackson 
    7473        fileWave="" 
     
    124123        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gDQv = 0.117         //divergence, in terms of Q (1/A)  (NOV 2004) 
    125124 
     125        //initializes preferences. this includes XML y/n, and SANS Reduction items.  
     126        // if they already exist, they won't be overwritten 
     127        Execute "init_pref()"    
    126128         
    127129 
     
    131133// 
    132134 
    133 Window USANS_Panel() : Panel 
     135Window USANS_Panel() 
    134136        PauseUpdate; Silent 1           // building window... 
    135137        NewPanel /W=(600,44,1015,493)/K=1 as "USANS_Panel" 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/U_CALC.ipf

    r605 r665  
    297297// left of 1055 is good for Mac, 955 is better for Win 
    298298// 
    299 Window UCALC_Panel() : Graph 
     299Window UCALC_Panel() 
    300300        PauseUpdate; Silent 1           // building window... 
    301301        String platform=UpperStr(IgorInfo(2)) 
Note: See TracChangeset for help on using the changeset viewer.