[AstroPy] AstroPy Digest, Vol 117, Issue 10

Bruno O. Sánchez bruno.sanchez.63 at gmail.com
Mon Jun 27 15:58:55 EDT 2016


Thanks!

You helped me a lot!

cheers,
Bruno

El vie., 24 jun. 2016 a las 14:21, <astropy-request at scipy.org> escribió:

> Send AstroPy mailing list submissions to
>         astropy at scipy.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://mail.scipy.org/mailman/listinfo/astropy
> or, via email, send a message with subject or body 'help' to
>         astropy-request at scipy.org
>
> You can reach the person managing the list at
>         astropy-owner at scipy.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of AstroPy digest..."
>
>
> Today's Topics:
>
>    1. fftw3 (Bruno O. S?nchez)
>    2. Re: fftw3 (Marshall Perrin)
>    3. Re: fftw3 (Jens Melinder)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 24 Jun 2016 15:17:22 +0000
> From: Bruno O. S?nchez <bruno.sanchez.63 at gmail.com>
> To: astropy at scipy.org
> Subject: [AstroPy] fftw3
> Message-ID:
>         <
> CACJJhJxNM_0n_iVYU2yERq6HaJn8HKtaiBcp4KgNW+V6HQ8fcQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello guys,
>
> I am an astronomer from C?rdoba Argentina, and I work a lot with astropy. I
> have been working on proper coaddition of images with spatially variant
> PSF, and I am currently using the convolution from astropy and scipy.
>
> I've encountered some perfomance issues, and noticed that there is some
> previous discussion on the settings of astropy.convolution.convolve fft
> engines.
>
> I wonder if any of you have succeded in setting a fftw3 engine for
> convolution, and if you have a snippet for using it. The fftw3 planning
> stage confuses me, and I can't find a documentation on pyfftw3.
>
> Any clues you can give me for this would be greatly appreciated!
>
> Bruno SANCHEZ
> Observatorio Astron?mico de C?rdoba
>
>
>
> --
> Bruno
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://mail.scipy.org/pipermail/astropy/attachments/20160624/7c13e811/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Fri, 24 Jun 2016 17:07:14 +0000
> From: Marshall Perrin <mperrin at stsci.edu>
> To: Astronomical Python mailing list <astropy at scipy.org>
> Subject: Re: [AstroPy] fftw3
> Message-ID: <6C0C14D7-D52F-4E6C-B19C-28C94C4802FA at stsci.edu>
> Content-Type: text/plain; charset="utf-8"
>
> Dear Bruno,
>
> We use pyfftw as an optional dependency in our poppy physical optics
> library.  Our application is for complex wavefront propagation rather than
> convolutions but it still shows how to use the library, including the
> planning setup which I agree is not that well explained. For example code
> you can look here:
> https://github.com/mperrin/poppy/blob/master/poppy/poppy_core.py
> https://github.com/mperrin/poppy/blob/master/poppy/utils.py
>
> Cheers,
>
>  - Marshall
>
>
> On Jun 24, 2016, at 11:17 AM, Bruno O. S?nchez <bruno.sanchez.63 at gmail.com
> <mailto:bruno.sanchez.63 at gmail.com>> wrote:
>
> Hello guys,
>
> I am an astronomer from C?rdoba Argentina, and I work a lot with astropy.
> I have been working on proper coaddition of images with spatially variant
> PSF, and I am currently using the convolution from astropy and scipy.
>
> I've encountered some perfomance issues, and noticed that there is some
> previous discussion on the settings of astropy.convolution.convolve fft
> engines.
>
> I wonder if any of you have succeded in setting a fftw3 engine for
> convolution, and if you have a snippet for using it. The fftw3 planning
> stage confuses me, and I can't find a documentation on pyfftw3.
>
> Any clues you can give me for this would be greatly appreciated!
>
> Bruno SANCHEZ
> Observatorio Astron?mico de C?rdoba
>
>
>
> --
> Bruno
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org<mailto:AstroPy at scipy.org>
> https://mail.scipy.org/mailman/listinfo/astropy
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://mail.scipy.org/pipermail/astropy/attachments/20160624/b20b0da9/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Fri, 24 Jun 2016 19:21:09 +0200
> From: Jens Melinder <jens at astro.su.se>
> To: Astronomical Python mailing list <astropy at scipy.org>
> Subject: Re: [AstroPy] fftw3
> Message-ID: <72822D4A-C97C-4D3E-AAC1-AAF3A8196EF9 at astro.su.se>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Bruno,
>
> I?m using this version of pyfftw:
> https://github.com/pyFFTW/pyFFTW <https://github.com/pyFFTW/pyFFTW>
> (There is another wrapper around as well, but that did not work for me).
> There are some problems building this inside a Ureka environment, but seems
> to be working fine in conda.
>
> This is well documented and works really well for me. In my testing I
> found this wrapper something like 3-4 times faster than the scipy/numpy
> fftw implementations (running on a single core, I?ve never gotten the
> hyperthreading to work with any of the FFTW implementations).
>
> The package also has a interfaces module that lets you use the pyfftw
> fftws inside a an astropy.convolution function call. Here is a code snippet
> from my code:
>
> import pyfftw
> from astropy.convolution import convolve_fft
> fftn=pyfftw.interfaces.numpy_fft.fftn
> ifftn=pyfftw.interfaces.numpy_fft.ifftn
>
> def fftwn(*dat):
>         return fftn(*dat,threads=1)
>
> def ifftwn(*dat):
>         return ifftn(*dat,threads=1)
>
> def conv(ima,kernel):
>     return convolve_fft(ima,kernel,boundary='wrap',fftn=fftwn,ifftn=ifftwn)
>
> You may not need the fftwn and ifftwn functions, if I remember correctly I
> only created those to be able to test the hyperthreading.
>
> Good luck!
>
> Cheers,
> Jens
>
>
>
>
> > 24 jun 2016 kl. 17:17 skrev Bruno O. S?nchez <bruno.sanchez.63 at gmail.com
> >:
> >
> > Hello guys,
> >
> > I am an astronomer from C?rdoba Argentina, and I work a lot with
> astropy. I have been working on proper coaddition of images with spatially
> variant PSF, and I am currently using the convolution from astropy and
> scipy.
> >
> > I've encountered some perfomance issues, and noticed that there is some
> previous discussion on the settings of astropy.convolution.convolve fft
> engines.
> >
> > I wonder if any of you have succeded in setting a fftw3 engine for
> convolution, and if you have a snippet for using it. The fftw3 planning
> stage confuses me, and I can't find a documentation on pyfftw3.
> >
> > Any clues you can give me for this would be greatly appreciated!
> >
> > Bruno SANCHEZ
> > Observatorio Astron?mico de C?rdoba
> >
> >
> >
> > --
> > Bruno
> > _______________________________________________
> > AstroPy mailing list
> > AstroPy at scipy.org
> > https://mail.scipy.org/mailman/listinfo/astropy
>
>
>
> -----------------------------------
> Jens Melinder
> Department of Astronomy
> Stockholm University
> jens at astro.su.se
> +46 706471856
>
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://mail.scipy.org/pipermail/astropy/attachments/20160624/df02cb70/attachment.html
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> https://mail.scipy.org/mailman/listinfo/astropy
>
>
> ------------------------------
>
> End of AstroPy Digest, Vol 117, Issue 10
> ****************************************
>
-- 
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20160627/abc8f9bc/attachment.html>


More information about the AstroPy mailing list