Changeset 67cc0ff in sasmodels
- Timestamp:
- Dec 18, 2017 2:19:53 PM (7 years ago)
- Children:
- 7b1dcf9
- Parents:
- 1941ec6
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r1941ec6 r67cc0ff 21 21 /.idea 22 22 .vscode 23 xlate.c24 23 /sasmodels.egg-info/ 25 24 /example/Fit_*/ -
sasmodels/autoc.py
r8224d24 r67cc0ff 49 49 return 50 50 51 public_methods = "Iq", "Iq xy", "form_volume"51 public_methods = "Iq", "Iqac", "Iqabc", "Iqxy", "form_volume" 52 52 53 53 tagged = [] # type: List[str] … … 98 98 snippets.append(define_constant(name, obj)) 99 99 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) 104 106 source = (source.replace(name+'.n', 'GAUSS_N') 105 107 .replace(name+'.z', 'GAUSS_Z') … … 126 128 info.source = unique_libs 127 129 info.c_code = "\n".join(snippets) 128 info.Iq = info.Iq xy = info.form_volume = None130 info.Iq = info.Iqac = info.Iqabc = info.Iqxy = info.form_volume = None 129 131 130 132 def define_constant(name, value): -
sasmodels/modelinfo.py
r1941ec6 r67cc0ff 820 820 info.hidden = getattr(kernel_module, 'hidden', None) # type: ignore 821 821 822 info.lineno = {} 823 _find_source_lines(info, kernel_module) 824 if getattr(kernel_module, 'py2c', False): 825 try: 826 autoc.convert(info, kernel_module) 827 except Exception as exc: 828 logger.warn(str(exc) + " while converting %s from C to python"%name) 829 822 830 if callable(info.Iq) and parameters.has_2d: 823 831 raise ValueError("oriented python models not supported") 824 825 info.lineno = {}826 _find_source_lines(info, kernel_module)827 try:828 autoc.convert(info, kernel_module)829 except Exception as exc:830 raise831 logger.warn(str(exc))832 832 833 833 return info -
sasmodels/models/_cylpy.py
r59ee4db r67cc0ff 138 138 ] 139 139 140 py2c = True 141 140 142 def invalid(v): 141 143 return v.radius < 0 or v.length < 0 … … 169 171 return 1.0e-4 * s * s * orient_avg_1D(q, radius, length) 170 172 171 def Iq xy(qab, qc, sld, solvent_sld, radius, length):173 def Iqac(qab, qc, sld, solvent_sld, radius, length): 172 174 s = (sld-solvent_sld) * form_volume(radius, length) 173 175 form = fq(qab, qc, radius, length)
Note: See TracChangeset
for help on using the changeset viewer.