- Timestamp:
- Sep 24, 2019 11:16:36 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/branches/elliptical_averaging/NCNR_User_Procedures/Reduction/SANS/ProtocolAsPanel.ipf
r1213 r1214 966 966 // somewhat confusing and complex, but may be as good as it gets. 967 967 // 968 Proc GetAvgInfo(av_typ,autoSave,autoName,autoPlot,side,phi,dphi,width,QCtr,QDelta) 969 String av_typ,autoSave,AutoName,autoPlot,side 970 Variable phi=0,dphi=10,width=10,Qctr = 0.01,qDelta=10 971 Prompt av_typ, "Type of Average",popup,"Circular;Sector;Rectangular;Annular;Elliptical;2D_NXcanSAS;2D_ASCII;QxQy_ASCII;PNG_Graphic;Sector_PlusMinus;" 968 Proc GetAvgInfo(av_typ,autoSave,autoName,autoPlot) 969 String av_typ,autoSave,AutoName,autoPlot 970 Prompt av_typ, "Type of Average - A 2nd window will open for averaging specific parameters",popup,"Circular;Sector;Rectangular;Annular;Elliptical;2D_NXcanSAS;2D_ASCII;QxQy_ASCII;PNG_Graphic;Sector_PlusMinus;" 972 971 // comment out above line in DEMO_MODIFIED version, and uncomment the line below (to disable PNG save) 973 972 // Prompt av_typ, "Type of Average",popup,"Circular;Sector;Rectangular;Annular;2D_ASCII;QxQy_ASCII" … … 975 974 Prompt autoName,"Auto-Name files?",popup,"Auto;Manual" 976 975 Prompt autoPlot,"Plot the averaged Data?",popup,"Yes;No" 977 Prompt side,"Include detector halves?",popup,"both;right;left" 978 Prompt phi,"Orientation Angle (-90,90) degrees (Rectangular, Elliptical, or Sector)" 979 Prompt dphi, "Azimuthal range (0,45) degrees (Sector only)" 980 Prompt width, "Width of Rectangular average (1,128)" 981 Prompt Qctr, "q-value of center of annulus -OR- Ratio of minor to major axes of ellipse" 982 Prompt Qdelta,"Pixel width of annulus" 983 976 977 Print "TESTING" 984 978 //assign results of dialog to key=value string, semicolon separated 985 979 //do only what is necessary, based on av_typ … … 993 987 994 988 if(cmpstr(av_typ,"Sector")==0 || cmpstr(av_typ,"Sector_PlusMinus")==0) 995 root:myGlobals:Protocols:gAvgInfoStr += "SIDE=" + side + ";" 996 root:myGlobals:Protocols:gAvgInfoStr += "PHI=" + num2str(phi) + ";" 997 root:myGlobals:Protocols:gAvgInfoStr += "DPHI=" + num2str(dphi) + ";" 989 Execute "GetSectorAvgInfo()" 998 990 Endif 999 991 1000 992 if(cmpstr(av_typ,"Rectangular")==0) 1001 root:myGlobals:Protocols:gAvgInfoStr += "SIDE=" + side + ";" 1002 root:myGlobals:Protocols:gAvgInfoStr += "PHI=" + num2str(phi) + ";" 1003 root:myGlobals:Protocols:gAvgInfoStr += "WIDTH=" + num2str(width) + ";" 993 Execute "GetRectangularAvgInfo()" 1004 994 Endif 1005 995 1006 996 if(cmpstr(av_typ,"Annular")==0) 1007 root:myGlobals:Protocols:gAvgInfoStr += "QCENTER=" + num2str(QCtr) + ";" 1008 root:myGlobals:Protocols:gAvgInfoStr += "QDELTA=" + num2str(QDelta) + ";" 997 Execute "GetAnnularAvgInfo()" 1009 998 Endif 1010 999 … … 1012 1001 Execute "GetEllipticalAvgInfo()" 1013 1002 Endif 1003 End 1004 1005 Proc GetSectorAvgInfo(side,phi,width) 1006 String side 1007 Variable phi=0,dphi=10 1008 Prompt side,"Include detector halves?",popup,"both;right;left" 1009 Prompt phi,"Orientation Angle (-90,90) degrees (Rectangular, Elliptical, or Sector)" 1010 Prompt dphi, "Azimuthal range (0,45) degrees (Sector only)" 1011 1012 root:myGlobals:Protocols:gAvgInfoStr += "SIDE=" + side + ";" 1013 root:myGlobals:Protocols:gAvgInfoStr += "PHI=" + num2str(phi) + ";" 1014 root:myGlobals:Protocols:gAvgInfoStr += "DPHI=" + num2str(dphi) + ";" 1015 End 1016 1017 Proc GetRectangularAvgInfo(side,phi,width) 1018 String side 1019 Variable phi=0,width=10 1020 Prompt side,"Include detector halves?",popup,"both;right;left" 1021 Prompt phi,"Orientation Angle (-90,90) degrees (Rectangular, Elliptical, or Sector)" 1022 Prompt width, "Width of Rectangular average (1,128)" 1023 1024 root:myGlobals:Protocols:gAvgInfoStr += "SIDE=" + side + ";" 1025 root:myGlobals:Protocols:gAvgInfoStr += "PHI=" + num2str(phi) + ";" 1026 root:myGlobals:Protocols:gAvgInfoStr += "WIDTH=" + num2str(width) + ";" 1027 End 1028 1029 Proc GetAnnularAvgInfo(QCtr,QDelta) 1030 Variable QCtr=0.01,QDelta=10 1031 Prompt Qctr, "q-value of center of annulus -OR- Ratio of minor to major axes of ellipse" 1032 Prompt Qdelta,"Pixel width of annulus" 1033 1034 root:myGlobals:Protocols:gAvgInfoStr += "QCENTER=" + num2str(QCtr) + ";" 1035 root:myGlobals:Protocols:gAvgInfoStr += "QDELTA=" + num2str(QDelta) + ";" 1014 1036 End 1015 1037
Note: See TracChangeset
for help on using the changeset viewer.