Changeset 2681


Ignore:
Timestamp:
10/24/12 12:29:59 (12 years ago)
Author:
Malte Marquarding
Message:

add better description to add_constraint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapfitter.py

    r2666 r2681  
    360360
    361361        For example a two component gaussian fit where the amplitudes are
    362         constraint by amp1 = 2*amp2
    363         needs a constraint   
    364 
    365             add_constraint([1, 0, 0, -2, 0, 0, 0], 0)
    366 
    367         a velocity difference of v2-v1=17
     362        constraint by amp1 = 2*amp2 and paramaters for the two components
     363        in the order [amp1,peakv1,sigma1,amp2,peakv2,sigma2]
     364        needs a constraint
     365
     366            add_constraint([1, 0, 0, -2, 0, 0], 0)
     367
     368        as the linear equation is
     369           
     370            1*amp1 + 0*peakv1 + 0*sigma1 -2*amp2 + 0*peakv2 + 0*sigma2 = 0
     371       
     372        and similarly for a velocity difference of v2-v1=17
    368373
    369374            add_constraint([0.,-1.,0.,0.,1.,0.], 17.)
Note: See TracChangeset for help on using the changeset viewer.