Changeset 814


Ignore:
Timestamp:
Jul 7, 2011 12:02:44 PM (11 years ago)
Author:
srkline
Message:

Made the preferences for detector corrections permanent within an experiment. previously they remained only as long as the preferences panel was open, then reverting back to the default values.

File:
1 edited

Legend:

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

    r801 r814  
    12181218        DoWindow/F Pref_Panel 
    12191219        if(V_flag==0) 
    1220                 Initialize_Preferences() 
     1220                // only re-initialize if the variables don't exist, so you don't overwrite what users have changed 
     1221                if( exists("root:Packages:NIST:gXML_Write") != 2 )              //if the global variable does not exist, initialize 
     1222                        Initialize_Preferences() 
     1223                endif 
    12211224                Pref_Panel() 
    12221225        Endif 
     
    13001303         
    13011304        NVAR gVal = root:Packages:NIST:gXML_Write 
     1305        gVal = checked 
     1306End 
     1307 
     1308Function DoTransCorrPref(ctrlName,checked) : CheckBoxControl 
     1309        String ctrlName 
     1310        Variable checked 
     1311         
     1312        NVAR gVal = root:Packages:NIST:gDoTransmissionCorr 
     1313        gVal = checked 
     1314End 
     1315 
     1316Function DoEfficiencyCorrPref(ctrlName,checked) : CheckBoxControl 
     1317        String ctrlName 
     1318        Variable checked 
     1319         
     1320        NVAR gVal = root:Packages:NIST:gDoDetectorEffCorr 
    13021321        gVal = checked 
    13031322End 
     
    13441363        SetVariable PrefCtrl_1e,pos={21,195},size={200,15},title="# Phi Steps (annular avg)" 
    13451364        SetVariable PrefCtrl_1e,limits={1,360,1},value= root:Packages:NIST:gNPhiSteps 
    1346         CheckBox PrefCtrl_1f title="Do Transmssion Correction?",size={140,14},value=1 
     1365        CheckBox PrefCtrl_1f title="Do Transmssion Correction?",size={140,14},value=root:Packages:NIST:gDoTransmissionCorr,proc=DoTransCorrPref 
    13471366        CheckBox PrefCtrl_1f pos={255,100},help={"TURN OFF ONLY FOR DEBUGGING. This corrects the data for angle dependent transmssion."} 
    1348         CheckBox PrefCtrl_1g title="Do Efficiency Correction?",size={140,14} 
    1349         CheckBox PrefCtrl_1g value=1,pos={255,120},help={"TURN OFF ONLY FOR DEBUGGING. This corrects the data for angle dependent detector efficiency."} 
     1367        CheckBox PrefCtrl_1g title="Do Efficiency Correction?",size={140,14},proc=DoEfficiencyCorrPref 
     1368        CheckBox PrefCtrl_1g value=root:Packages:NIST:gDoDetectorEffCorr,pos={255,120},help={"TURN OFF ONLY FOR DEBUGGING. This corrects the data for angle dependent detector efficiency."} 
    13501369 
    13511370 
Note: See TracChangeset for help on using the changeset viewer.