Scientists discover new way to diagnose neurological conditions