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

Home » Public Forums » archive » Re: How to speed up large FOR loops?
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 speed up large FOR loops? [message #79808 is a reply to message #79807] Tue, 10 April 2012 10:23 Go to previous messageGo to previous message
Saurav Dhital is currently offline  Saurav Dhital
Messages: 4
Registered: April 2012
Junior Member
David, I am NOT using the REFORM routine, which I now realize could be
my problem. Here is what I do:

;; combine two 2-d arrays ([N1,N2]) such that the output is
[2,N1,N2]
FUNCTION
form_3Darray,a1,a2
return, transpose([[[transpose(a1)]],
[[transpose(a2)]]])
END

I call this as:
>> x = [[x1],[x2],[x3]] & y = [[y1],[y2],[y3]]
> z = form_3Darray([[x]],[[y]])

I have to do this so I can store z in a single field in the FITS
structure.

Thanks,
~S

On Apr 10, 1:13 pm, David Fanning <n...@idlcoyote.com> wrote:
> Saurav Dhital writes:
>> Yes. More specifically, I reform arrays and assign them to the new
>> FITS structure. This happens a lot.
>
> Are you setting the OVERWRITE keyword on your REFORM
> command? You should be!
>
> 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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Creating netCDF file
Next Topic: How to speed up large FOR loops?

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

Current Time: Wed Oct 08 19:36:31 PDT 2025

Total time taken to generate the page: 0.00459 seconds