Changeset 78afdec in sasmodels
- Timestamp:
- Jan 18, 2016 2:48:37 AM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 23d3b41
- Parents:
- 421e55c (diff), e66c9f9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 5 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 r78afdec 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.