Re: black window on fsc_surface & fsc_surface_log? [message #40549 is a reply to message #40472] |
Wed, 11 August 2004 13:00  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
BG writes:
> 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.
Oh, dear. :-(
> 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.
Well, variables have "scope" inside the procedure or function
where they are created. They can't be seen from outside that
scope. (If this weren't the case, we would have to have different
names for *every* variable we created in IDL! An anal person's
nightmare, to be sure!)
> 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.
Yes, take the STOPs out and leave them out. Learn
how to put a breakpoint in your code, if and when you
really need to. :-)
> 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.
Yeah, I've never been able to figure out GRIDDATA either.
Maybe Mr. Tupper can fill us both in. I do notice that
the examples RSI provides don't bother with such extravagances
as the X and Y vectors either. Wonder if there is a reason
for that. :-)
I guess you could try something like this. Whether
this is *accurate* or not, I just don't know.
s = Size(griddedData, /Dimensions)
xx = Scale_Vector(Findgen(s[0]), Min(x), Max(x))
yy = Scale_Vector(Findgen(s[1]), Min(y), Max(y))
FSC_Surface, griddedData, xx, yy, Position=[0,1,0,1,0,1]
You might have a look at the DELTA keyword to GRIDDATA, too.
I thought you were using the equivalent in an earlier try
with TRIGRID.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|