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

Home » Public Forums » archive » Re: help on optimization
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 on optimization [message #76684 is a reply to message #76683] Thu, 23 June 2011 05:47 Go to previous messageGo to previous message
Wout De Nolf is currently offline  Wout De Nolf
Messages: 194
Registered: October 2008
Senior Member
On Thu, 23 Jun 2011 14:44:06 +0200, Wox <spam@nomail.com> wrote:


> xgaspos=file_gaspos[0,*]
> ygaspos=file_gaspos[1,*]
>
> for i=0,nhalos do begin
> ;Distance of particles to the halo
> dis2=(xrand[i]-xgaspos)^2+(yrand[i]-ygaspos)^2
>
> ;histogram distances within 10Mpc
> hist =histogram(dis2[ind_gas],binsize=bin_mpc,$
> max=10000,reverse_indices=ri)
>
> gasmass=file_gasmass[ind_gas]
> for ll=0,n_elements(hist)-1 do $
> if ri[ll] eq ri[ll+1] then gasm[ll]=0 $
> else gasm[ll]=total(gasmass[ ri[ ri[ll]:ri[ll+1]-1 ] ])
>
> ymin_r_gas+=total(gasm,/cumul,/pres) ; Sigma(<r)
> yplot_gas+=gasm ; Sigma(r)
> endfor

This should be removed of course:
gasmass=file_gasmass[ind_gas]
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: help on optimization
Next Topic: New Graphics Reference Arrow

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

Current Time: Fri Oct 10 12:33:19 PDT 2025

Total time taken to generate the page: 0.88263 seconds