Function to project into phonon coordinates