[Feature Request]: Beta from phase: Catch too few BPMs in 3BPM method early
JoschD opened this issue · comments
Feature Description
If there are too few BPMs left after cleaning (e.g. 2), beta-from-phase will crash with a nondescript index error in the 3 BPM method. Probably also N-BPM method (?). This should be caught early and the user informed properly.
Possible Implementation
check for number of BPMs left in input to beta-from-phase and raise error
any progress on that one, btw?
I can add a warning or error "Dear user, phase analysis yields less than 3 BPMs. This will probably lead to problems later on, especially in beta from phase. Please check your measurement. Common issues to check:
-did you pass the correct tunes to harpy
-did excitation trigger in both planes
-are cleaning settings (peak-to-peak, singular-value-cut) too agressive"
I would log this as a warning in phase.py
and catch the error through which we noticed this issue (the IndexError
that says Index out of bounds
) in beta from phase (or maybe before that error, once you know that you need more BPMs than are available) to read something shorter like "Method {xy} requires {n} BPMS, but only {n} BPMs were available".
yeah, that's what I wanted to do