Changes in / [421e55c:78afdec] in sasmodels
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
r8b25ee1 r82c299f 123 123 rg_max = np.sqrt(90*np.log(10) + 3*np.log(pars['scale']))/q_max 124 124 pars['rg'] = min(pars['rg'],rg_max) 125 126 if name == 'rpa': 127 # Make sure phi sums to 1.0 128 if pars['case_num'] < 2: 129 pars['Phia'] = 0. 130 pars['Phib'] = 0. 131 elif pars['case_num'] < 5: 132 pars['Phia'] = 0. 133 total = sum(pars['Phi'+c] for c in 'abcd') 134 for c in 'abcd': 135 pars['Phi'+c] /= total 125 136 126 137 def parlist(pars): -
sasmodels/convert.py
r55a8316 r55a8316 112 112 _remove_pd(oldpars, 'num_pearls', name) 113 113 _remove_pd(oldpars, 'thick_string', name) 114 elif name == 'rpa': 115 # convert scattering lengths from femtometers to centimeters 116 for p in "La", "Lb", "Lc", "Ld": 117 if p in oldpars: oldpars[p] *= 1e-13 114 118 115 119 return oldname, oldpars … … 128 132 pars['string_thickness_pd_n'] = 0 129 133 pars['number_of_pearls_pd_n'] = 0 134 elif name == 'rpa': 135 pars['case_num'] = int(pars['case_num']) 130 136 elif getattr(model_definition, 'category', None) == 'structure-factor': 131 137 pars['scale'], pars['background'] = 1, 0 -
sasmodels/generate.py
re97170c re66c9f9 265 265 """ 266 266 267 def format_units( par):268 return RST_UNITS.get(par, par)267 def format_units(units): 268 return "string" if isinstance(units, list) else RST_UNITS.get(units, units) 269 269 270 270 def make_partable(pars): … … 284 284 lines = [ 285 285 sep, 286 " ".join("%-*s" % (w, h) for w, h in zip(column_widths, PARTABLE_HEADERS)), 286 " ".join("%-*s" % (w, h) 287 for w, h in zip(column_widths, PARTABLE_HEADERS)), 287 288 sep, 288 289 ]
Note: See TracChangeset
for help on using the changeset viewer.