python fitting sinusoids