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

Home » Public Forums » archive » Re: this might be a stupid question
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: this might be a stupid question [message #48193] Thu, 06 April 2006 15:37 Go to next message
ChiChiRuiz@gmail.com is currently offline  ChiChiRuiz@gmail.com
Messages: 32
Registered: October 2005
Member
thanks a lot, i'll try that. I think you're right about the problem.
I do see the axes, but no points plotted...maybe they're just too small
to see.

-Angie
Re: this might be a stupid question [message #48196 is a reply to message #48193] Thu, 06 April 2006 15:22 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> If I run this with the default ORB radius of 0.015, the orbs
> are too small to be seen. If I change the ORB radius to 0.5,
> then I see the data, but the orbs looks like tiny sausages
> instead of orbs.

Whoops! This should have read "3.5", not "0.5".

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: this might be a stupid question [message #48197 is a reply to message #48196] Thu, 06 April 2006 15:18 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Just for kicks, I'd change the ORB radius in Scatter_Surface
> and hope you see something with your data. The BIG problem with
> object graphics is that *everything* is possible, including all
> those things that are dumb, stupid, or just plain useless.
> Change it by at least an order of magnitude or so. If you change
> it enough, we might begin to get a clue to what is going on.

Here is an example of what I mean:

PRO main
x = Scale_Vector(Randomu(seed, 50), 35, 70)
y = Scale_Vector(Randomu(seed, 50), -50, 50)
z = Randomu(seed, 50)* 100
scatter_surface, x, y, z
END

If I run this with the default ORB radius of 0.015, the orbs
are too small to be seen. If I change the ORB radius to 0.5,
then I see the data, but the orbs looks like tiny sausages
instead of orbs. Sigh... Go figure. Better ask one of the
iTool experts. They probably have an idea.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: this might be a stupid question [message #48200 is a reply to message #48197] Thu, 06 April 2006 15:11 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ChiChiRuiz@gmail.com writes:

> here's how i code it
>
> pro main
> open/read files
> get x, y, z arrays
> scatter_surface, x, y, z
> end
>
> when i run main.pro, it did not work, but when i go to command prompt
> IDL> scatter_surface
> it works fine

Ah, well, one always hopes it works with the example data. :-)

Now, with *real* data you begin to appreciate the complexities
of object graphics. I'd guess that the radius of the orbs is
going to be tied, somehow, to the data range. If you use
a data range dissimilar to the one I used in the
example, it is possible that the orb shrinks to such a small
size you can't see it, or to such a large size that you are
inside it. In either case, you are probably hosed.

Just for kicks, I'd change the ORB radius in Scatter_Surface
and hope you see something with your data. The BIG problem with
object graphics is that *everything* is possible, including all
those things that are dumb, stupid, or just plain useless.
Change it by at least an order of magnitude or so. If you change
it enough, we might begin to get a clue to what is going on.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: this might be a stupid question [message #48201 is a reply to message #48200] Thu, 06 April 2006 14:59 Go to previous messageGo to next message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
ChiChiRuiz@gmail.com wrote:
> here's how i code it
>
> pro main
> open/read files
> get x, y, z arrays
> scatter_surface, x, y, z
> end
>
> when i run main.pro, it did not work, but when i go to command prompt
> IDL> scatter_surface
> it works fine
>
You need to step through the code in the debugger and see what's going
on. Have you used the IDL debugger? The one built into the IDL
development environment in Windows is very good.

--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: this might be a stupid question [message #48202 is a reply to message #48201] Thu, 06 April 2006 14:53 Go to previous messageGo to next message
ChiChiRuiz@gmail.com is currently offline  ChiChiRuiz@gmail.com
Messages: 32
Registered: October 2005
Member
here's how i code it

pro main
open/read files
get x, y, z arrays
scatter_surface, x, y, z
end

when i run main.pro, it did not work, but when i go to command prompt
IDL> scatter_surface
it works fine
Re: this might be a stupid question [message #48203 is a reply to message #48202] Thu, 06 April 2006 14:43 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ChiChiRuiz@gmail.com writes:

> Hi David, i have to generate a ROI to get the values of each parameter
> from this same pixel.
>
> so i have a general .pro
>
> pro main
>
> open files
> read files
>
> get x, y, z, each is an array with size n
>
> scatter_surface, x, y, z
>
> end

Are you saying that if you call the program like this
that it works?

pro main, x, y, z
open files
read files
get x, y, z, each is an array with size n
end

IDL> main, x, y, z
IDL> scatter_surface, x, y, z

And, how are you drawing the ROI?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: this might be a stupid question [message #48204 is a reply to message #48203] Thu, 06 April 2006 14:33 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ChiChiRuiz@gmail.com writes:

> pro main
>
> open files
> read files
>
> get x, y, z, each is an array with size n
>
> scatter_surface, x, y, z
>
> end
>
> can i call a pro inside a pro??

Uh, I'd have to check, but I *think* so. :-)

Cheers,

David

P.S. Let's just say IDL programs would be pretty
sparse if we couldn't call procedures and functions
from within them!

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: this might be a stupid question [message #48205 is a reply to message #48204] Thu, 06 April 2006 14:25 Go to previous messageGo to next message
ChiChiRuiz@gmail.com is currently offline  ChiChiRuiz@gmail.com
Messages: 32
Registered: October 2005
Member
Hi David, i have to generate a ROI to get the values of each parameter
from this same pixel.

so i have a general .pro

pro main

open files
read files

get x, y, z, each is an array with size n

scatter_surface, x, y, z

end

can i call a pro inside a pro??
Re: this might be a stupid question [message #48206 is a reply to message #48205] Thu, 06 April 2006 14:18 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ChiChiRuiz@gmail.com writes:

> I'm just getting pretty frustrated... I'm using David's scatter_surface
> procedure that does 3D scatter plot. I've modifed the colors and shape
> of the plot directly, and works great when i call it manually from the
> command prompt. But when i include the procedure inside another
> procedure (to get the desired x, y, and z values) like calling a
> function, the plot didn't show any data point. Could somebody point me
> the right way to approach this??

Are you by any chance calling this program from a blocking
widget program? It sounds to me like events are not getting
generated for some reason.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: this might be a stupid question [message #48341 is a reply to message #48193] Thu, 06 April 2006 15:43 Go to previous message
ChiChiRuiz@gmail.com is currently offline  ChiChiRuiz@gmail.com
Messages: 32
Registered: October 2005
Member
yah,...it did work when i increase the orb radius...but not it doesn't
look orb-link...more like candy canes...
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Curvefit issues
Next Topic: this might be a stupid question

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

Current Time: Wed Oct 08 18:39:01 PDT 2025

Total time taken to generate the page: 0.00596 seconds