Uncovering neural patterns of cognition by aligning oscillatory dynamics