Pywafo base libaries

192 views
Skip to first unread message

tomward

unread,
Feb 2, 2011, 12:33:29 AM2/2/11
to wafo
Hello Per Brodtkorb,

great to see you are translating WAFO to python.

Can you tell me what setup you are using?

I have some minor problems getting it all to compile and install, so I
will use the same version of PYTHON, libraries, OS etc that you are
using as a starting point.

by the way, have you thought of integrating WAFO with sagemath?

regards

Tom Ward

Per Andreas Brodtkorb

unread,
Feb 2, 2011, 2:52:45 AM2/2/11
to wa...@googlegroups.com
Currently I am using Python(x,y) 2.6.5.3 on windows platform to
develop wafo for Python.
The build process is not automated yet, you have to do some manual
compilation of some extensions written in c and fortran before running
the setup.py script.

To compile it on your platform you must first compile the extensions
by running this script:
http://code.google.com/p/pywafo/source/browse/trunk/pywafo/build_all.py

That script walks through the subfolders of wafo/source and build the
extensions by running these build scripts:

http://code.google.com/p/pywafo/source/browse/trunk/pywafo/src/wafo/source/c_codes/build_all.py
http://code.google.com/p/pywafo/source/browse/trunk/pywafo/src/wafo/source/rind2007/build_all.py
http://code.google.com/p/pywafo/source/browse/trunk/pywafo/src/wafo/source/mvnprd/build_all.py
http://code.google.com/p/pywafo/source/browse/trunk/pywafo/src/wafo/source/mvn/build_all.py

and then move the compiled extensions to .../src/wafo.

Now you are ready to install pywafo using
http://code.google.com/p/pywafo/source/browse/trunk/pywafo/setup.py
by running:
python setup.py install

Then you may test the tutorialscripts found here:
http://code.google.com/p/pywafo/source/browse/trunk/pywafo/src/wafo/doc/tutorial_scripts/chapter1.py

I have not considered integrating WAFO with sagemath. The plan is to
make a stable standalone toolbox that covers most of the functionality
found in WAFO for matlab.
Then who knows what the future will bring.

Best regards Per A.

> --
> Du mottar denne meldingen fordi du abonnerer på Google-gruppen «wafo».
> Hvis du vil legge inn en melding i denne gruppen, kan du sende e-post til wa...@googlegroups.com.
> Hvis du vil avslutte abonnementet på denne gruppen, sender du en e-post til wafo+uns...@googlegroups.com.
>  Hvis du vil ha flere alternativer, kan du besøke gruppen på http://groups.google.com/group/wafo?hl=no.
>
>

tomward

unread,
Feb 2, 2011, 4:03:48 AM2/2/11
to wafo
Thanks Per,

1.
I will have a go later in the week/ next week. I assume I will need a
fortran and C compiler as well. Which one do you use?

2.
For info;
2.1
build_all.py works on Ubuntu 10.10 after doing the following
for f in pywafo/src/wafo/source/*/build_all.py ; do sed -e 's/f2py.py/
f2p/g' $f >.tmp ; mv -f .tmp $f ; done

2.2
python setup.py develop appears to work on Ubuntu 10.10 with python
2.6.6

2.3
/pywafo-read-only/pywafo/src/wafo/doc/tutorial_scripts/chapter1.py
works after changing line 44 of wafo-0.1.2-py2.6.egg/wafo/objects.py
from
from scipy.signal.windows import parzen
to
from scipy.signal import parzen

It displays the Torsethaugen spectrum and warns about divide by zero
errors and then fails when passing something to your rind program

don't worry about investigating , I will run it on windows with
Python(x,y) and try to trace the error myself next week.

regards

Tom Ward

On Feb 2, 7:52 am, Per Andreas Brodtkorb
<per.andreas.brodtk...@gmail.com> wrote:
> Currently I am using Python(x,y) 2.6.5.3 on windows platform to
> develop wafo for Python.
> The build process is not automated yet, you have to do some manual
> compilation of some extensions written in c and fortran before running
> the setup.py script.
>
> To compile it on your platform you must first compile the extensions
> by running this script:http://code.google.com/p/pywafo/source/browse/trunk/pywafo/build_all.py
>
> That script walks through the subfolders of wafo/source and build the
> extensions by running these build scripts:
>
> http://code.google.com/p/pywafo/source/browse/trunk/pywafo/src/wafo/s...http://code.google.com/p/pywafo/source/browse/trunk/pywafo/src/wafo/s...http://code.google.com/p/pywafo/source/browse/trunk/pywafo/src/wafo/s...http://code.google.com/p/pywafo/source/browse/trunk/pywafo/src/wafo/s...
>
> and then move the compiled extensions to .../src/wafo.
>
> Now you are ready to install pywafo using
>      http://code.google.com/p/pywafo/source/browse/trunk/pywafo/setup.py
> by running:
>      python setup.py install
>
> Then you may test the tutorialscripts found here:http://code.google.com/p/pywafo/source/browse/trunk/pywafo/src/wafo/d...
>
> I have not considered integrating WAFO with sagemath. The plan is to
> make a stable standalone toolbox that covers most of the functionality
> found in WAFO for matlab.
> Then who knows what the future will bring.
>
> Best regards Per A.
>

Per Andreas Brodtkorb

unread,
Feb 2, 2011, 5:39:08 AM2/2/11
to wa...@googlegroups.com
I use the compiler bundled with Python(x,y) which is MingW.

David Verelst

unread,
Feb 2, 2011, 10:45:57 AM2/2/11
to wa...@googlegroups.com
Hi,

I just made a commit on the google code page (r77) with some very modest changes
so the necessary source files can also be compiled on Linux (included
.so files are
compiled on Ubuntu 10.04 64bit system).

Building these source files is not yet included in the general
build_all.py script.
Currently, on linux the f2py is called via f2py2.6, which is not a very robust
approach, since on different systems it might called differently.

Any suggestions on making this approach more generic on Linux is welcome.

Regards,
David

On 2 February 2011 11:39, Per Andreas Brodtkorb

Per Andreas Brodtkorb

unread,
Feb 2, 2011, 1:11:28 PM2/2/11
to wa...@googlegroups.com
---------- Forwarded message ----------
From: David Verelst <david....@gmail.com>
Date: 2 February 2011 18:12
Subject: Re: [wafo: 14] Re: Pywafo base libaries
To: Per Andreas Brodtkorb <per.andrea...@gmail.com>


correction: building these source files is not included in the
setup.py build (previously mistaken with build_all.py), which was also
noted by Per in the previous mails.

On 2 February 2011 18:11, Per Andreas Brodtkorb
<per.andrea...@gmail.com> wrote:
> This is great. Thank you.
>
> Per A.

David Verelst

unread,
Feb 5, 2011, 5:32:11 AM2/5/11
to wa...@googlegroups.com
The f2py call is now determined in a more robust way. This new
approach should work on both windows and posix systems. Tested on
windows sever 2003 32bit and linux 64bit.

On 2 February 2011 19:11, Per Andreas Brodtkorb

Per Andreas Brodtkorb

unread,
Feb 5, 2011, 5:37:53 AM2/5/11
to wa...@googlegroups.com
Excellent!
Reply all
Reply to author
Forward
0 new messages