Ignore:
Timestamp:
Apr 8, 2010 1:28:21 PM (12 years ago)
Author:
srkline
Message:

Corrections to NSORT and CombineFiles? to work with XML i/o.

CombineFiles? table hook now is properly active only in the upper table.

Some file filtering functions have been streamlined, but are still somewhat redundant, and could be consolidated. These are whenever listing of reduced files is requested (filter out what is known to be something else)

Commented out print statements from XML reader.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtilsMacro_v40.ipf

    r668 r670  
    13021302////// 
    13031303//on main portion of panel, always visible 
    1304         Button PrefPanelButtA,pos={354,12},size={50,20},proc=PrefDoneButtonProc,title="Done" 
     1304        Button PrefPanelButtonA,pos={354,12},size={50,20},proc=PrefDoneButtonProc,title="Done" 
    13051305 
    13061306        TabControl PrefTab,pos={7,49},size={410,202},tabLabel(0)="General",proc=PrefTabProc 
     
    13101310         
    13111311//on tab(0) - General - initially visible 
    1312         CheckBox PrefChec_0a,pos={21,96},size={124,14},proc=XMLWritePref,title="Use canSAS XML Output" 
    1313         CheckBox PrefChec_0a,help={"Checking this will set the default output format to be canSAS XML rather than NIST 6 column"} 
    1314         CheckBox PrefChec_0a,value= root:Packages:NIST:gXML_Write 
     1312        CheckBox PrefCtrl_0a,pos={21,96},size={124,14},proc=XMLWritePref,title="Use canSAS XML Output" 
     1313        CheckBox PrefCtrl_0a,help={"Checking this will set the default output format to be canSAS XML rather than NIST 6 column"} 
     1314        CheckBox PrefCtrl_0a,value= root:Packages:NIST:gXML_Write 
    13151315 
    13161316//on tab(1) - SANS 
    1317         CheckBox PrefChec_1a,pos={21,100},size={171,14},proc=LogScalePrefCheck,title="Use Log scaling for 2D data display" 
    1318         CheckBox PrefChec_1a,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."} 
    1319         CheckBox PrefChec_1a,value= root:Packages:NIST:gLogScalingAsDefault 
    1320         CheckBox PrefChec_1b,pos={21,120},size={163,14},proc=DRKProtocolPref,title="Allow DRK correction in protocols" 
    1321         CheckBox PrefChec_1b,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."} 
    1322         CheckBox PrefChec_1b,value= root:Packages:NIST:gAllowDRK 
    1323         CheckBox PrefChec_1c,pos={21,140},size={137,14},proc=UnityTransPref,title="Check for Transmission = 1" 
    1324         CheckBox PrefChec_1c,help={"Checking this will check for SAM or EMP Trans = 1 during data correction"} 
    1325         CheckBox PrefChec_1c,value= root:Packages:NIST:gDoTransCheck 
    1326         SetVariable PrefSetV_1d,pos={21,170},size={200,15},title="Averaging Bin Width (pixels)" 
    1327         SetVariable PrefSetV_1d,limits={1,100,1},value= root:Packages:NIST:gBinWidth 
    1328         SetVariable PrefSetV_1e,pos={21,195},size={200,15},title="# Phi Steps (annular avg)" 
    1329         SetVariable PrefSetV_1e,limits={1,360,1},value= root:Packages:NIST:gNPhiSteps 
    1330         CheckBox PrefChec_1f title="Do Transmssion Correction?",size={140,14},value=1 
    1331         CheckBox PrefChec_1f pos={255,100},help={"TURN OFF ONLY FOR DEBUGGING. This corrects the data for angle dependent transmssion."} 
    1332         CheckBox PrefChec_1g title="Do Efficiency Correction?",size={140,14} 
    1333         CheckBox PrefChec_1g value=1,pos={255,120},help={"TURN OFF ONLY FOR DEBUGGING. This corrects the data for angle dependent detector efficiency."} 
    1334  
    1335  
    1336         CheckBox PrefChec_1a,disable=1 
    1337         CheckBox PrefChec_1b,disable=1 
    1338         CheckBox PrefChec_1c,disable=1 
    1339         SetVariable PrefSetV_1d,disable=1 
    1340         SetVariable PrefSetV_1e,disable=1 
    1341         CheckBox PrefChec_1f,disable=1 
    1342         CheckBox PrefChec_1g,disable=1 
     1317        CheckBox PrefCtrl_1a,pos={21,100},size={171,14},proc=LogScalePrefCheck,title="Use Log scaling for 2D data display" 
     1318        CheckBox PrefCtrl_1a,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."} 
     1319        CheckBox PrefCtrl_1a,value= root:Packages:NIST:gLogScalingAsDefault 
     1320        CheckBox PrefCtrl_1b,pos={21,120},size={163,14},proc=DRKProtocolPref,title="Allow DRK correction in protocols" 
     1321        CheckBox PrefCtrl_1b,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."} 
     1322        CheckBox PrefCtrl_1b,value= root:Packages:NIST:gAllowDRK 
     1323        CheckBox PrefCtrl_1c,pos={21,140},size={137,14},proc=UnityTransPref,title="Check for Transmission = 1" 
     1324        CheckBox PrefCtrl_1c,help={"Checking this will check for SAM or EMP Trans = 1 during data correction"} 
     1325        CheckBox PrefCtrl_1c,value= root:Packages:NIST:gDoTransCheck 
     1326        SetVariable PrefCtrl_1d,pos={21,170},size={200,15},title="Averaging Bin Width (pixels)" 
     1327        SetVariable PrefCtrl_1d,limits={1,100,1},value= root:Packages:NIST:gBinWidth 
     1328        SetVariable PrefCtrl_1e,pos={21,195},size={200,15},title="# Phi Steps (annular avg)" 
     1329        SetVariable PrefCtrl_1e,limits={1,360,1},value= root:Packages:NIST:gNPhiSteps 
     1330        CheckBox PrefCtrl_1f title="Do Transmssion Correction?",size={140,14},value=1 
     1331        CheckBox PrefCtrl_1f pos={255,100},help={"TURN OFF ONLY FOR DEBUGGING. This corrects the data for angle dependent transmssion."} 
     1332        CheckBox PrefCtrl_1g title="Do Efficiency Correction?",size={140,14} 
     1333        CheckBox PrefCtrl_1g value=1,pos={255,120},help={"TURN OFF ONLY FOR DEBUGGING. This corrects the data for angle dependent detector efficiency."} 
     1334 
     1335 
     1336        CheckBox PrefCtrl_1a,disable=1 
     1337        CheckBox PrefCtrl_1b,disable=1 
     1338        CheckBox PrefCtrl_1c,disable=1 
     1339        SetVariable PrefCtrl_1d,disable=1 
     1340        SetVariable PrefCtrl_1e,disable=1 
     1341        CheckBox PrefCtrl_1f,disable=1 
     1342        CheckBox PrefCtrl_1g,disable=1 
    13431343 
    13441344//on tab(2) - USANS 
    1345         GroupBox PrefGrou_2a pos={21,100},size={1,1},title="nothing to set",fSize=12 
    1346  
    1347         GroupBox PrefGrou_2a,disable=1 
     1345        GroupBox PrefCtrl_2a pos={21,100},size={1,1},title="nothing to set",fSize=12 
     1346 
     1347        GroupBox PrefCtrl_2a,disable=1 
    13481348 
    13491349 
    13501350//on tab(3) - Analysis 
    1351         GroupBox PrefGrou_3a pos={21,100},size={1,1},title="nothing to set",fSize=12 
    1352          
    1353         GroupBox PrefGrou_3a,disable=1 
     1351        GroupBox PrefCtrl_3a pos={21,100},size={1,1},title="nothing to set",fSize=12 
     1352         
     1353        GroupBox PrefCtrl_3a,disable=1 
    13541354 
    13551355EndMacro 
     
    13701370        Variable num = ItemsinList(ctrlList,";"),ii,onTab 
    13711371        for(ii=0;ii<num;ii+=1) 
    1372                 //items all start w/"PrefCtrl_" 
     1372                //items all start w/"PrefCtrl_", 9 characters 
    13731373                item=StringFromList(ii, ctrlList ,";") 
    1374                 nameStr=item[0,10] 
    1375                 strswitch(item[0,7])     
    1376                         case "PrefChec":                 
    1377                                 onTab = str2num(item[9]) 
    1378                                 CheckBox $item,disable=(tab!=onTab) 
    1379                                 break                                           // exit from switch 
    1380                         case "PrefSetV":                 
    1381                                 onTab = str2num(item[9]) 
    1382                                 SetVariable $item,disable=(tab!=onTab) 
    1383                                 break 
    1384                         case "PrefGrou":                 
    1385                                 onTab = str2num(item[9]) 
    1386                                 GroupBox $item,disable=(tab!=onTab) 
    1387                                 break 
    1388                         default: 
    1389                                         //do nothing for no match 
    1390                 endswitch 
    1391          
     1374                nameStr=item[0,8] 
     1375                if(cmpstr(nameStr,"PrefCtrl_")==0) 
     1376                        onTab = str2num(item[9])                        //[9] is a number 
     1377                        ControlInfo $item 
     1378                        switch(abs(V_flag))      
     1379                                case 1: 
     1380                                        Button $item,disable=(tab!=onTab) 
     1381                                        break 
     1382                                case 2:  
     1383                                        CheckBox $item,disable=(tab!=onTab) 
     1384                                        break 
     1385                                case 5:  
     1386                                        SetVariable $item,disable=(tab!=onTab) 
     1387                                        break 
     1388                                case 10:         
     1389                                        TitleBox $item,disable=(tab!=onTab) 
     1390                                        break 
     1391                                case 4: 
     1392                                        ValDisplay $item,disable=(tab!=onTab) 
     1393                                        break 
     1394                                case 9: 
     1395                                        GroupBox $item,disable=(tab!=onTab) 
     1396                                        break 
     1397                                // add more items to the switch if different control types are used 
     1398                        endswitch 
     1399                endif 
    13921400        endfor  
    1393 End 
    1394  
     1401        return(0) 
     1402End 
     1403 
Note: See TracChangeset for help on using the changeset viewer.