Ignore:
Timestamp:
Aug 30, 2007 4:24:41 PM (15 years ago)
Author:
srkline
Message:

Changed Plot* and PlotSmeared?* naming schemes to be all consistent prefixes for the actual function name, so that the macros can be constructed from the function name, or vice versa.

also some tweaks to the wrapper to make sure that plot and append really work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Packages/Wrapper.ipf

    r152 r153  
    7171 
    7272// show the available models 
    73 // not the f* 
    74 // not the *X XOPS 
     73// not the f*(cw,xw) point calculations 
     74// not the *X(cw,xw) XOPS 
    7575// 
    7676// KIND:10 should show only user-defined curve fitting functions 
     
    7979Function/S W_FunctionPopupList() 
    8080        String list,tmp 
    81         list = FunctionList("*",";","KIND:10")          //get everything 
    82          
    83         list = RemoveFromList("Sum_Model", list  ,";") 
     81        list = FunctionList("*",";","KIND:10")          //get every user defined curve fit function 
     82//      list = RemoveFromList("Sum_Model", list  ,";") 
    8483         
    8584        tmp = FunctionList("*_proto",";","KIND:10")             //prototypes 
    8685        list = RemoveFromList(tmp, list  ,";") 
    87  
    88         tmp = FunctionList("f*",";","KIND:10")          //point calculations 
     86//      Print "everything - proto = ",list 
     87//      print " " 
     88 
     89        tmp = FunctionList("f*",";","NPARAMS:2")                //point calculations 
     90//      Print "f* = ",tmp 
     91//      print " " 
    8992        list = RemoveFromList(tmp, list  ,";") 
    9093         
    91         // this should be a null string with KIND:10 
    92         tmp = FunctionList("*X",";","KIND:10")          //XOPs, also point calculations 
     94        tmp = FunctionList("fSmear*",";","NPARAMS:3")           //smeared dependency calculations 
     95//      Print "f* = ",tmp 
     96//      print " " 
    9397        list = RemoveFromList(tmp, list  ,";") 
    9498         
     99//      tmp = FunctionList("*X",";","KIND:4")           //XOPs, but these shouldn't show up if KIND:10 is used initially 
     100//      Print "X* = ",tmp 
     101//      print " " 
     102//      list = RemoveFromList(tmp, list  ,";") 
     103         
     104        //non-fit functions that I can't seem to filter out 
     105        list = RemoveFromList("BinaryHS_PSF11;BinaryHS_PSF12;BinaryHS_PSF22;EllipCyl_Integrand;PP_Inner;PP_Outer;Phi_EC;TaE_Inner;TaE_Outer;",list,";") 
     106 
    95107        if(strlen(list)==0) 
    96108                list = "No functions plotted" 
     
    113125        list = WaveList("coef*",";","") 
    114126         
    115         ControlInfo popup_0 
     127        ControlInfo/W=wrapperpanel popup_0 
    116128        if(V_Value != 0)                //0== no items in menu 
    117129                if(DataFolderExists("root:"+S_Value)) 
     
    121133        endif 
    122134         
     135        // tmp coefficients that aren't being cleaned up from somewhere... 
     136        list = RemoveFromList("temp_coef_1;temp_coef_2;", list  ,";") 
     137 
    123138        if(strlen(list)==0) 
    124139                list = "No functions plotted" 
    125140        endif 
    126141        list = SortList(list) 
     142         
     143//      Print itemsinlist(list,";") 
    127144         
    128145        setDataFolder root: 
     
    196213End 
    197214 
    198 Function/S getModelSuffix(modelStr) 
    199         String modelStr 
    200          
    201         Variable pos=Strsearch(modelStr,"_",Inf,1)              //look backwards to find "_" 
    202          
    203         return(modelStr[pos,strlen(modelStr)-1]) 
     215// always pass this the coefficient string 
     216// 
     217// either "coef_" 
     218// or "smear_coef_" 
     219// 
     220Function/S getModelSuffix(coefStr) 
     221        String coefStr 
     222 
     223        Variable pos,start=0 
     224//      Variable pos=Strsearch(modelStr,"_",Inf,1)              //look backwards to find "_" - this fails for form+struct models 
     225 
     226        if(stringmatch(coefStr,"smear_*") == 1) 
     227                start=7 //look forwards to find "_", skipping "smear_coe" if necessary 
     228        endif 
     229        pos=Strsearch(coefStr,"_",start,0) 
     230        //Print start, pos 
     231        return(coefStr[pos,strlen(coefStr)-1]) 
    204232End 
    205233 
Note: See TracChangeset for help on using the changeset viewer.