Ignore:
Timestamp:
Dec 3, 2009 7:18:51 PM (13 years ago)
Author:
srkline
Message:

Data Handling: now puts cursors on data1 isf nullSolvent is selected, and handles error if no data selected for set 2 and data 1 is plotted.

ProDiv?: added utlity to divide two DIV files for comparison.

Simple changes to other files to convert window definitions to Procs

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MainPanel.ipf

    r607 r609  
    307307//      Button MainButton_2e,pos={120,90},size={90,20},proc=Subtract1D_MainButtonProc,title="Subtract 1D" 
    308308//      Button MainButton_2e,help={"Shows panel for subtracting two 1-D data sets"} 
    309         Button MainButton_2e,pos={120,90},size={90,20},proc=Arithmetic1D_MainButtonProc,title="1D Arithmetic" 
     309        Button MainButton_2e,pos={120,90},size={110,20},proc=Arithmetic1D_MainButtonProc,title="1D Arithmetic" 
    310310        Button MainButton_2e,help={"Shows panel for doing arithmetic on 1D data sets"} 
    311311        Button MainButton_2a,disable=1 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Marquee.ipf

    r570 r609  
    294294                DoAlert 0,"This operation is not available in the Demo version of IGOR" 
    295295        else 
    296                 DoIGORMenu "File","Save Graphics" 
     296                DoAlert 1,"Do you want the controls too?" 
     297                if(V_flag==1) 
     298                        GetMarquee/K/Z 
     299                        SavePICT /E=-5/SNAP=1 
     300                else 
     301                        DoIGORMenu "File","Save Graphics" 
     302                endif 
    297303        endif 
    298304End 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MultScatter_MonteCarlo_2D.ipf

    r605 r609  
    895895// as a stand-alone panel, extra control bar  (right) and subwindow implementations don't work right  
    896896// for various reasons... 
    897 Window MC_SASCALC() : Panel 
     897Proc MC_SASCALC() 
    898898 
    899899        // when opening the panel, set the raw counts check to 1 
     
    902902        PauseUpdate; Silent 1           // building window... 
    903903        NewPanel /W=(92,556,713,818)/K=1 as "SANS Simulator" 
     904        DoWindow/C MC_SASCALC 
     905         
    904906        SetVariable MC_setvar0,pos={28,73},size={144,15},bodyWidth=80,title="# of neutrons" 
    905907        SetVariable MC_setvar0,format="%5.4g" 
     
    13741376 
    13751377 
    1376 Window Sim_1D_Panel() : Panel 
     1378Proc Sim_1D_Panel() 
    13771379        PauseUpdate; Silent 1           // building window... 
    13781380        NewPanel /W=(92,556,713,818)/K=1 as "1D SANS Simulator" 
     1381        DoWindow/C Sim_1D_Panel 
     1382         
    13791383        SetVariable cntVar,pos={26,68},size={160,15},title="Counting time(s)",format="%d" 
    13801384        SetVariable cntVar,limits={1,36000,10},value= root:Packages:NIST:SAS:gCntTime 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ProDiv.ipf

    r588 r609  
    405405//¥SetVariable setvar0 labelBack=(65535,65535,65535) 
    406406// for each variable will give a white background to the label text 
    407 Window DIV_Panel() : Panel 
     407Proc DIV_Panel() 
    408408        PauseUpdate; Silent 1           // building window... 
    409409        NewPanel /W=(594,44,932,570)/K=1 as "DIV_Panel" 
     410        DoWindow/C DIV_Panel 
    410411//      ModifyPanel cbRGB=(35867,28177,65535)           //purple 
    411412//      ModifyPanel cbRGB=(1,16019,65535)                               //electric blue 
     
    426427//      SetVariable setvar003,value= root:myGlobals:Protocols:gPlexName 
    427428        Button ShowBox,pos={226,325},size={90,20},proc=ShowBoxButtonProc,title="Show Box" 
    428         Button button1,pos={25,441},size={150,20},proc=GenerateDIVButtonProc,title="Generate DIV File" 
    429         Button button2,pos={25,481},size={150,20},proc=ReloadDIVButtonProc,title="Load DIV File" 
     429        Button button1,pos={25,430},size={150,20},proc=GenerateDIVButtonProc,title="Generate DIV File" 
     430        Button button2,pos={25,460},size={150,20},proc=ReloadDIVButtonProc,title="Load DIV File" 
    430431        Button button4,pos={240,481},size={80,20},proc=DoneDIVButtonProc,title="Done" 
    431432        Button button3,pos={240,10},size={50,20},proc=DIVHelpButtonProc,title="Help" 
     433        Button button5,pos={25,490},size={150,20},proc=CompareDIVButtonProc,title="Compare DIV Files" 
    432434        SetVariable setvar00201,pos={84,297},size={50,15},limits={0,root:myGlobals:gNPixelsY-1,1},title=" ",value= root:myGlobals:Protocols:gPlexY2 
    433435        SetVariable setvar00202,pos={15,350},size={50,15},limits={0,root:myGlobals:gNPixelsX-1,1},title=" ",value= root:myGlobals:Protocols:gPlexX1 
     
    486488        return 0 
    487489End 
     490 
     491// load in two DIV files, divide them, and display the results 
     492// first is divided by the second, results are in SUB 
     493// 
     494Function CompareDIVButtonProc(ba) : ButtonControl 
     495        STRUCT WMButtonAction &ba 
     496 
     497        switch( ba.eventCode ) 
     498                case 2: // mouse up 
     499                        // click code here 
     500                        DoAlert 0,"First DIV / Second DIV = Result in SUB folder" 
     501                         
     502                        Execute "ReadWork_DIV()" 
     503                        Execute "CopyWorkContents(\"DIV\",\"STO\")"             // converts linear, copies data, kills linear_data 
     504                        Execute "CopyWorkContents(\"DIV\",\"SUB\")"             ///just to have waves for later 
     505 
     506                        Execute "ReadWork_DIV()" 
     507                        Execute "CopyWorkContents(\"DIV\",\"DRK\")"             //then data in DRK is guaranteed linear 
     508 
     509                        WAVE sub_d = root:Packages:NIST:SUB:data 
     510                        WAVE sto_d = root:Packages:NIST:STO:data 
     511                        WAVE drk_d = root:Packages:NIST:DRK:data 
     512                         
     513                        sub_d = sto_d/drk_d 
     514 
     515//                      WaveStats root:Packages:NIST:DIV:data 
     516//                      Print "*"                        
     517                        Execute "ChangeDisplay(\"SUB\")"         
     518                        break 
     519        endswitch 
     520 
     521        return 0 
     522End 
     523Function CompareDIV() 
     524 
     525        STRUCT WMButtonAction ba 
     526 
     527        ba.eventCode=2 
     528        CompareDIVButtonProc(ba)  
     529        return(0) 
     530End 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/TISANE.ipf

    r572 r609  
    4949End 
    5050 
    51 Window TISANE() : Panel 
     51Proc TISANE() 
    5252        PauseUpdate; Silent 1           // building window... 
    5353        NewPanel/K=1 /W=(100,50,600,680)/N=TISANE 
     54        DoWindow/C TISANE 
    5455        ModifyPanel fixedSize=1,noEdit =1 
    5556        //ShowTools/A 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/WorkFileUtils.ipf

    r605 r609  
    491491                        xy = xx[ii]*yy[jj] 
    492492                        data[ii][jj] *= xy*ratio 
    493 //                      solidAngle[ii][jj] = xy*ratio           //testing only   
     493                        solidAngle[ii][jj] = xy*ratio           //testing only   
    494494 
    495495                         
     
    524524                                         
    525525                                data[ii][jj] /= LargeAngleTransmissionCorr(trans,dtdist,xd,yd)          //moved from 1D avg SRK 11/2007 
    526 //                              solidAngle[ii][jj] /= LargeAngleTransmissionCorr(trans,dtdist,xd,yd)            //testing only 
     526                                //solidAngle[ii][jj] = LargeAngleTransmissionCorr(trans,dtdist,xd,yd)           //testing only 
    527527                        endif 
    528528                         
     
    10131013        Duplicate/O $(destPath + ":integersread"),$("root:Packages:NIST:"+newtype+":integersread") 
    10141014        Duplicate/O $(destPath + ":realsread"),$("root:Packages:NIST:"+newtype+":realsread") 
     1015        // 
     1016        // be sure to get rid of the linear_data if it exists in the destination folder 
     1017        KillWaves/Z $("root:Packages:NIST:"+newtype+":linear_data") 
    10151018        //need to save a copy of filelist string too (from the current type folder) 
    10161019        SVAR oldFileList = $(destPath + ":fileList") 
Note: See TracChangeset for help on using the changeset viewer.