Based off of qg_vortex_stab_ts.m by Francis J. Poulin in collaboration with Claire Menesguen