Changeset 82c299f in sasmodels
- Timestamp:
- Jan 8, 2016 12:23:56 PM (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:
- e66c9f9
- Parents:
- a7f909a
- Files:
-
- 3 added
- 2 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
r716abe0 r82c299f 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
Note: See TracChangeset
for help on using the changeset viewer.