Giter VIP home page Giter VIP logo

phasepack-matlab's Introduction

PhasePack

Phase retrieval is the recovery of a signal from only the magnitudes, and not the phases, of complex-valued linear measurements. Phase retrieval problems arise in many different applications, particularly in crystallography and microscopy.

PhasePack is a collection of sub-routines for solving classical phase retrieval problems. PhasePack contains implementations of both classical and contemporary phase retrieval routines. It also contains scripts that apply these signal recovery routines to datasets, and compares the results of different methods in terms of speed and quality. PhasePack can do comparisons not only with synthetic datasets, but also with several publicly available real-world datasets.

The routines implemented in PhasePack share a simple common interface, making it easy to switch between solvers. The interface also gives users the option to control the initialization and runtime of different algorithms, making it easy to "plug and play" different routines and options.

To find out more

See the main PhasePack page for complete information, or check out the user guide.

phasepack-matlab's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

phasepack-matlab's Issues

Can you add a license?

Please forgive me if I've missed it, but neither here nor on the project website I could find a license or a statement that you don't want to offer the code under a license. I'd greatly appreciate it if you added a license.

Could not solve a problem with phasepack

Hi,
I tried to solve a particular problem with phasepack, however, it seems most of the algorithms failed to give a reasonable solution (but my homemade algorithm does, except it takes too long), I used the parameters given in the example folder. A typical set of data can be downloaded from my dropbox as a .mat file. I really appreciate if you can tell me what the problem is. Thank you.

Problem in solving with PhaseLift

I am using runImageReconstructionDemo
Here is my opt settings:
opts = struct;
opts.algorithm = 'PhaseLift';
opts.initMethod = 'optimal';
opts.tol = 1e-3;
opts.verbose = 2;

Stacktrace:
Error using reshape
To RESHAPE the number of elements must not change.

Error in runImageReconstructionDemo/A (line 120)
im = reshape(pixels,[numrows,numcols]);

Error in solvePhaseLift (line 91)
A = A(eye(size(x0,1)));

Error in solvePhaseRetrieval>solveX (line 214)
[sol, outs] = solvePhaseLift(A, At, b0, x0, opts);

Error in solvePhaseRetrieval (line 163)
[sol, outs] = solveX(A, At, b0, x0, opts); % Solve the problem using the specified
algorithm

Error in runImageReconstructionDemo (line 74)
[x, outs, opts] = solvePhaseRetrieval(@A, @at, b, numel(x), opts);

Description: After initialization is finished, the function A is expecting a vector of size nm x 1, but instead it gets nm x nm.

How to solve a real vector

I understand the the generalized phase-retrieval problem solves |Ax| = b where both A and x are complex. But can phase-pack be used when A is complex and x is real?

Hybrid Input-Output algorithm

Are you planning to include one of the most popular versions of the PR algorithm: Hybrid Input-Output/Error Reduction (see ref. J. R. Fienup, "Reconstruction of an object from the modulus of its Fourier transform", doi.org/10.1364/OL.3.000027)?

Why need a phase rotation?

I am confused about the actual use of this code, here is an excerpt from the source code:

% Phase retrieval can only recover images up to a phase ambiguity.
% Let's apply a phase rotation to align the recovered image with the
% original so it looks nice when we display it.
rotation= sign(recovered_image(:)'image(:));
recovered_image = rotation
recovered_image;

where "image" is the complex amplitude to be recovered. However, in the actual experiment "image" is unknown, so how should we modify the code in this case? By the way, simply commenting out these two lines of code does not work.

I would be very grateful if anyone could answer my doubts. @tomgoldstein @rohanchandra30

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.