Make plots optional, assert phase residual
Added amplitude-weighted averaging