Skip to content

Improve algorithm to detect subscans for bidirectional scans

Loic Huder requested to merge interpolate-plus into main
  • Detect changes in the absolute value of second derivative (instead of the derivative of the absolute value of first derivative)
  • Since this can lead to start/stop being one index apart (i.e start = stop - 1), I no longer use energy[stop - 1] - energy[start] to detect if the energy is increasing. I instead of with energy_slope[stop - 2] > 0.

Honestly, I don't get why it works but it does both for the BM23 scans and the test case (previous algo in squares, new algo in stars, different colors means different detected subscans):

BM23 data Test data
Increasing increasing_bm23 increasing_teest
Decreasing decreasing_bm23 decreasing_teest

Notice how the previous algo was one off for the test data.

Edited by Loic Huder

Merge request reports