Changeset f1ecfa92 in sasmodels for sasmodels/generate.py


Ignore:
Timestamp:
Feb 20, 2015 9:38:00 AM (9 years ago)
Author:
ajj
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:
6ea6902
Parents:
4c8f9cd
Message:

towards fixing the 'models with no polydispersity' problem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/generate.py

    r2a74b99 rf1ecfa92  
    549549        weights = [p+"_w" for p in pd_pars] 
    550550        sasview_spherical = "" 
     551    weight_product = "*".join(weights) if len(weights) > 1 else "1.0" 
    551552    subst = { 
    552         'weight_product': "*".join(weights), 
     553        'weight_product': weight_product, 
    553554        'volume_norm': volume_norm, 
    554555        'fn': fn, 
     
    574575 
    575576    # Finally, put the pieces together in the kernel. 
     577    pd_length = "+".join('N'+p for p in pd_pars) if len(pd_pars) > 0 else "0" 
    576578    subst = { 
    577579        # kernel name is, e.g., cylinder_Iq 
     
    582584        'par_decl': par_decl, 
    583585        # to copy global to local pd pars we need, e.g., Nradius+Nlength 
    584         'pd_length': "+".join('N'+p for p in pd_pars), 
     586        'pd_length': pd_length, 
    585587        # the q initializers, e.g., double qi = q[i]; 
    586588        'qinit': q_pars['qinit'], 
Note: See TracChangeset for help on using the changeset viewer.