Changeset 2662828 in sasmodels


Ignore:
Timestamp:
Apr 11, 2017 7:43:45 AM (7 years ago)
Author:
butler
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
9dcb21d
Parents:
bf8c271 (diff), 1cd24b4 (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 remote-tracking branch 'origin/master' into ticket-741

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • example/oriented_usans.py

    rea75043 r1cd24b4  
    1919    scale=0.08, background=0, 
    2020    sld=.291, sld_solvent=7.105, 
    21     r_polar=1800, r_polar_pd=0.222296, r_polar_pd_n=0, 
    22     r_equatorial=2600, r_equatorial_pd=0.28, r_equatorial_pd_n=0, 
     21    radius_polar=1800, radius_polar_pd=0.222296, radius_polar_pd_n=0, 
     22    radius_equatorial=2600, radius_equatorial_pd=0.28, radius_equatorial_pd_n=0, 
    2323    theta=60, theta_pd=0, theta_pd_n=0, 
    2424    phi=60, phi_pd=0, phi_pd_n=0, 
     
    2626 
    2727# SET THE FITTING PARAMETERS 
    28 model.r_polar.range(1000, 10000) 
    29 model.r_equatorial.range(1000, 10000) 
     28model.radius_polar.range(1000, 10000) 
     29model.radius_equatorial.range(1000, 10000) 
    3030model.theta.range(0, 360) 
    3131model.phi.range(0, 360) 
  • sasmodels/models/onion.py

    rc3ccaec rbccb40f  
    11r""" 
    22This model provides the form factor, $P(q)$, for a multi-shell sphere where 
    3 the scattering length density (SLD) of the each shell is described by an 
     3the scattering length density (SLD) of each shell is described by an 
    44exponential, linear, or constant function. The form factor is normalized by 
    55the volume of the sphere where the SLD is not identical to the SLD of the 
     
    142142 
    143143For $A = 0$, the exponential function has no dependence on the radius (so that 
    144 $\rho_\text{out}$ is ignored this case) and becomes flat. We set the constant 
     144$\rho_\text{out}$ is ignored in this case) and becomes flat. We set the constant 
    145145to $\rho_\text{in}$ for convenience, and thus the form factor contributed by 
    146146the shells is 
     
    346346            # flat shell 
    347347            z.append(z_current + thickness[k]) 
    348             rho.append(sld_out[k]) 
     348            rho.append(sld_in[k]) 
    349349        else: 
    350350            # exponential shell 
     
    357357                z.append(z_current+z_shell) 
    358358                rho.append(slope*exp(A[k]*z_shell/thickness[k]) + const) 
    359  
     359     
    360360    # add in the solvent 
    361361    z.append(z[-1]) 
  • sasmodels/sasview_model.py

    r749a7d4 rbf8c271  
    148148        _previous_name = model.name 
    149149        model.name = model.id 
    150          
     150 
    151151        # If the new model name is still in the model list (for instance, 
    152152        # if we put a cylinder.py in our plug-in directory), then append 
     
    598598        return p_model, s_model 
    599599 
     600 
     601    def calc_composition_models(self, qx): 
     602        with calculation_lock: 
     603            self._calculate_Iq(qx) 
     604            return self._intermediate_results 
     605 
    600606    def calculate_Iq(self, qx, qy=None): 
    601607        # type: (Sequence[float], Optional[Sequence[float]]) -> np.ndarray 
     
    637643        result = calculator(call_details, values, cutoff=self.cutoff, 
    638644                            magnetic=is_magnetic) 
     645        self._intermediate_results = getattr(calculator, 'results', None) 
    639646        calculator.release() 
    640647        self._model.release() 
Note: See TracChangeset for help on using the changeset viewer.