I'm trying to fit a dataset to a periodic model of data (simplified as $F = A\sin(x/T)+B\cos(x/T),$ where $A,~ B,$ and $T$ are the model parameters) using python. I've been encouraged to use linear regression to do so - something I'm finding challenging, as the parameters don't seem to be exclusively linear, and I can't make them so. If there is a way to analyse this via linear regression, I'd love to understand more, or if I ought to look into other forms of curve fitting, I'd like to know.
As part of the broader problem, I will fit this function for different $T$ values to optimise chi-squared so that I might find the best $T.$