mix mod working using scipy leastsq