Changeset 54bcd4a in sasmodels for sasmodels/convert.py
- Timestamp:
- Aug 4, 2016 2:48:37 PM (8 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:
- 745b7bb
- Parents:
- bd49c79
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/convert.py
rbd49c79 r54bcd4a 229 229 oldpars['ndensity'] *= 1e15 230 230 elif name == 'spherical_sld': 231 for k in range(1, int(pars['n_shells'])+1): 232 _remove_pd(oldpars, 'thick_flat'+str(k), 'thick_flat') 233 _remove_pd(oldpars, 'thick_inter'+str(k), 'thick_inter') 231 oldpars["CONTROL"] -= 1 232 # remove polydispersity from shells 233 for k in range(1, 11): 234 _remove_pd(oldpars, 'thick_flat'+str(k), 'thickness') 235 _remove_pd(oldpars, 'thick_inter'+str(k), 'interface') 236 # remove extra shells 237 for k in range(int(pars['n_shells']), 11): 238 oldpars.pop('sld_flat'+str(k), 0) 239 oldpars.pop('thick_flat'+str(k), 0) 240 oldpars.pop('thick_inter'+str(k), 0) 241 oldpars.pop('func_inter'+str(k), 0) 242 oldpars.pop('nu_inter'+str(k), 0) 234 243 elif name == 'core_multi_shell': 235 244 # kill extra shells … … 265 274 oldpars.pop(k, None) 266 275 276 #print("convert from",list(sorted(pars))) 277 #print("convert to",list(sorted(oldpars.items()))) 267 278 return oldpars 268 279 … … 323 334 elif name == 'spherical_sld': 324 335 pars['n_shells'] = math.ceil(pars['n_shells']) 325 pars['n pts_inter'] = math.ceil(pars['npts_inter'])326 pars['func_inter0'] = math.trunc(pars['func_inter0']+0.5)327 for k in range(1, 11):328 pars['func_inter%d'%k] = math.trunc(pars['func_inter%d'%k]+0.5)329 pars['thick _flat%d_pd_n'%k] = 0330 pars[' thick_inter%d_pd_n'%k] = 0331 336 pars['n_steps'] = math.ceil(pars['n_steps']) 337 for k in range(1, 12): 338 pars['shape%d'%k] = math.trunc(pars['shape%d'%k]+0.5) 339 for k in range(2, 12): 340 pars['thickness%d_pd_n'%k] = 0 341 pars['interface%d_pd_n'%k] = 0 342
Note: See TracChangeset
for help on using the changeset viewer.