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

Home » Public Forums » archive » help needed to make the program run faster
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: help needed to make the program run faster [message #93623 is a reply to message #93621] Fri, 09 September 2016 07:35 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Friday, September 9, 2016 at 2:04:57 AM UTC-4, sid wrote:
> Hi all,
> I need to read 500 fits files and do analysis for all this,
>
> So im doing like this,
>
> file=file_search('*.fts')
> nn=n_elements(file)
> for ii=0,nn-1 do begin
> img=readfits(file(ii),h)
> ----
> ---some analysis----
>
> endfor
> end
>
> in the analysis part also i have some for loops so the program takes so much time to process this job.
>
> So can anybody let me know whether any other faster methods are there to do this.

This part of the loop should take very little. Try it yourself. Just remove the "analysis" part, and keep the FOR loop and READFITS() parts. You should see it completes pretty quickly. Or if it doesn't, it means you have a lot of data, and you will have to live with it (or get a faster computer and/or hard drive).

This will help you focus your efforts on the analysis parts. There, of course, you will want to vectorize as much as possible.

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TS_HANTS function question
Next Topic: Need e-book of Image Analysis, Classification and Change Detection in Remote Sensing: With Algorithms for ENVI/IDL and Python by Mort Canty

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

Current Time: Fri Oct 10 06:53:41 PDT 2025

Total time taken to generate the page: 0.44328 seconds