Changeset c97d76a in sasview for src/sas/sascalc/corfunc


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

File:
1 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 
Note: See TracChangeset for help on using the changeset viewer.