Phase retrieval by iterated projections