Re: Is there a fast Complex ATAN in IDL 5.5? [message #31729] |
Thu, 15 August 2002 22:14 |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
MKatz843@onebox.com (M. Katz) writes:
> I've avoided switching to IDL 5.5 for some time now because I use
> ATAN() to produce the phase of complex data. In my simple tests with
> IDL 5.4,
>
> ATAN(x) runs over 30% faster than
> ATAN(imaginary(x),float(x)).
Not to mention that it uses twice as much memory.
>
> I use ATAN() a great deal, and in real-time feedback applications with
> 512x512 arrays where time is important.
In principle the imaginary part of ALOG() can serve the same purpose,
and it does work. Unfortunately this is even slower than ATAN(imag,
real).
I am really bummed too that RSI didn't provide a decent replacement
function to compute the argument of a complex number when they changed
the ATAN functionality. I relied on it as well. It was very nifty!
Your next best option seems to be writing a DLM. Thinking about it,
30% may not be *that* big a price to pay versus writing a DLM... I
avoid DLMs at all costs.
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|