Changeset c97d76a in sasview for src/sas


Ignore:
Timestamp:
Aug 22, 2016 5:03:51 AM (8 years ago)
Author:
lewis
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
93b145a
Parents:
9a15a87
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (08/22/16 04:41:19)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (08/22/16 05:03:51)
Message:

Add constraint that sigma > 0

Also update the help file to reflect this change

Location:
src/sas
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/corfunc/corfunc_calculator.py

    r20e09c6 rc97d76a  
    240240        """Fit the Porod region of the curve""" 
    241241        fitp = curve_fit(lambda q, k, sig, bg: self._porod(q, k, sig, bg)*q**2, 
    242                          q, iq*q**2)[0] 
     242                         q, iq*q**2, bounds=([-np.inf, 0, -np.inf], [np.inf, np.inf, np.inf]))[0] 
    243243        k, sigma, bg = fitp 
    244244        return k, sigma, bg 
  • src/sas/sasgui/perspectives/corfunc/media/corfunc_help.rst

    r32c5983 rc97d76a  
    5151 
    5252.. math:: 
    53     I(Q) = B + KQ^{-4}e^{-Q^2\sigma^2} 
     53    I(Q) = Bg + KQ^{-4}e^{-Q^2\sigma^2} 
    5454 
    55 Where :math:`B` is the Bonart thermal background, :math:`K` is the Porod 
    56 constant, and :math:`\sigma` describes the electron (or neutron scattering 
     55Where :math:`Bg` is the Bonart thermal background, :math:`K` is the Porod 
     56constant, and :math:`\sigma > 0` describes the electron (or neutron scattering 
    5757length) density profile at the interface between crystalline and amorphous 
    5858regions (see figure 1). 
     
    133133Usage 
    134134----- 
    135 Upon sending data for correlation function analysis, it will be plotted,   
    136 along with a red bar indicating the lower Q range (used for back-extrapolation),  
    137 and 2 purple bars indicating the upper qrange (used for forward-extrapolation)  
    138 [figure 3]. These bars may be moved my clicking and dragging, or by entering  
     135Upon sending data for correlation function analysis, it will be plotted, 
     136along with a red bar indicating the lower Q range (used for back-extrapolation), 
     137and 2 purple bars indicating the upper qrange (used for forward-extrapolation) 
     138[figure 3]. These bars may be moved my clicking and dragging, or by entering 
    139139the appropriate value in the Q range input boxes. 
    140140 
Note: See TracChangeset for help on using the changeset viewer.