Changeset 67cc0ff in sasmodels for sasmodels/autoc.py


Ignore:
Timestamp:
Dec 18, 2017 4:19:53 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Children:
7b1dcf9
Parents:
1941ec6
Message:

update to new sasmodels api

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/autoc.py

    r8224d24 r67cc0ff  
    4949        return 
    5050 
    51     public_methods = "Iq", "Iqxy", "form_volume" 
     51    public_methods = "Iq", "Iqac", "Iqabc", "Iqxy", "form_volume" 
    5252 
    5353    tagged = [] # type: List[str] 
     
    9898                snippets.append(define_constant(name, obj)) 
    9999            elif isinstance(obj, special.Gauss): 
    100                 #constants["GAUSS_N"] = obj.n 
    101                 #constants["GAUSS_Z"] = obj.z 
    102                 #constants["GAUSS_W"] = obj.w 
    103                 libs.append('lib/gauss%d.c'%obj.n) 
     100                for var, value in zip(("N", "Z", "W"), (obj.n, obj.z, obj.w)): 
     101                    var = "GAUSS_"+var 
     102                    constants[var] = value 
     103                    snippets.append('#line 1 "%s"'%escaped_filename) 
     104                    snippets.append(define_constant(var, value)) 
     105                #libs.append('lib/gauss%d.c'%obj.n) 
    104106                source = (source.replace(name+'.n', 'GAUSS_N') 
    105107                          .replace(name+'.z', 'GAUSS_Z') 
     
    126128    info.source = unique_libs 
    127129    info.c_code = "\n".join(snippets) 
    128     info.Iq = info.Iqxy = info.form_volume = None 
     130    info.Iq = info.Iqac = info.Iqabc = info.Iqxy = info.form_volume = None 
    129131 
    130132def define_constant(name, value): 
Note: See TracChangeset for help on using the changeset viewer.