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

Home » Public Forums » archive » Re: black window on fsc_surface & fsc_surface_log?
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: black window on fsc_surface & fsc_surface_log? [message #40470] Tue, 10 August 2004 13:28 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
BG writes:

> I would like to view the above surface plot using fsc_surface or
> fsc_surface_log instead of just using "surface", but all I get is a
> black screen when I try either of the following commands:
>
> fsc_surface, griddedData, xvector, yvector
> fsc_surface_log, griddedData, xvector, yvector
>
> So... in the above commands, is it correct to use the "griddedData"
> array as the 2d data array called by fsc_surface and fsc_surface_log??

Oh, probably. But FSC_SURFACE is trying to do something
clever (oh, I don't know why!) and may be having some
problems with "weird" data. Before I ruin the rest of
my day by asking for your data, try this:

fsc_surface, griddedData, xvector, yvector, $
position=[0,1,0,1,0,1]

Does anything show up now?

> btw, The 2D array, "griddedData" has lots of negative numbers? why is
> that, since none of my data are negative??? Is there a connection
> between black screen as output of fsc_surface and negative numbers?

I hope not. But sometimes this method of gridding can
be a bit of a disappointment. Have you tried GridData
as an alternative?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: black window on fsc_surface & fsc_surface_log? [message #40550 is a reply to message #40470] Wed, 11 August 2004 12:16 Go to previous message
u2s5thmember is currently offline  u2s5thmember
Messages: 11
Registered: January 2004
Junior Member
David, Your fsc_surface code is Great! I know it's me doing
something incorrectly. Here's what I did which was incompatible with
fsc_surface which produced the black window:

I usually put the word "stop" just before the word "end" in my code,
which allows me to examine or work with the variables after running my
code. If I take out the word "stop", idl doesn't seem to remember any
of the variables it just used, i.e. it says all my variables are now
undefined.

If I remove the word "stop" from my code (I just read I could type
".con" instead), fsc_surface loads correctly and produces a plot. I'm
not certain I have the correct plot yet though.


I do have a question re: GridData vs. Triangulate/TriGrid:

For some reason using Triangulate/TriGrid produces negative z axis
data, when it should range from 1e-3 to 1, so I'll *have* to figure
out GridData. Here's the problem with that:

TriGrid offers the [XGrid=variable], [YGrid=variable] options, so when
I run the above code and then call

fsc_surface, griddedData, xvector, yvector

the DATAX array size matches the Z data size. This part is good, but
if I do this instead:

griddedData=GridData(x, y, z, dimension=163
or
griddedData=GridData(x, y, z, dimension=163, $
/GRID, xout=x, yout=y)

and then:

fsc_surface, griddedData, x, y, position=[0,1,0,1,0,1]
or
fsc_surface, griddedData, position=[0,1,0,1,0,1]

I get either 1) an error message saying the x & y arrays don't match
griddedData or 2) fsc_surface plots the array indices on the x- and
y-axes and not my actual x & y data.

Do I need to TriGrid after calling GridData???
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Free_lun ALL
Next Topic: Re: Passing Structures with Pointers with Call_External

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

Current Time: Wed Oct 08 19:49:34 PDT 2025

Total time taken to generate the page: 0.00654 seconds