Flare finding is now done sequentially. Once a deviation is found, we will then immediately process and find the start, peak and end of the flare. Once this is done, and the flare passes some checks, then we continue the search for deviations from the end of the flare (or in the case the flare doesn't pass the checks, resume from the bad deviation + 1).
This is beneficial in that we no longer encounter the problem of multiple deviations/flares being found overlapping and causing problems with the code.
To still later improve: re-add all previous flare checks, re-add check to ensure flares aren't being ended until flux is ~the starting flux.
Flare finding is now done sequentially. Once a deviation is found, we will then immediately process and find the start, peak and end of the flare. Once this is done, and the flare passes some checks, then we continue the search for deviations from the end of the flare (or in the case the flare doesn't pass the checks, resume from the bad deviation + 1).
This is beneficial in that we no longer encounter the problem of multiple deviations/flares being found overlapping and causing problems with the code.
To still later improve: re-add all previous flare checks, re-add check to ensure flares aren't being ended until flux is ~the starting flux.