Skip to content

ENH: Improve plateaus identification in _fcutoff #4

Description

@physicien

Description of the problem

At present, plateau detection in _fcutoff is carried out by imposing a narrow tolerance band around 0 on both the first (see the yellow [loose tolerance] and dashed orange [tight tolerance] regions in the autocorrelation plot) and second derivatives (see the blue region in the autocorrelation plot), and then designating as plateaus those points where these two criteria coincide.

Image

I tested several alternative strategies that rely on features of the autocorrelation curve (such as inflection points or extrema of its first derivative), but these turned out to be overly sensitive to the instabilities and discontinuities that may appear in the autocorrelation plot. Consequently, a more robust approach is needed to reliably detect all plateaus.

Description of a possible solution or alternative

As @derb12 pointed out in an email exchange, instead of examining the first two derivatives, it may be more effective to consider something like the rolling standard deviation of the autocorrelation values. For this purpose, a rolling standard deviation is expected to yield a unimodal distribution of values, from which an appropriate threshold for detecting flat regions could be determined automatically using scikit-image’s threshold_triangle. That said, this approach still cannot guarantee selection of the correct plateau when multiple plausible plateaus exist. Even so, being able to robustly detect plateau regions at all would represent a significant improvement.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions