[AstroPy] TAN WCS speedup

Erik Bray embray at stsci.edu
Thu Nov 13 16:09:50 EST 2014


On 11/13/2014 04:05 PM, Nadezhda Dencheva wrote:
> I just want to mention that some of the projections in WCS Paper II are
> implemented in astropy.modeling.projections.

They're probably not very fast though, but at least they are designed more or 
less to accept drop-in replacements for the actual algorithm (say, using numexpr 
or Cython or the like).  It has definitely been a todo-list item to provide more 
efficient implementations of these transforms, albeit possibly on an as-needed, 
optional basis.

> ________________________________________
> From: astropy-bounces at scipy.org [astropy-bounces at scipy.org] on behalf of Maik Riechert [maik.riechert at arcor.de]
> Sent: Thursday, November 13, 2014 3:43 PM
> To: Astronomical Python mailing list
> Subject: [AstroPy] TAN WCS speedup
>
> Hi,
>
> I just finished implementing my own wcs_pix2world function specifically
> for the TAN projection using just Python with numpy and numexpr. Without
> numexpr I was slightly slower than astropy (15s vs 12.8s). But with
> numexpr I got it down to 6.8s, so nearly twice as fast. This is for 8
> million pixel coordinates as input run on my 2GHz Core 2 Duo Laptop
> under Python 2.7 64 bit with Windows 7 and using Christoph Gohlke's
> numpy and numexpr binaries.
>
> I cannot post the code yet but the code is not that important anyway as
> I didn't do really complicated things.
>
> As numexpr seems to provide the main speedup, maybe some concepts of it
> could be used to speedup astropy/wcslib. I guess it's not a sensible
> option to actually implement all of wcslib in Python, given that there
> are way more complicated projections etc. than TAN which would take
> quite some time to reimplement/maintain.
>
> This is basically it, just wanted to share that.
>
> Cheers
> Maik
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>




More information about the AstroPy mailing list