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

Home » Public Forums » archive » Re: How to rebin complex array?
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: How to rebin complex array? [message #39021 is a reply to message #39019] Tue, 13 April 2004 17:47 Go to previous messageGo to previous message
Peter Mason is currently offline  Peter Mason
Messages: 145
Registered: June 1996
Senior Member
Yunxiang Zhang wrote:
> Folks,
>
> I wanna do the following thing as fast as possible.
>
> ;creat a complex array
> a=complexarr(na)
> ;replicate the array k times
> b=rebin(a,na,k)
>
> But rebin won't accept complex array. :( What should I do?


Further to what Mark has written, if this *really* is what you want to do
and if you can live with REBIN's /SAMPLE option (which is faster than its
default bilinear interpolation anyway), then you might try something like
the following:
d=double( a, 0, na )
r=rebin( temporary(d), na, k, /SAMPLE )
b=complex( temporary(r), 0, na, k )
Of course, this'll only work for single-precision complex "a". (8 bytes
per value, same as "non-complex" double precision.)

Peter Mason
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: reading pixels from images from automated XYpositions
Next Topic: Re: Read & write data files b/w IDL & Fortran 90

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

Current Time: Wed Oct 08 17:32:31 PDT 2025

Total time taken to generate the page: 0.00387 seconds