Ignore:
Timestamp:
Oct 3, 2012 3:38:23 PM (10 years ago)
Author:
srkline
Message:

more tweaks to the polarization correction. Adjusting control positions on the panels, makeing sure that reverting the fundamental cell parameters really does just that, adding buttons to export/import protocols from the PolCor? panel.

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_FlipperPanel.ipf

    r864 r865  
    11241124        WAVE err_mu=root:Packages:NIST:Polarization:Cells:err_mu 
    11251125         
    1126         Open/P=home refnum as fname             // creates a new file, or overwrites the existing file   
     1126        Open/P=home refnum      //as fname              // creates a new file, or overwrites the existing file   
    11271127        fprintf refNum,"IGOR\r" 
    11281128         
     
    11841184//      print listStr 
    11851185 
    1186         Open/P=home refnum as fname             // creates a new file, or overwrites the existing file   
     1186        Open/P=home refnum      // as fname             // creates a new file, or overwrites the existing file   
    11871187        fprintf refNum,"IGOR\r" 
    11881188                         
     
    12891289//      print listStr 
    12901290 
    1291         Open/P=home refnum as fname             // creates a new file, or overwrites the existing file   
     1291        Open/P=home refnum      // as fname             // creates a new file, or overwrites the existing file   
    12921292        fprintf refNum,"IGOR\r" 
    12931293                         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_PolarizationCorrection.ipf

    r864 r865  
    151151//      print listStr 
    152152 
    153         Open/P=home refnum as fname             // creates a new file, or overwrites the existing file   
     153        Open/P=home refnum// as fname           // creates a new file, or overwrites the existing file   
    154154        fprintf refNum,"IGOR\r" 
    155155                         
     
    356356        Button button13,pos={440,446},size={120,20},proc=ClearPolCorEntries,title="Clear Entries" 
    357357 
    358         PopupMenu popup1,pos={210,24},size={102,20},title="Condition" 
     358        PopupMenu popup1,pos={210,20},size={102,20},title="Condition" 
    359359        PopupMenu popup1, mode=1,popvalue="none",value= #"P_GetConditionNameList()" 
    360360 
     
    376376        Button button9,help={"Reduce PolCor data"} 
    377377        Button button10,pos={226,690},size={120,20},proc=SavePolCorProtocolButton,title="Save Protocol" 
    378         Button button10,help={"Save the PolCor protocol"} 
     378        Button button10,help={"Save the PolCor protocol, within this experiment only"} 
    379379        Button button11,pos={370,690},size={120,20},proc=RecallPolCorProtocolButton,title="Recall Protocol" 
    380         Button button11,help={"Recall the PolCor protocol"}              
    381          
     380        Button button11,help={"Recall a PolCor protocol from memory"}            
     381        Button button14,pos={226,720},size={120,20},proc=ExportPolCorProtocolButton,title="Export Protocol" 
     382        Button button14,help={"Export the PolCor protocol, saving it on disk"} 
     383        Button button15,pos={370,720},size={120,20},proc=ImportPolCorProtocolButton,title="Import Protocol" 
     384        Button button15,help={"Import a PolCor protocol from a protocol previously saved to disk"} 
     385                 
    382386        SetVariable setvar0,pos={322,560},size={250,15},title="file:" 
    383387        SetVariable setvar0,help={"Filename of the detector sensitivity file to be used in the data reduction"} 
     
    16271631                        //update the data as log of the linear. more correct to use the default scaling 
    16281632                        // this is necessary for proper display of the data 
     1633                        SetDataFolder $("root:Packages:NIST:"+type)                     // this should be redundant, but I somehow eneded up in root: here??? 
     1634 
    16291635                        WAVE data_UU_pc = data_UU_pc 
    16301636                        WAVE data_DU_pc = data_DU_pc 
     
    23942400End 
    23952401 
     2402 
     2403Function ExportPolCorProtocolButton(ctrlName) : ButtonControl 
     2404        String ctrlName 
     2405         
     2406        ExportProtocol(ctrlName) 
     2407        return(0) 
     2408End 
     2409 
     2410 
     2411Function ImportPolCorProtocolButton(ctrlName) : ButtonControl 
     2412        String ctrlName 
     2413         
     2414        ImportProtocol(ctrlName) 
     2415        return(0) 
     2416End 
     2417 
    23962418// at a first pass, uses the regular reduction protocol         SaveProtocolButton(ctrlName) 
    23972419// 
     
    24512473//on output, w[] is filled with the protocol strings as needed from the panel  
    24522474// 
     2475// -- For polarized beam protocols, don't fill in EMP or BGD, as these are handled differently, since 4 XS 
     2476// 
    24532477Function MakePolProtocolFromPanel(w) 
    24542478        Wave/T w 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_PolarizationPanels.ipf

    r864 r865  
    159159 
    160160// 
    161 // add more cells here as they are defined 
     161// add more cells here as they are defined, 
     162// 
     163// first clear out the list, then rebuild it 
    162164// 
    163165Function InitPolarizationGlobals() 
     
    165167        SetDataFolder root:Packages:NIST:Polarization:Cells 
    166168         
     169        String listStr=StringList("gCell_*",";"),item 
     170        Variable        ii,num=ItemsInList(listStr,";") 
     171 
     172        for(ii=0;ii<num;ii+=1) 
     173                item = StringFromList(ii, listStr,";") 
     174                SVAR gStr = $item 
     175                KillStrings/Z gStr 
     176        endfor 
     177         
     178        //rebuild the list 
    167179        // cell constants 
    168180        String/G gCell_Maverick = "cell=Maverick,lambda=5.0,Te=0.87,err_Te=0.01,mu=3.184,err_mu=0.2," 
     
    275287//      ShowTools/A 
    276288        Button button_0,pos={10,10},size={90,20},proc=AddCellButtonProc,title="Add Cell" 
    277         Button button_1,pos={118,10},size={130,20},proc=SaveCellParButtonProc,title="Save Parameters" 
    278         Button button_2,pos={265,10},size={130,20},proc=RevertCellParButtonProc,title="Revert Parameters" 
    279         Button button_3,pos={420,10},size={35,20},proc=CellHelpParButtonProc,title="?" 
     289        Button button_1,pos={118,10},size={160,20},proc=SaveCellParButtonProc,title="Update Parameters" 
     290        Button button_2,pos={300,10},size={130,20},proc=RevertCellParButtonProc,title="Revert Parameters" 
     291        Button button_3,pos={520,10},size={35,20},proc=CellHelpParButtonProc,title="?" 
    280292 
    281293         
     
    451463         
    452464 
    453         Button button_1,pos={579,294},size={120,20},proc=CalcRowParamButton,title="Calc Sel Row" 
     465        Button button_1,pos={579,294},size={120,20},proc=CalcRowParamButton,title="Calculate Rows" 
    454466        Button button_2,pos={307,18},size={110,20},proc=ClearDecayWavesButton,title="Clear Table" 
    455467        Button button_3,pos={579,333},size={120,20},proc=ShowCalcRowButton,title="Show Calc" 
Note: See TracChangeset for help on using the changeset viewer.