The new baseline calculation finds inliers based on the Xth percentile of the fluorescence and then fits an exp/linear model.
The function works, but needs improvements:
- Use binning instead of smoothing when fitting the exp/linear model to speed it up.
- Currently, averaging windows are hard-coded for ~30 Hz imaging, this needs to be made universal.
The new baseline calculation finds inliers based on the Xth percentile of the fluorescence and then fits an exp/linear model.
The function works, but needs improvements: