Changeset 885ee37 in sasmodels


Ignore:
Timestamp:
Apr 4, 2016 9:09:26 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
5b0335b
Parents:
aaf75b6 (diff), 7a1143b (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.
Message:

Merge branch 'polydisp' of github.com:sasview/sasmodels into polydisp

Conflicts:

sasmodels/direct_model.py

Location:
sasmodels
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/direct_model.py

    r7a1143b raaf75b6  
    2525import numpy as np 
    2626 
     27from .core import make_kernel 
    2728from .core import call_kernel, call_ER_VR 
    2829from . import sesans 
     
    170171    def _calc_theory(self, pars, cutoff=0.0): 
    171172        if self._kernel is None: 
    172             self._kernel = self._model.make_kernel(self._kernel_inputs) 
    173             self._kernel_mono = (self._model.make_kernel(self._kernel_mono_inputs) 
     173            self._kernel = make_kernel(self._model, self._kernel_inputs)  # pylint: disable=attribute-dedata_type 
     174            self._kernel_mono = (make_kernel(self._model, self._kernel_mono_inputs) 
    174175                                 if self._kernel_mono_inputs else None) 
    175176 
  • sasmodels/models/adsorbed_layer.py

    rc079f50 r1d4d409  
    9898     'density_shell': 0.7, 'radius': 500.0, 'volfraction': 0.14,  
    9999     'sld_shell': 1.5, 'sld_solvent': 6.3, 'background': 0.0}, 
    100      [0.0106939, 0.469418], [73.741, 9.65391e-53]], 
     100     [0.0106939, 0.1], [73.741, 4.51684e-3]], 
    101101    ] 
    102102# ADDED by: SMK  ON: 16Mar2016  convert from sasview, check vs SANDRA, 18Mar2016 RKH some edits & renaming 
  • sasmodels/models/core_shell_ellipsoid.py

    r65bf704 r27fade8  
    117117source = ["lib/sph_j1c.c", "lib/gfn.c", "lib/gauss76.c", "core_shell_ellipsoid.c"] 
    118118 
    119 def ER(equat_shell, polar_shell): 
     119def ER(equat_core, polar_core, equat_shell, polar_shell): 
    120120    """ 
    121121        Returns the effective radius used in the S*P calculation 
     
    123123    import numpy as np 
    124124    from .ellipsoid import ER as ellipsoid_ER 
    125     return ellipsoid_ER(rpolar, equat_shell) 
     125    return ellipsoid_ER(polar_shell, equat_shell) 
    126126 
    127127 
  • sasmodels/models/core_shell_ellipsoid_xt.py

    r65bf704 r27fade8  
    107107        Returns the effective radius used in the S*P calculation 
    108108    """ 
    109     import numpy as np 
    110109    from .ellipsoid import ER as ellipsoid_ER 
    111     return ellipsoid_ER(equat_core*x_core + t_shell*x_polar_shell, equat_shell + t_shell) 
     110    polar_outer = equat_core*x_core + t_shell*x_polar_shell 
     111    equat_outer = equat_core + t_shell 
     112    return ellipsoid_ER(polar_outer, equat_outer) 
    112113 
    113114 
  • sasmodels/models/core_shell_sphere.py

    r55b2b232 r3c6d5bc  
    9999 
    100100tests = [[{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0], 
    101          [{'radius': 20.0, 'thickness': 10.0}, 'VR', 0.703703704], 
     101         # TODO: VR test suppressed until we sort out new product model 
     102         # and determine what to do with volume ratio. 
     103         #[{'radius': 20.0, 'thickness': 10.0}, 'VR', 0.703703704], 
    102104 
    103105         # The SasView test result was 0.00169, with a background of 0.001 
  • sasmodels/models/onion.py

    rce896fd raaf75b6  
    290290category = "shape:sphere" 
    291291 
     292# TODO: n is a volume parameter that is not polydisperse 
    292293 
    293294#             ["name", "units", default, [lower, upper], "type","description"], 
     
    364365 
    365366def ER(core_radius, n, thickness): 
    366     return np.sum(thickness[:n], axis=0) + core_radius 
     367    return np.sum(thickness[:n[0]], axis=0) + core_radius 
    367368 
    368369def VR(core_radius, n, thickness): 
    369     return 1.0 
     370    return 1.0, 1.0 
    370371 
    371372demo = { 
  • sasmodels/models/sphere.py

    rd7028dc r364d8f7  
    8686def ER(radius): 
    8787    """ 
    88         Return equivalent radius (ER) 
     88    Return equivalent radius (ER) 
    8989    """ 
    9090    return radius 
  • sasmodels/models/squarewell.py

    r2f63032 rb812972  
    5555category = "structure-factor" 
    5656structure_factor = True 
     57single = False 
    5758 
    5859#single = False 
  • sasmodels/product.py

    rce896fd raaf75b6  
    2020VOLFRACTION=3 
    2121 
     22# TODO: core_shell_sphere model has suppressed the volume ratio calculation 
     23# revert it after making VR and ER available at run time as constraints. 
    2224def make_product_info(p_info, s_info): 
    2325    """ 
  • sasmodels/resolution.py

    r7a1143b raaf75b6  
    805805        pars = { 
    806806            'scale':0.05, 
    807             'rpolar':500, 'requatorial':15000, 
    808             'sld':6, 'solvent_sld': 1, 
     807            'r_polar':500, 'r_equatorial':15000, 
     808            'sld':6, 'sld_solvent': 1, 
    809809            } 
    810810        form = load_model('ellipsoid', dtype='double') 
     
    837837TEST_PARS_PINHOLE_SPHERE = { 
    838838    'scale': 1.0, 'background': 0.01, 
    839     'radius': 60.0, 'sld': 1, 'solvent_sld': 6.3, 
     839    'radius': 60.0, 'sld': 1, 'sld_solvent': 6.3, 
    840840    } 
    841841# Q, dQ, I(Q) calculated by NIST Igor SANS package 
     
    946946TEST_PARS_SLIT_SPHERE = { 
    947947    'scale': 0.01, 'background': 0.01, 
    948     'radius': 60000, 'sld': 1, 'solvent_sld': 4, 
     948    'radius': 60000, 'sld': 1, 'sld_solvent': 4, 
    949949    } 
    950950# Q dQ I(Q) I_smeared(Q) 
     
    10471047 
    10481048    if name == 'cylinder': 
    1049         pars = {'length':210, 'radius':500} 
     1049        pars = {'length':210, 'radius':500, 'background': 0} 
    10501050    elif name == 'teubner_strey': 
    10511051        pars = {'a2':0.003, 'c1':-1e4, 'c2':1e10, 'background':0.312643} 
     
    10541054    elif name == 'ellipsoid': 
    10551055        pars = { 
    1056             'scale':0.05, 
    1057             'rpolar':500, 'requatorial':15000, 
    1058             'sld':6, 'solvent_sld': 1, 
     1056            'scale':0.05, 'background': 0, 
     1057            'r_polar':500, 'r_equatorial':15000, 
     1058            'sld':6, 'sld_solvent': 1, 
    10591059            } 
    10601060    else: 
Note: See TracChangeset for help on using the changeset viewer.