[Numpy-discussion] 2D phase unwrapping

Thu Nov 27 00:36:34 CST 2008

```My problem is how to calculate the power flow (free-space Poynting vector) given an image of a complex scalar electric-field image. This requires to calculate the *derivative* of the phase, and I think I found a way to do it directly bypassing phase unwrapping.
1. I may return to unwrapping if I'll have to do so. I downloaded the code from GERI, it looks like a pure C code, so it might be an easy task to bind it to python.
2. Fabrice's problem involves a smooth image. It may be not to hard to make it. I'll try to code it in the next week, and port it here if I'll succeed.
3. Does anyone know an existing python code to solve the problem presented above? I'll post my code here (when it'll be ready) if some of you are interested.

-----הודעה מקורית-----
מאת: numpy-discussion-bounces@scipy.org בשם Jarrod Millman
נשלח: ה 27-נובמבר-08 06:15
אל: Discussion of Numerical Python
נושא: Re: [Numpy-discussion] 2D phase unwrapping

On Tue, Nov 25, 2008 at 11:17 PM, Nadav Horesh <nadavh@visionsense.com> wrote:
> I read a presentation by GERI (http://www.ljmu.ac.uk/GERI) that their code is implemented in scipy, but I could not find it.

One of my colleagues has been using 2D and 3D phase unwrapping code
from Munther Gdeisat from GERI:
https://cirl.berkeley.edu/trac/browser/bic/trunk/recon-tools/src
https://cirl.berkeley.edu/trac/browser/bic/trunk/recon-tools/root/recon/punwrap
This code is very high quality and replicating it from scratch would
be a fairly daunting task.

I was hoping to get this code integrated into SciPy, but no one in my
group has had time to do this.  Munther Gdeisat and I spoke on the
phone and had an email exchange about relicensing his code and
integrating it into SciPy.  Munther was very interested in having this
happen and had some discussions with the Institute Director to get
permission for relicencing the code.

I have appended our email exchange below.  If anyone is interested in
picking this up and going through the effort of incorporating this
code in scipy I would be happy to help resolve any remaining licensing
issues.  I also may be able to devote some programming resources to
helping out, if someone else volunteers to do the majority of the
work.

Thanks,

---------- Forwarded message ----------
From: Gdeisat, Munther <M.A.Gdeisat@ljmu.ac.uk>
Date: Fri, Sep 28, 2007 at 1:07 PM
Subject: RE: 3D phase unwrap
To: Jarrod Millman <millman@berkeley.edu>
Cc: Daniel Sheltraw <sheltraw@berkeley.edu>, "Travis E. Oliphant"
<oliphant@enthought.com>

Dear Jarrod,

On behalf of the General Engineering Research Institute (GERI),
Liverpool John Moores University, UK, I am very happy to license our
2D and 3D phase unwrappers to use in your NumPy and SciPy libraries. I
spoke with this matter with the director of our institute (GERI),
prof. Burton, and he is also happy to license the code for both
libraries mentioned above. But myself  and Prof. Burton would like to
stress on the following issues

1- We disclaims all responsibility for the use which is made of the
Software. We further disclaim any liability for the outcomes arising
from using the Software.
2-We are not obliged to update the software or give any support to the
users of the software. We generally help researchers around the world
but we are not obliged to do that.

Following our phone call, you mentioned to me that you already have
these two points mentioned in the license of both libraries. So, I can
confirm you that you can include our software in your library.

Yours Truly,

Dr. Munther Gdeisat
The General Engineering Research Institute (GERI)
Liverpool John Moores University, UK

________________________________

From: millman.ucb@gmail.com on behalf of Jarrod Millman
Sent: Fri 9/28/2007 9:54 PM
To: Gdeisat, Munther
Cc: Daniel Sheltraw; Travis E. Oliphant
Subject: Re: 3D phase unwrap

Hello Munther,

It was good to speak to you on the phone.  I am happy that you will be
able to relicense your code for us.  Here is the license we use:

It should address all your concerns.  Feel free to let me know if you
have any questions about it.

Thanks,

--
Jarrod Millman
Computational Infrastructure for Research Labs
10 Giannini Hall, UC Berkeley
phone: 510.643.4014
http://cirl.berkeley.edu/

________________________________

From: millman.ucb@gmail.com on behalf of Jarrod Millman
Sent: Fri 9/28/2007 3:02 AM
To: Gdeisat, Munther
Cc: Daniel Sheltraw; Travis E. Oliphant
Subject: Re: 3D phase unwrap

On 9/26/07, Gdeisat, Munther <M.A.Gdeisat@ljmu.ac.uk> wrote:
> Firstly, I would like to than Daniel to bring us together. I am happy to include the 2D and 3D phase unwrappers in the NumPy/SciPy project. If you need any help regarding this matter such as documentation, I am happy to do so. Kind regards.

Hello Munther,

I am very excited about the possibility of getting your 2D and 3D
phase unwrappers incorporated into SciPy (http://www.scipy.org/
<http://www.scipy.org/> ).
Travis Oliphant (the main author of NumPy and a major contributor to
SciPy) spoke about where your phase unwrapping coding would best fit,
and we both agreed that they belong in SciPy.  NumPy and SciPy are
both part of the same technology stack.  We try to keep NumPy as lean
as possible leaving SciPy to provide a more comprehensive set of
tools.  Here is an article about NumPy/SciPy written by Travis from a
recent special issue of IEEE's Computing in Science and Engineering,
which was devoted to Python for scientific programming:
http://www.computer.org/portal/cms_docs_cise/cise/2007/n3/10-20.pdf
<http://www.computer.org/portal/cms_docs_cise/cise/2007/n3/10-20.pdf>

Anyway, I am the current release manager of SciPy and am eager to get
your phase unwrappers incorporated ASAP.  Phase unwrapping is
currently missing from SciPy and Daniel has spoken very highly of your
algorithms and code.

The only potential issue I see involves the licensing.  Both SciPy and
NumPy are released under a revised BSD license.  Your code appears to
be owned by the Liverpool John Moores University and the licensing
terms impose restrictions that prevent it from being incorporated in
SciPy.  If you could get the code relicensed with a revised BSD (or
MIT) license, that would allow us to use your code.  You would still
be the author and would retain the copyright of your code.  I would be
happy to talk with you in more detail about these licensing issues and
am very hopeful that you will be able to have the code relicensed.

Please let me know if you have any questions.  If you want to try and
resolve these issues over the phone, my cellphone number is
510-851-0682.  If you would like to speak with both Travis and me, we
could try setting up a conference call using Skype.

Thanks,

--
Jarrod Millman
Computational Infrastructure for Research Labs
10 Giannini Hall, UC Berkeley
phone: 510.643.4014
http://cirl.berkeley.edu/
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 6407 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20081127/ae7896a9/attachment.bin
```