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

Home » Public Forums » archive » Re: array convol optimizationv slow now
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: array convol optimizationv slow now [message #67282] Mon, 13 July 2009 16:53 Go to next message
Chris[6] is currently offline  Chris[6]
Messages: 84
Registered: July 2008
Member
On Jul 13, 1:26 pm, David Fanning <n...@dfanning.com> wrote:
> newerjazz writes:
>> each particle is a single molecule of protein; we need to visualize
>> all the proteins to get meaningful interpretation.
>
> How does that work? If I put 100 million dots on my screen, things
> get a little blurry. (Of course, my eyes aren't what they used to
> be, admittedly.)
>
>> do you have any suggestions of getting the x,y locations on the image
>> w/ an array operation instead of a for loop?
>
> No, I can't think of any way to do this an an array. :-(
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

I've written a routine called densitymap which makes smoothed surface
density maps based on the position of 2d sources. You might want to
check it out (it has been moderately debugged)

http://www.ifa.hawaii.edu/users/beaumont/code/

It uses a different smoothing scheme (it uses the distance to each
pixel's n-th nearest neighbor to estimate the surface density).

If you use it, you should probably download the IDL astronomy user's
library, as well as
http://www.ifa.hawaii.edu/~beaumont/code/beaumont_library.ta r
to avoid dependency issues.

Otherwise, you could use hist_2d to pixellate the locations of each
point, and then convolve the histogram with a gaussian

Chris
Re: array convol optimizationv slow now [message #67284 is a reply to message #67282] Mon, 13 July 2009 16:26 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
newerjazz writes:

> each particle is a single molecule of protein; we need to visualize
> all the proteins to get meaningful interpretation.

How does that work? If I put 100 million dots on my screen, things
get a little blurry. (Of course, my eyes aren't what they used to
be, admittedly.)

> do you have any suggestions of getting the x,y locations on the image
> w/ an array operation instead of a for loop?

No, I can't think of any way to do this an an array. :-(

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: array convol optimizationv slow now [message #67285 is a reply to message #67284] Mon, 13 July 2009 16:10 Go to previous messageGo to next message
newerjazz is currently offline  newerjazz
Messages: 5
Registered: July 2009
Junior Member
Thanks David,

each particle is a single molecule of protein; we need to visualize
all the proteins to get meaningful interpretation.

i can look at 1/10 of the particles by reducing the field of view but
it's still slow.

do you have any suggestions of getting the x,y locations on the image
w/ an array operation instead of a for loop?

Thanks!

newerjazz

On Jul 13, 3:57 pm, David Fanning <n...@dfanning.com> wrote:
> newerjazz writes:
>> I have an array of [2,100,000,000] corresponding to x, y and
>> 100,000,000 particles. I need to render these particles as gasussian
>> spots at x, y locations
>
>> Currently, I run a for loop through each particle and render each
>> particle in this for loop; it takes forever.
>
> Not to mention it probably takes a display screen
> the size of a city block to render the mess in
> the kind of resolution that allows you to actually
> make something of it.
>
> Have you tried plotting a few hundred (maybe even
> a few thousand) random points to see if you can draw
> the same conclusions you were drawing by plotting all
> the points?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: array convol optimizationv slow now [message #67286 is a reply to message #67285] Mon, 13 July 2009 15:57 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
newerjazz writes:

> I have an array of [2,100,000,000] corresponding to x, y and
> 100,000,000 particles. I need to render these particles as gasussian
> spots at x, y locations
>
> Currently, I run a for loop through each particle and render each
> particle in this for loop; it takes forever.

Not to mention it probably takes a display screen
the size of a city block to render the mess in
the kind of resolution that allows you to actually
make something of it.

Have you tried plotting a few hundred (maybe even
a few thousand) random points to see if you can draw
the same conclusions you were drawing by plotting all
the points?

Cheers,

David

--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: array convol optimizationv slow now [message #67370 is a reply to message #67282] Tue, 14 July 2009 08:31 Go to previous message
newerjazz is currently offline  newerjazz
Messages: 5
Registered: July 2009
Junior Member
Thanks Chris,

I will try hist_2d to see if it helps.

Dave, we know the x,y position down to subpixel resolution; so instead
of say plotting particles on a 512x512 grid; we plot it on 5120x5120
grid (if our resolution is 1/10 of a pixel). In practice our
resolution is down to 1/100th of a pixel. Depending on how many
particles are packed into a pixel or a voxel since I actually have z
resolution too; the image can look either sharp or blur.

cheers,
newerjazz

On Jul 13, 4:53 pm, Chris <beaum...@ifa.hawaii.edu> wrote:
> On Jul 13, 1:26 pm, David Fanning <n...@dfanning.com> wrote:
>
>
>
>> newerjazz writes:
>>> each particle is a single molecule of protein; we need to visualize
>>> all the proteins to get meaningful interpretation.
>
>> How does that work? If I put 100 million dots on my screen, things
>> get a little blurry. (Of course, my eyes aren't what they used to
>> be, admittedly.)
>
>>> do you have any suggestions of getting the x,y locations on the image
>>> w/ an array operation instead of a for loop?
>
>> No, I can't think of any way to do this an an array. :-(
>
>> Cheers,
>
>> David
>> --
>> David Fanning, Ph.D.
>> Coyote's Guide to IDL Programming (www.dfanning.com)
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
> I've written a routine called densitymap which makes smoothed surface
> density maps based on the position of 2d sources. You might want to
> check it out (it has been moderately debugged)
>
> http://www.ifa.hawaii.edu/users/beaumont/code/
>
> It uses a different smoothing scheme (it uses the distance to each
> pixel's n-th nearest neighbor to estimate the surface density).
>
> If you use it, you should probably download the IDL astronomy user's
> library, as well ashttp://www.ifa.hawaii.edu/~beaumont/code/beaumont_library. tar
> to avoid dependency issues.
>
> Otherwise, you could use hist_2d to pixellate the locations of each
> point, and then convolve the histogram with a gaussian
>
> Chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Contour lines are disappearing
Next Topic: file_info not detecting write-protected files under windows (bug?)

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

Current Time: Fri Oct 10 10:24:55 PDT 2025

Total time taken to generate the page: 1.99937 seconds