Added helper function for converting to atom-index format shifts.