Changeset 1213


Ignore:
Timestamp:
Sep 20, 2019 6:06:13 PM (3 years ago)
Author:
krzywon
Message:

Add elliptical averaging into protocol panel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/branches/elliptical_averaging/NCNR_User_Procedures/Reduction/SANS/ProtocolAsPanel.ipf

    r1171 r1213  
    969969        String av_typ,autoSave,AutoName,autoPlot,side 
    970970        Variable phi=0,dphi=10,width=10,Qctr = 0.01,qDelta=10 
    971         Prompt av_typ, "Type of Average",popup,"Circular;Sector;Rectangular;Annular;2D_NXcanSAS;2D_ASCII;QxQy_ASCII;PNG_Graphic;Sector_PlusMinus;" 
     971        Prompt av_typ, "Type of Average",popup,"Circular;Sector;Rectangular;Annular;Elliptical;2D_NXcanSAS;2D_ASCII;QxQy_ASCII;PNG_Graphic;Sector_PlusMinus;" 
    972972// comment out above line in DEMO_MODIFIED version, and uncomment the line below (to disable PNG save) 
    973973//      Prompt av_typ, "Type of Average",popup,"Circular;Sector;Rectangular;Annular;2D_ASCII;QxQy_ASCII" 
     
    976976        Prompt autoPlot,"Plot the averaged Data?",popup,"Yes;No" 
    977977        Prompt side,"Include detector halves?",popup,"both;right;left" 
    978         Prompt phi,"Orientation Angle (-90,90) degrees (Rectangular or Sector)" 
     978        Prompt phi,"Orientation Angle (-90,90) degrees (Rectangular, Elliptical, or Sector)" 
    979979        Prompt dphi, "Azimuthal range (0,45) degrees (Sector only)" 
    980980        Prompt width, "Width of Rectangular average (1,128)" 
    981         Prompt Qctr, "q-value of center of annulus" 
     981        Prompt Qctr, "q-value of center of annulus -OR- Ratio of minor to major axes of ellipse" 
    982982        Prompt Qdelta,"Pixel width of annulus" 
    983983 
     
    10081008                root:myGlobals:Protocols:gAvgInfoStr += "QDELTA=" + num2str(QDelta) + ";" 
    10091009        Endif 
     1010         
     1011        if(cmpstr(av_typ,"Elliptical")==0) 
     1012                Execute "GetEllipticalAvgInfo()" 
     1013        Endif 
     1014End 
     1015 
     1016Proc GetEllipticalAvgInfo(phi,AxisRatio) 
     1017        Variable phi=0,AxisRatio=1 
     1018        Prompt phi,"Orientation Angle (-90,90) degrees (Rectangular, Elliptical, or Sector)" 
     1019        Prompt AxisRatio, "Ratio of minor to major axes of ellipse" 
     1020         
     1021        root:myGlobals:Protocols:gAvgInfoStr += "PHI=" + num2str(phi) + ";" 
     1022        root:myGlobals:Protocols:gAvgInfoStr += "RATIOAXES=" + num2str(AxisRatio) + ";" 
    10101023End 
    10111024 
     
    18461859                        break 
    18471860                case "Circular": 
    1848                         CircularAverageTo1D(activeType) 
    1849                         break 
    18501861                case "Sector": 
     1862                case "Elliptical": 
     1863                        //Circular, Sector, and Elliptical Averaging use Circular Averaging Routine 
    18511864                        CircularAverageTo1D(activeType) 
    18521865                        break 
Note: See TracChangeset for help on using the changeset viewer.