add function to detect wave type
plots for Serg