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

Home » Public Forums » archive » ARGHHHH Min_Curv_Surf !!!!!!!!!!!
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
ARGHHHH Min_Curv_Surf !!!!!!!!!!! [message #62823] Sun, 12 October 2008 11:05 Go to next message
plim.dreaming is currently offline  plim.dreaming
Messages: 22
Registered: February 2008
Junior Member
Greetings,
I am getting really frustrated here with this Min_curv_surf and would
seriously appreciate some help before I punch the monitor!!!!

My data is irregular, I have x,y,density arrays. I want to make
smoothed contours for this data. The data goes from [-11,95] for x,
[-37,155] for y.

So I do
R=min_curve_surf(density,x,y,nx=106,ny=192,bounds=[-11,-37,9 5,155])
But it refuses to plot contours for the data having negative values.

On top of the contours I am plotting the x,y, points so I can get a
comparison between data and contours. And they don't match in the
slightest.... It seems the scaling is off and the centering of the
contour map is off with respect to the data points.

I am not understanding the parameters "bounds" "gs" "nx, ny". I keep
playing with different values trying to figure it out but zilch!!!!
HELP!!!!!
Re: ARGHHHH Min_Curv_Surf !!!!!!!!!!! [message #62914 is a reply to message #62823] Sun, 12 October 2008 18:23 Go to previous message
ben.bighair is currently offline  ben.bighair
Messages: 221
Registered: April 2007
Senior Member
On Oct 12, 2:05 pm, plim.dream...@gmail.com wrote:
> Greetings,
> I am getting really frustrated here with this Min_curv_surf and would
> seriously appreciate some help before I punch the monitor!!!!
>
> My data is irregular, I have x,y,density arrays. I want to make
> smoothed contours for this data. The data goes from [-11,95] for x,
> [-37,155] for y.
>
> So I do
> R=min_curve_surf(density,x,y,nx=106,ny=192,bounds=[-11,-37,9 5,155])
> But it refuses to plot contours for the data having negative values.
>
> On top of the contours I am plotting the x,y, points so I can get a
> comparison between data and contours. And they don't match in the
> slightest.... It seems the scaling is off and the centering of the
> contour map is off with respect to the data points.
>
> I am not understanding the parameters "bounds" "gs" "nx, ny". I keep
> playing with different values trying to figure it out but zilch!!!!
> HELP!!!!!

Hi,

I wonder why you think it is MIN_CURVE_SURF that is the problem. You
don't provide enough info to know for sure, but my first guess is that
you are struggling with CONTOUR. Don't despair, you aren't alone.

My guess is that you need to explicitly tell CONTOUR where the
interpolated values lies. Something like following... (heads-up, uses
SCALE_VECTOR from David Fanning) contours into negative territory.
Note I used GRIDDATA instead of MIN_CURVE_SURF.

Cheers,
Ben



NX = 100
NY = 100
B=[-11.0,-37.0,95.0,155.0]

X = SCALE_VECTOR(RANDOMU(seed, NX), B[0], B[2])
Y = SCALE_VECTOR(RANDOMU(seed, NY), B[1], B[3])

Z = (x^2 + y^2) * (RANDOMU(seed, nx)/10)

GRID_INPUT, X, Y, Z, x1, y1, z1

r = GRIDDATA(x1, y1, z1, METHOD = "InverseDistance", $
START = B[[0,1]], DIMENSION = [nx,ny])


xx = FINDGEN(nx)/(nx-1) * (b[2]-b[0]) + b[0]
yy = FINDGEN(ny)/(ny-1) * (b[3]-b[1]) + b[1]

CONTOUR, r, xx, yy, XRANGE = B[[0,2]], YRANGE = B[[1,3]]
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Transpose(A)*P*A
Next Topic: Re: Range of "Spherical Coordinates" in SPHER_HARM

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

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

Total time taken to generate the page: 0.00537 seconds