comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Faster Astronomy Library Routines
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Faster Astronomy Library Routines [message #78942] Sat, 07 January 2012 06:48
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I just wanted to update you on a couple of things Wayne
and I have been doing with Astronomy Library routines.
As you know, the plotting routines in this library are
now using Coyote Graphics routines. We have had reports
that some of these routines, namely PlotError and
OPlotError, have been slow when there are large numbers
of error bars to plot.

Slowness in Coyote Graphics routines comes about for the
same reason Function Graphics routines are slow: there is
a lot of code to wade through before you get to the heart
of the matter. In these routines, for example, the problem
was that we initially "converted" these routines to
Coyote Graphics routines by simply replacing every PlotS
command with a cgPlotS command. That added a LOT of overhead.

To give you an example, doing a PlotError command with 4096
data points took about 20 seconds to execute.

But, this is not the optimal way to convert a routine to
a Coyote Graphics routine. The optimal way to do it is so
embarrassingly simple I am reluctant to mention it, for
fear of reducing book sales even further. It is simply to
put yourself in decomposed color and use cgColor to specify
all your colors. That's really about the extent of it!

Anyway, in the past couple of days, Wayne and I have
rewritten PlotError and OPlotError with these principles
in mind, and the same example that took 20 seconds to plot
now takes less than 0.5 seconds to plot.

I'm planning an article that will outline some of these
conversion principles in more detail. But, I point out that
this is *exactly* what my book, Coyote's Guide to Traditional
IDL Graphics, is designed to help you do. Write better
graphics code that is close to the machine and extremely
fast.

Anyway, if you use these two routines (and who doesn't!),
then you will want to pick up the latest versions:

http://idlastro.gsfc.nasa.gov/news.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Calling all ENVI users
Next Topic: Re: IDLDoc questions:

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 08:27:46 PDT 2025

Total time taken to generate the page: 0.88127 seconds