The shaking was felt by foreign dignitaries who had gathered in the city of Valparaiso for the inauguration of new Chilean President Sebastian Pinera .