Ignore:
Timestamp:
Sep 6, 2019 2:29:24 PM (4 years ago)
Author:
krzywon
Message:

Add elliptical averaging as an option to the average parameters window. The method called currently performs an annular average.

File:
1 edited

Legend:

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

    r1165 r1207  
    3838        Variable/G root:myGlobals:Drawing:gDrawQCtr = 0 
    3939        Variable/G root:myGlobals:Drawing:gDrawQDelta = 1 
     40        Variable/G root:myGlobals:Drawing:gDrawRAxes = 1 
    4041         
    4142        //return to root 
     
    131132                        AnnularAverageTo1D(type) 
    132133                        break 
     134                case "Elliptical": 
     135                        EllipticalAverageTo1D(type) 
     136                        break 
    133137                case "Circular": 
    134138                case "Sector": 
    135139                        //circular or sector 
    136140                        CircularAverageTo1D(type)               //graph is drawn here 
     141                        break 
     142                case "2D_NXcanSAS": 
     143                        WriteNxCanSAS2D(type,"",1) 
    137144                        break 
    138145                case "2D ASCII": 
     
    156163                        case "2D ASCII": 
    157164                        case "QxQy ASCII": 
     165                        case "2D_NXcanSAS": 
    158166                                break 
    159167                        default: 
     
    225233                case "2D ASCII":                // execute if case matches expression 
    226234                case "QxQy ASCII": 
     235                case "2D_NXcanSAS": 
    227236                        String/G root:myGlobals:Drawing:gDrawInfoStr = ReplaceStringByKey("AVTYPE", tempStr, choice, "=", ";") 
    228237                        Button P_DoAvg,title="Save ASCII" 
     
    232241                case "Sector_PlusMinus": 
    233242                case "Rectangular": 
     243                case "Elliptical": 
    234244                case "Annular": 
    235245                        String/G root:myGlobals:Drawing:gDrawInfoStr = ReplaceStringByKey("AVTYPE", tempStr, choice, "=", ";") 
     
    253263        strswitch(choice)       // string switch 
    254264                case "2D ASCII": 
    255                 case "QxQy ASCII":                                       
     265                case "QxQy ASCII":       
     266                case "2D_NXcanSAS":      
    256267                case "Circular":                //disable everything for these three choices 
    257268                        SetVariable Phi_p,disable=yes 
     
    260271                        SetVariable DPhi_p,disable=yes 
    261272                        SetVariable width_p,disable=yes 
     273                        SetVariable RAxes_p,disable=yes 
    262274                        popupmenu sides,disable=yes 
    263275                        break 
     
    269281                        SetVariable DPhi_p,disable=no 
    270282                        SetVariable width_p,disable=yes 
     283                        SetVariable RAxes_p,disable=yes 
    271284                        popupmenu sides,disable=no 
    272285                        break 
     
    277290                        SetVariable DPhi_p,disable=yes 
    278291                        SetVariable width_p,disable=no 
     292                        SetVariable RAxes_p,disable=yes 
    279293                        popupmenu sides,disable=no 
    280294                        break 
     
    285299                        SetVariable DPhi_p,disable=yes 
    286300                        SetVariable width_p,disable=yes 
     301                        SetVariable RAxes_p,disable=yes 
    287302                        popupmenu sides,disable=yes 
     303                        break 
     304                case "Elliptical": 
     305                        SetVariable Phi_p,disable=no 
     306                        SetVariable Qctr_p,disable=yes 
     307                        SetVariable Qdelta_p,disable=yes 
     308                        SetVariable DPhi_p,disable=yes 
     309                        SetVariable width_p,disable=yes 
     310                        SetVariable RAxes_p,disable=no 
     311                        popupmenu sides,disable=no 
    288312                        break 
    289313                default:                                                        // optional default expression executed 
     
    307331        PopupMenu av_choice,pos={61,7},size={144,20},proc=AvTypePopMenuProc,title="AverageType" 
    308332        PopupMenu av_choice,help={"Select the type of average to perform, then make the required selections below and click \"DoAverage\" to plot the results"} 
    309         PopupMenu av_choice,mode=1,popvalue="Circular",value= #"\"Circular;Sector;Annular;Rectangular;2D ASCII;QxQy ASCII;Sector_PlusMinus;\"" 
     333        PopupMenu av_choice,mode=1,popvalue="Circular",value= #"\"Circular;Sector;Annular;Rectangular;Elliptical;2D_NXcanSAS;2D ASCII;QxQy ASCII;Sector_PlusMinus;\"" 
    310334        Button ave_help,pos={260,7},size={25,20},proc=ShowAvePanelHelp,title="?" 
    311335        Button ave_help,help={"Show the help file for averaging options"} 
     
    326350        SetVariable DPhi_p,help={"Enter the +/- range (0,45) of azimuthal angles to be included in the average.  The bounding angles will be drawin in blue."} 
    327351        SetVariable DPhi_p,limits={0,90,1},value= root:myGlobals:Drawing:gDrawDPhi 
     352        SetVariable RAxes_p,pos={166,176},size={110,15},proc=DeltaPhiSetVarProc,title="Axis Ratio" 
     353        SetVariable RAxes_p,help={"Enter the ratio of the minor to major axes for an isointensity contour.  By definition, this value should be less than 1."} 
     354        SetVariable RAxes_p,limits={0,1,0.001},value= root:myGlobals:Drawing:gDrawRAxes 
    328355        SetVariable width_p,pos={15,155},size={115,15},proc=WidthSetVarProc,title="Width (pixels)" 
    329356        SetVariable width_p,help={"Enter the total width of the rectangular section in pixels. The bounding lines will be drawn in blue."} 
Note: See TracChangeset for help on using the changeset viewer.