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

Home » Public Forums » archive » Re: atan in IDL 5.5
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: atan in IDL 5.5 [message #31049] Tue, 04 June 2002 09:13 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Zoe Dent <zoe@aurora.york.ac.uk> writes:

> --------------1F130981AB8092C521F2309C
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> I'm having problems with the 'atan' function in IDL 5.5. I have a
> program which reads in an array of complex numbers, so an array of
> single numbers should be produced, but in fact another complex array os
> produced. At the command-line the atan of a set of complex numbers
> produces a single number. I have disabled the multi-threading option
> with no effect. I'd appreciate any advice on this matter.

Right, I used to rely on this too, but RSI made this change pretty
obvious in their release notes, as the others have pointed out. It's
a pity since the original ATAN behavior will be faster than the new
way to do it. That's why I use the following utility function,
ZCOMPARG. I set it and forget it.

Craig



function zcomparg, z

forward_function atan, real_part, imaginary
common zcomparg_common, atanver
if n_elements(atanver) EQ 0 then begin
if !version.release LT '5.5' then atanver = 1 $
else atanver = 2
endif

if atanver EQ 1 then return, atan(z) $
else return, atan(imaginary(z), real_part(z))

end

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: atan in IDL 5.5
Next Topic: Re: Structure reforming

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

Current Time: Fri Oct 10 13:03:54 PDT 2025

Total time taken to generate the page: 0.72218 seconds