What's the best way to detect linear growth in time-series data? I have time-series data where my output at one point usually grows linearly for some time. Before and after growth is usually slower and not constant.
Exemplary data (the data may be noisier):

An exemplary fit I'd like to generate automatically (i.e. by extracting the starting and end point of the largest linear growth phase:

I'd like to detect the linear growth phase automatically. It seems to me that there are likely algorithms to detect such growth phases but I can't find any.
Can someone point me in the right direction?

I'd be wary of using this kind of approach and trying to find a "linear growth phase".  One of the most important ideas in calculus is that any differentiable nonlinear function can be locally well-approximated by a linear function if you make the locality small enough.  Consequently, searching for a relatively small "linear growth phase" in an obviously nonlinear relationship seems to me like a cherry-picking exercise that is liable to significant overfitting.  I recommend you instead attempt to fit an appropriate nonlinear function that describes your data adequately over the entire dataset (e.g., some kind of "sigmoid" shaped function).
