Changeset 167


Ignore:
Timestamp:
Sep 21, 2007 3:18:47 PM (15 years ago)
Author:
srkline
Message:

Changed NSORT to display rescaling and overlap constants behind the OS file save dialog, allowing the user to cancel the save it something is amiss.

No significant change in trans=1 panel behavior in Correct.ipf

Cosmetic changes to RawWindowHook? (drawing order) to look nicer w/OS native panels.

Location:
sans/SANSReduction/trunk/Put in User Procedures/SANS_Reduction_v5.00
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sans/SANSReduction/trunk/Put in User Procedures/SANS_Reduction_v5.00/Correct.ipf

    r116 r167  
    958958        endif 
    959959        //get input from the user 
    960         NewDataFolder/O root:tmp_trans 
    961         Variable/G root:tmp_trans:inputTrans=0.9 
    962         Variable/G root:tmp_trans:returnCode=0 
     960        NewDataFolder/O root:myGlobals:tmp_trans 
     961        Variable/G root:myGlobals:tmp_trans:inputTrans=0.9 
     962        Variable/G root:myGlobals:tmp_trans:returnCode=0 
    963963        DoTransInput(type) 
    964         NVAR inputTrans=root:tmp_trans:inputTrans 
    965         NVAR code=root:tmp_trans:returnCode 
     964        NVAR inputTrans=root:myGlobals:tmp_trans:inputTrans 
     965        NVAR code=root:myGlobals:tmp_trans:returnCode 
    966966        newTrans=inputTrans             //keep a copy before deleting everything 
    967967        newCode=code 
     
    970970        Endif 
    971971//      printf "You entered %g and the code is %g\r",newTrans,newCode 
    972         KillDataFolder root:tmp_trans 
     972//      KillDataFolder root:tmp_trans 
    973973         
    974974        if(newCode==1) 
     
    987987         
    988988//      Print "ignore now" 
    989         NVAR val=root:tmp_trans:returnCode 
     989        NVAR val=root:myGlobals:tmp_trans:returnCode 
    990990        val=0           //code for ignore once 
    991991         
     
    10021002        DrawText 15,125,"(Reset this in Preferences)" 
    10031003        SetVariable setvar0,pos={20,170},size={160,17},limits={0,1,0.01} 
    1004         SetVariable setvar0,value= root:tmp_trans:inputTrans,title="New Transmission" 
     1004        SetVariable setvar0,value= root:myGlobals:tmp_trans:inputTrans,title="New Transmission" 
    10051005 
    10061006        Button button0,pos={36,56},size={120,20},proc=IgnoreNowButton,title="Ignore This Time" 
     
    10151015 
    10161016//      Print "ignore always" 
    1017         NVAR val=root:tmp_trans:returnCode 
     1017        NVAR val=root:myGlobals:tmp_trans:returnCode 
    10181018        val=1           //code for ignore always 
    10191019        DoWindow/K tmp_GetInputPanel            // Kill self 
     
    10241024 
    10251025//      Print "use new Value" 
    1026         NVAR val=root:tmp_trans:returnCode 
     1026        NVAR val=root:myGlobals:tmp_trans:returnCode 
    10271027        val=2           //code for use new Value 
    10281028        DoWindow/K tmp_GetInputPanel            // Kill self 
     
    10331033 
    10341034//      Print "Abort" 
    1035         NVAR val=root:tmp_trans:returnCode 
     1035        NVAR val=root:myGlobals:tmp_trans:returnCode 
    10361036        val=4           //code for abort 
    10371037        DoWindow/K tmp_GetInputPanel            // Kill self 
  • sans/SANSReduction/trunk/Put in User Procedures/SANS_Reduction_v5.00/NSORT.ipf

    r143 r167  
    767767        PopupMenu popup_3,mode=1,value= #"root:myGlobals:NSORT:gDataPopList_3" 
    768768        PopupMenu popup_3,help={"Choose the dataset with the highest overall q-value (shortest detector distance), or NONE if no third set desired"} 
    769         CheckBox AutoCheck,pos={14,310},size={100,20},title="Auto Scale",value=1 
     769        CheckBox AutoCheck,pos={14,310},size={100,20},title="Auto Scale",value=0 
    770770        CheckBox AutoCheck,help={"If checked, the scale factor will be automatically determined, if not checked, the current values in the fields will be used"} 
    771771EndMacro 
     
    831831        While(0) 
    832832        ControlUpdate/A/W=NSORT_Panel 
     833                DoUpdate 
    833834                 
    834835End 
     
    10501051                Sort q12, q12,i12,sig12 
    10511052                //at this point 1-2 are combined 
     1053                 
     1054                ControlUpdate/A/W=NSORT_Panel 
     1055                DoUpdate 
     1056                 
    10521057                //do we need to continue, or write out the set here and stop? 
    10531058                if(cmpstr(name3,"none") == 0) 
     
    11181123                Endif 
    11191124                 
     1125                ControlUpdate/A/W=NSORT_Panel 
     1126                DoUpdate 
     1127 
    11201128                //Print "NSORT-ed ",name1," + ", name2, " + ", name3 
    11211129                //Print "normalized to ",normTo 
     
    12171225                //Print "normalized to ",normTo 
    12181226                //Print "multiplicative factor = ",norm12 
    1219                  
     1227                ControlUpdate/A/W=NSORT_Panel 
     1228                DoUpdate 
     1229 
    12201230                 
    12211231                //Make the combined, scaled dataset by overwriting the old sets 
     
    13161326                //Print "normalized to ",normTo 
    13171327                //Print "multiplicative factor 1-2 = ",norm12," multiplicative factor 12 - 3 = ",norm23 
    1318                  
     1328                ControlUpdate/A/W=NSORT_Panel 
     1329                DoUpdate 
    13191330                 
    13201331                Make/O/N=(n123) q123,i123,sig123,sq123,qb123,fs123 
  • sans/SANSReduction/trunk/Put in User Procedures/SANS_Reduction_v5.00/RawWindowHook.ipf

    r116 r167  
    6161                SetWindow SANS_Data,hook=RawWindowHook,hookevents=2 
    6262                ControlBar 100 
    63                 Button doAve,pos={290,23},size={50,20},proc=ShowAvgPanel_SANSData,title="I vs. Q" 
    64                 Button doAve,help={"This will circularly average the data to I vs. Q"} 
     63 
    6564                SetVariable xpos,pos={7,5},size={50,17},title="X" 
    6665                SetVariable xpos,limits={-Inf,Inf,0},value= root:myGlobals:gXPos 
     
    9493                Button maskButton size={84,20}, pos={170,53}, proc=maskButtonProc,title="Show Mask" 
    9594                Button maskButton help={"If a mask has been loaded this will overlay it on the current plot"} 
     95                 
     96                GroupBox slideGrp,pos={268,46},size={124,48},title="Color Map" 
     97                //draw after the group box so these are on "top" of the group box 
     98                Button doAve,pos={290,23},size={50,20},proc=ShowAvgPanel_SANSData,title="I vs. Q" 
     99                Button doAve,help={"This will circularly average the data to I vs. Q"} 
    96100                Slider loSlide,pos={280,77},size={100,16},proc=MapSliderProc 
    97101                Slider loSlide,limits={0,1,0.01},value= 0,vert= 0,ticks= 0 
     
    100104                Slider hiSlide,limits={0,1,0.01},value= 1,vert= 0,ticks= 0 
    101105                Slider hiSlide,help={"Adjust the high threshold of the color map"} 
    102                 GroupBox slideGrp,pos={268,46},size={124,51},title="Color Map" 
     106 
    103107        endif 
    104108         
Note: See TracChangeset for help on using the changeset viewer.