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

Home » Public Forums » archive » Re: Minimum curvature surface problem
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: Minimum curvature surface problem [message #32579] Tue, 22 October 2002 10:16
Med Bennett is currently offline  Med Bennett
Messages: 109
Registered: April 1997
Senior Member
Med Bennett wrote:

> James Kuyper wrote:
>
>> Med Bennett wrote:
>>>
>>> I'm having a problem using the min_curve_surf function. I am feeding it
>>> data where X and Y are in UTM coordinates (like 650000, 4073500) and Z
>>> ranges from 0.25 to 27,300. The result from min_curve_surf in IDL is a
>>> paraboloid looking surface with a minimum of 2.4E+10 and a max of
>>> 1.2E+15. Needless to say, this is dramatically wrong. I also tried
>>> subtracting off the minimums from the X and Y values to reduce the
>>> number of sig figs, but this does not seem to help. I can compute a
>>> minimum curvature surface with the same data in another software package
>>> (Surfer, Golden Software) and it gives me a reaasonable result. What's
>>> wrong with the IDL implementation, or what am I doing wrong?
>>
>> If you're plotting geo-referenced data covering a significant portion of
>> the Earth, then you should probably be using the /SPHERE keyword. If you
>> are using /SPHERE, then X and Y need to be latitude and longitude in
>> degrees, rather than UTM coordinates.
>>
>> Other than that, I can't think of anything obvious. It might help to
>> post your code.
>
> Hi James,
>
> The area in question is only 4000 meters east-west and 2000 meters
> north-south, so I don't think the earth's curvature is a problem. My code is
> really just the command
>
> mcs = min_curve_surf(cddata,cx,cy,xout=xax,yout=yax)
>
> where xax and yax are just the grid definition. My data looks like
>
> IDL> for i=0,57 do print,cddata[i],cx[i],cy[i]
> 2.50000 654388.42 4074227.3
> 2.50000 653843.10 4074772.3
> 2.50000 653290.98 4074706.9
> 2.50000 653323.82 4075362.3
> 2.50000 653851.11 4074328.6
> 2.50000 653848.19 4073995.6
> 0.250000 653290.04 4074263.0
> 2.50000 653305.74 4073885.9
> 35.6000 652827.10 4074199.2
> 2.50000 652820.14 4074587.5
> 2.50000 652750.34 4074996.8
> 2.50000 652349.49 4074956.4
> 73.1000 652244.41 4074843.5
> 1630.00 652355.23 4074634.6
> 664.000 652379.22 4074291.0
> 1990.00 652375.85 4073980.2
> 2.50000 652046.13 4073952.2
> 3000.00 652031.08 4074295.9
> 151.000 652034.06 4074628.9
> 1230.00 651699.00 4074401.0
> 2.50000 651713.84 4074068.3
> 8830.00 652951.30 4073778.5
> 5.00000 653031.97 4073758.4
> 186.000 651272.11 4074506.6
> 3690.00 651429.43 4074507.6
> 20100.0 651464.52 4074536.9
> 3500.00 651552.10 4074610.7
> 2770.00 651545.20 4074794.1
> 93.7000 651540.86 4075159.0
> 2.50000 650900.82 4074493.5
> 11600.0 652630.78 4073856.0
> 24500.0 652701.20 4073805.4
> 14100.0 652717.04 4073748.5
> 27300.0 652619.43 4073929.3
> 251.000 651228.38 4074786.7
> 11200.0 651343.95 4074680.8
> 2.50000 652661.85 4073649.9
> 9.10000 652528.42 4073788.9
> 2.50000 652527.30 4073773.8
> 2350.00 652648.33 4073675.5
> 2080.00 652648.17 4073683.7
> 12.3000 652647.31 4073705.1
> 2.50000 652704.45 4073637.8
> 2.50000 652706.39 4073645.0
> 2.50000 652706.39 4073645.0

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad!

>
> 2.50000 652796.01 4073604.5
> 2.50000 652978.58 4073553.7
> 3600.00 652700.44 4073719.5
> 10300.0 652772.18 4073722.6
> 4900.00 653065.91 4073832.9
> 0.600000 653198.66 4073806.5
> 13900.0 651645.66 4074401.0
> 5.00000 651053.48 4075268.2
> 5.00000 650699.44 4075252.1
> 5.00000 650653.14 4074709.0
> 670.000 651331.96 4075131.0
> 1630.00 651127.30 4074695.9
> 20.0000 650907.27 4075118.6
>
> I'd be happy to mail a couple of gif's illustrating the results if you're
> interested. Thanks, Med

How embarassing - it appears that the one duplicate X,Y data point I had in my
arrays was causing min_curve_surf to blow up. Not the first time I've tripped
up by @#$&* duplicates! These are analytical chemistry data and they often have
duplicate analyses from the same location. sorry sorry sorry - M
Re: Minimum curvature surface problem [message #32580 is a reply to message #32579] Tue, 22 October 2002 09:56 Go to previous message
Med Bennett is currently offline  Med Bennett
Messages: 109
Registered: April 1997
Senior Member
James Kuyper wrote:

> Med Bennett wrote:
>>
>> I'm having a problem using the min_curve_surf function. I am feeding it
>> data where X and Y are in UTM coordinates (like 650000, 4073500) and Z
>> ranges from 0.25 to 27,300. The result from min_curve_surf in IDL is a
>> paraboloid looking surface with a minimum of 2.4E+10 and a max of
>> 1.2E+15. Needless to say, this is dramatically wrong. I also tried
>> subtracting off the minimums from the X and Y values to reduce the
>> number of sig figs, but this does not seem to help. I can compute a
>> minimum curvature surface with the same data in another software package
>> (Surfer, Golden Software) and it gives me a reaasonable result. What's
>> wrong with the IDL implementation, or what am I doing wrong?
>
> If you're plotting geo-referenced data covering a significant portion of
> the Earth, then you should probably be using the /SPHERE keyword. If you
> are using /SPHERE, then X and Y need to be latitude and longitude in
> degrees, rather than UTM coordinates.
>
> Other than that, I can't think of anything obvious. It might help to
> post your code.

Hi James,

The area in question is only 4000 meters east-west and 2000 meters
north-south, so I don't think the earth's curvature is a problem. My code is
really just the command

mcs = min_curve_surf(cddata,cx,cy,xout=xax,yout=yax)

where xax and yax are just the grid definition. My data looks like

IDL> for i=0,57 do print,cddata[i],cx[i],cy[i]
2.50000 654388.42 4074227.3
2.50000 653843.10 4074772.3
2.50000 653290.98 4074706.9
2.50000 653323.82 4075362.3
2.50000 653851.11 4074328.6
2.50000 653848.19 4073995.6
0.250000 653290.04 4074263.0
2.50000 653305.74 4073885.9
35.6000 652827.10 4074199.2
2.50000 652820.14 4074587.5
2.50000 652750.34 4074996.8
2.50000 652349.49 4074956.4
73.1000 652244.41 4074843.5
1630.00 652355.23 4074634.6
664.000 652379.22 4074291.0
1990.00 652375.85 4073980.2
2.50000 652046.13 4073952.2
3000.00 652031.08 4074295.9
151.000 652034.06 4074628.9
1230.00 651699.00 4074401.0
2.50000 651713.84 4074068.3
8830.00 652951.30 4073778.5
5.00000 653031.97 4073758.4
186.000 651272.11 4074506.6
3690.00 651429.43 4074507.6
20100.0 651464.52 4074536.9
3500.00 651552.10 4074610.7
2770.00 651545.20 4074794.1
93.7000 651540.86 4075159.0
2.50000 650900.82 4074493.5
11600.0 652630.78 4073856.0
24500.0 652701.20 4073805.4
14100.0 652717.04 4073748.5
27300.0 652619.43 4073929.3
251.000 651228.38 4074786.7
11200.0 651343.95 4074680.8
2.50000 652661.85 4073649.9
9.10000 652528.42 4073788.9
2.50000 652527.30 4073773.8
2350.00 652648.33 4073675.5
2080.00 652648.17 4073683.7
12.3000 652647.31 4073705.1
2.50000 652704.45 4073637.8
2.50000 652706.39 4073645.0
2.50000 652706.39 4073645.0
2.50000 652796.01 4073604.5
2.50000 652978.58 4073553.7
3600.00 652700.44 4073719.5
10300.0 652772.18 4073722.6
4900.00 653065.91 4073832.9
0.600000 653198.66 4073806.5
13900.0 651645.66 4074401.0
5.00000 651053.48 4075268.2
5.00000 650699.44 4075252.1
5.00000 650653.14 4074709.0
670.000 651331.96 4075131.0
1630.00 651127.30 4074695.9
20.0000 650907.27 4075118.6

I'd be happy to mail a couple of gif's illustrating the results if you're
interested. Thanks, Med
Re: Minimum curvature surface problem [message #32595 is a reply to message #32580] Mon, 21 October 2002 17:04 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Med Bennett wrote:
>
> I'm having a problem using the min_curve_surf function. I am feeding it
> data where X and Y are in UTM coordinates (like 650000, 4073500) and Z
> ranges from 0.25 to 27,300. The result from min_curve_surf in IDL is a
> paraboloid looking surface with a minimum of 2.4E+10 and a max of
> 1.2E+15. Needless to say, this is dramatically wrong. I also tried
> subtracting off the minimums from the X and Y values to reduce the
> number of sig figs, but this does not seem to help. I can compute a
> minimum curvature surface with the same data in another software package
> (Surfer, Golden Software) and it gives me a reaasonable result. What's
> wrong with the IDL implementation, or what am I doing wrong?

If you're plotting geo-referenced data covering a significant portion of
the Earth, then you should probably be using the /SPHERE keyword. If you
are using /SPHERE, then X and Y need to be latitude and longitude in
degrees, rather than UTM coordinates.

Other than that, I can't think of anything obvious. It might help to
post your code.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Find minimums in an array...
Next Topic: WINDOW, /PIXMAP Question

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

Current Time: Sat Oct 11 06:49:13 PDT 2025

Total time taken to generate the page: 1.59842 seconds