Phase retrieval and reconstruction