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

Home » Public Forums » archive » Co-Linear Contour Points
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Co-Linear Contour Points [message #36466 is a reply to message #36370] Wed, 17 September 2003 01:16 Go to previous message
Chris Lee is currently offline  Chris Lee
Messages: 101
Registered: August 2003
Senior Member
In article <ae902fd4.0309161203.125f6b7b@posting.google.com>, "Nate Doyle"
<doyle@lasp.colorado.edu> wrote:


> I'm trying to plot a contour and am getting an error that tells me my
> points are co-linear. I'm not exactly sure what's going on so I figured
> I'd appeal to you people. I've tried lots of different things
> (including searching through the archives, but to no avail) but here's
> the current version of the code. The darkinfo structures contain
> latitudes and longitudes and the g_flux is what I'm trying to map
> (electron count rates). The order here is that which everything gets
> plotted in my code. I left out some stuff in between so as to not bog
> things down with too much code.
> map_set,/goodes,/continents,title='Dark Area Count Rates For Mapping The
> SAA'
> plots,darkinfo.sc_lon,darkinfo.sc_lat,psym=3,$
> color=fix(alog10(darkinfo.g_flux))+1
> z=darkinfo.g_flux
> x=darkinfo.sc_lon
> y=darkinfo.sc_lat
> contour,z,x,y,/irregular,/overplot
> Thanks in advance
> Nate

It usually means that you probably don't have irregularly gridded data.
The error is being generated by the TRIANGULATE procedure, from the IDL
help file...
"
Setting IRREGULAR is the same as performing an explicit triangulation. That is:

CONTOUR, Z, X, Y, /IRREGULAR

is the same as

TRIANGULATE, X, Y, tri ;Get triangulation
CONTOUR, Z, X, Y, TRIANGULATION=tri
"

If you try TRIANGULATE(ing) the data yourself it will complain that the
data is co-linear, this mean that the data points are regularly spaced
(at least, that's the only way I can get the error), if you have

x=[1,2,3,4,5,6,7,8]
y=[1,2,3,4,5,6,7,8]

triangulate, x,y, tri=tri
;...points are co-linear error

x=[1,2,3,4,5,6,7,8]
y=[1,2,3,4,5,6,7,9] ;note the _9_
triangulate, x,y, tri=tri
;no error.

;;;;;;;;;;;;
The IRREGULAR keyword is used if you have (say) 50
measurements at 50 different x and y values. Not when you have 2500
measurements (with 50 measurements at each of 50 different latitudes
etc.)

You should check the dimensionality of z,x and y. My guess is that

z=z(n_x,n_y), x=x(n_x), y=y(n_y)

and not

z=z(n), x=x(n), y=y(n)


Chris.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: exporting table data to a CSV file
Next Topic: Dataminer: faster way to get all records in a IDLdbRecordset table?

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

Current Time: Sat Oct 11 10:44:34 PDT 2025

Total time taken to generate the page: 1.51983 seconds