First off thank you for your work.
I wonder if the clearing of ringwise_flatness should have been placed outside of the if (!candidates.empty()) check on line 292 of v1.0.4?
Currently this vector is only cleared if we have candidates for reversion.
What if multiple rings didn't have any candidates, that would mean that ringwise_flatness contains all of data of several rings.
Or am I overlooking something?
Best regards,
Kenneth