add helper function that allows shorter generated code
check SVD eigenvalue errors in tree-level masses
merge bad mass flag functions and generalize flag_tachyon function
check diagonalization eigenvalue errors in tree-level masses