Ignore:
Timestamp:
Jun 24, 2013 4:29:54 PM (10 years ago)
Author:
srkline
Message:

Changes to panels so that they fit on a low-resolution laptop screen (Nx768).

  • Auto Fit
  • Event Mode
  • All polarization panels

In addition, Functionality was added to the event mode processing to (better) handle large files. Files can be split and either added as slices (if oscillatory) or decimated (if stream). The "tweaking" of the data stream is also a little bit more automated now, using some intelligent locating of the time steps and an overlay of the derivative.

Corrected a few bugs in file handling on the polarization panels in cases where the user canceled out of a file dialog.

File:
1 edited

Legend:

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

    r867 r915  
    144144                DrawCellParamPanel() 
    145145        endif 
    146  
     146        // be sure that the panel is onscreen 
     147        DoIgorMenu "Control","Retrieve Window" 
    147148end 
    148149 
     
    282283         
    283284        PauseUpdate; Silent 1           // building window... 
    284         NewPanel /W=(775,44,1375,377)/N=CellParamPanel/K=1 as "Fundamental Cell Parameters" 
     285        NewPanel /W=(150,44,750,377)/N=CellParamPanel/K=1 as "Fundamental Cell Parameters" 
    285286        ModifyPanel cbRGB=(65535,49151,55704) 
    286287        ModifyPanel fixedSize=1 
     
    289290        Button button_0,pos={10,10},size={90,20},proc=AddCellButtonProc,title="Add Cell" 
    290291        Button button_1,pos={118,10},size={160,20},proc=SaveCellParButtonProc,title="Update Parameters" 
    291         Button button_2,pos={300,10},size={130,20},proc=RevertCellParButtonProc,title="Revert Parameters" 
     292        Button button_2,pos={118,35},size={130,20},proc=RevertCellParButtonProc,title="Revert Parameters" 
    292293        Button button_3,pos={520,10},size={35,20},proc=CellHelpParButtonProc,title="?" 
    293294 
    294          
    295         Edit/W=(14,55,582,318)/HOST=# 
     295        Button button_4,pos={324,10},size={100,20},proc=SaveCellPanelButton,title="Save State" 
     296        Button button_5,pos={324,35},size={100,20},proc=RestoreCellPanelButton,title="Restore State" 
     297         
     298        Edit/W=(14,60,582,318)/HOST=# 
    296299        ModifyTable width(Point)=0 
    297300        RenameWindow #,T0 
     
    306309        return(0) 
    307310End 
     311 
     312 
     313Function SaveCellPanelButton(ba) : ButtonControl 
     314        STRUCT WMButtonAction &ba 
     315 
     316        switch( ba.eventCode ) 
     317                case 2: // mouse up 
     318                        // click code here 
     319                        SaveCellParameterTable() 
     320                        break 
     321                case -1: // control being killed 
     322                        break 
     323        endswitch 
     324 
     325        return 0 
     326End 
     327 
     328Function RestoreCellPanelButton(ba) : ButtonControl 
     329        STRUCT WMButtonAction &ba 
     330 
     331        switch( ba.eventCode ) 
     332                case 2: // mouse up 
     333                        // click code here 
     334                        RestoreCellParameterTable() 
     335                        break 
     336                case -1: // control being killed 
     337                        break 
     338        endswitch 
     339 
     340        return 0 
     341End 
     342 
     343 
     344 
    308345 
    309346Function CellHelpParButtonProc(ba) : ButtonControl 
     
    415452                DecayParamPanel() 
    416453        endif 
     454        // be sure that the panel is onscreen 
     455        DoIgorMenu "Control","Retrieve Window" 
    417456end 
    418457 
     
    441480         
    442481        PauseUpdate; Silent 1           // building window... 
    443         NewPanel /W=(759,44,1572,713)/N=DecayPanel/K=1 as "Cell Decay Parameters" 
     482        NewPanel /W=(200,44,1013,664)/N=DecayPanel/K=1 as "Cell Decay Parameters" 
    444483        ModifyPanel cbRGB=(32768,54615,65535) 
    445484//      Button button_3,pos={505,16},size={35,20},proc=DecayHelpParButtonProc,title="?" 
    446         PopupMenu popup_0,pos={32,18},size={49,20},title="Cell",proc=DecayPanelPopMenuProc 
     485        PopupMenu popup_0,pos={32,8},size={49,20},title="Cell",proc=DecayPanelPopMenuProc 
    447486        PopupMenu popup_0,mode=1,value= #"D_CellNameList()" 
    448487         
    449         Button button_0,pos={584,365},size={70,20},proc=DecayFitButtonProc,title="Do Fit" 
    450          
    451         GroupBox group_0,pos={550,399},size={230,149},title="FIT RESULTS",fSize=10 
     488        Button button_0,pos={560,294},size={70,20},proc=DecayFitButtonProc,title="Do Fit" 
     489         
     490        GroupBox group_0,pos={560,329},size={230,149},title="FIT RESULTS",fSize=10 
    452491        GroupBox group_0,fStyle=1 
    453         SetVariable setvar_0,pos={560,428},size={200,13},title="muPo of 3He" 
     492        SetVariable setvar_0,pos={570,358},size={200,13},title="muPo of 3He" 
    454493        SetVariable setvar_0,fStyle=1,limits={0,0,0},barmisc={0,1000} 
    455494        SetVariable setvar_0,value= root:Packages:NIST:Polarization:Cells:gMuPo 
    456         SetVariable setvar_1,pos={560,460},size={200,13},title="Po of 3He" 
     495        SetVariable setvar_1,pos={570,390},size={200,13},title="Po of 3He" 
    457496        SetVariable setvar_1,fStyle=1,limits={0,0,0},barmisc={0,1000} 
    458497        SetVariable setvar_1,value= root:Packages:NIST:Polarization:Cells:gPo 
    459         SetVariable setvar_2,pos={560,518},size={200,13},title="Gamma (h)",fStyle=1 
     498        SetVariable setvar_2,pos={570,448},size={200,13},title="Gamma (h)",fStyle=1 
    460499        SetVariable setvar_2,limits={0,0,0},barmisc={0,1000} 
    461500        SetVariable setvar_2,value= root:Packages:NIST:Polarization:Cells:gGamma 
    462         SetVariable setvar_3,pos={560,488},size={200,15},title="T0",fStyle=1 
     501        SetVariable setvar_3,pos={570,418},size={200,13},title="T0",fStyle=1 
    463502        SetVariable setvar_3,limits={0,0,0},value= root:Packages:NIST:Polarization:Cells:gT0 
    464503         
    465504 
    466         Button button_1,pos={579,294},size={120,20},proc=CalcRowParamButton,title="Calculate Rows" 
    467         Button button_2,pos={307,18},size={110,20},proc=ClearDecayWavesButton,title="Clear Table" 
    468         Button button_3,pos={579,333},size={120,20},proc=ShowCalcRowButton,title="Show Calc" 
    469         Button button_4,pos={440,18},size={110,20},proc=ClearDecayWavesRowButton,title="Clear Row" 
    470         Button button_5,pos={620,18},size={40,20},proc=DecayHelpParButtonProc,title="?" 
    471         Button button_6,pos={620,620},size={100,20},proc=WindowSnapshotButton,title="Snapshot" 
    472         Button button_7,pos={620,580},size={130,20},proc=ManualEnterDecayButton,title="Manual Entry" 
    473         CheckBox check0,mode=0,pos={600,550},title="Overrride T0?",value=0 
     505        Button button_1,pos={560,262},size={120,20},proc=CalcRowParamButton,title="Calculate Rows" 
     506        Button button_2,pos={307,8},size={110,20},proc=ClearDecayWavesButton,title="Clear Table" 
     507        Button button_3,pos={560,519},size={110,20},proc=ShowCalcRowButton,title="Show Calc" 
     508        Button button_4,pos={440,8},size={110,20},proc=ClearDecayWavesRowButton,title="Clear Row" 
     509        Button button_5,pos={620,8},size={40,20},proc=DecayHelpParButtonProc,title="?" 
     510        Button button_6,pos={560,574},size={110,20},proc=WindowSnapshotButton,title="Snapshot" 
     511        Button button_7,pos={560,547},size={110,20},proc=ManualEnterDecayButton,title="Manual Entry" 
     512        Button button_8,pos={690,547},size={110,20},proc=SaveDecayPanelButton,title="Save State" 
     513        Button button_9,pos={690,574},size={110,20},proc=RestoreDecayPanelButton,title="Restore State" 
     514        CheckBox check0,mode=0,pos={560,480},title="Overrride T0?",value=0 
    474515 
    475516 
    476517        // table 
    477         Edit/W=(14,55,794,275)/HOST=#  
     518        Edit/W=(14,35,794,240)/HOST=#  
    478519        ModifyTable format=1,width=0 
    479520        RenameWindow #,T0 
     
    481522         
    482523        // graph 
    483         Display/W=(15,291,540,652)/HOST=#  //root:yy vs root:xx 
     524        Display/W=(15,250,540,610)/HOST=#  //root:yy vs root:xx 
    484525        ModifyGraph frameStyle=2 
    485526        ModifyGraph mode=4 
     
    14221463End 
    14231464 
     1465Function SaveDecayPanelButton(ba) : ButtonControl 
     1466        STRUCT WMButtonAction &ba 
     1467 
     1468        switch( ba.eventCode ) 
     1469                case 2: // mouse up 
     1470                        // click code here 
     1471                        SaveCellDecayTable() 
     1472                        break 
     1473                case -1: // control being killed 
     1474                        break 
     1475        endswitch 
     1476 
     1477        return 0 
     1478End 
     1479 
     1480Function RestoreDecayPanelButton(ba) : ButtonControl 
     1481        STRUCT WMButtonAction &ba 
     1482 
     1483        switch( ba.eventCode ) 
     1484                case 2: // mouse up 
     1485                        // click code here 
     1486                        RestoreCellDecayTable() 
     1487                        break 
     1488                case -1: // control being killed 
     1489                        break 
     1490        endswitch 
     1491 
     1492        return 0 
     1493End 
     1494 
    14241495// null condition is not right. if the loop fails, then the  
    14251496// retStr will be ";;;;", not zero length. What's the proper test? 
Note: See TracChangeset for help on using the changeset viewer.