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

Home » Public Forums » archive » Fitting plasma waveforms with 10^6 variable combos!
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: Fitting plasma waveforms with 10^6 variable combos! [message #93958 is a reply to message #93954] Wed, 07 December 2016 05:24 Go to previous messageGo to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
I suggest you to parallelize your code using the CPU_Process_Manager library
https://github.com/bernatp3rs/idl_cpu_pm

It will be fast and easy to adapt your code to the library. A couple of suggestions more:

- Change your multiplications to something like:
for ta = 0.0001D, 0.0009D, 0.0001D do begin ;; I think it should work
- It seems that IDL is much faster when you use for ... do for ... do for .. instead of for ..... do begin for .... do begin
check http://www.idlcoyote.com/tips/forloops2.html for more details
- delete the line "newtime = new_time[n]". it is not neeeded, pass newtime[n] to the functions fun_ant and fun_bod
- Put "Lag_mf = 25" outside of all loops
- Use the keyword /double in c_correlate instead of using the function double() afterwards
- Bring this line "mf_hits[a,mf_max_loc-103:mf_max_loc+500]" to the first loop, something like mf_hits_cur=mf_hits[a,mf_max_loc-103:mf_max_loc+500] and then use this temporary variable mf_hits_cur in the c_correlate function

I think that's all for now. I think that my last suggestion is the most important. Your code will be improved for sure!
Cheers,
nata
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: ncdf global attribute exists function
Next Topic: For..Do loop. IDL Beginner

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

Current Time: Wed Oct 08 13:47:21 PDT 2025

Total time taken to generate the page: 0.00440 seconds