[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TRIANGULATE/TRIGRID problem in IDL 5.3 (SGI)
"Liam E. Gumley" <Liam.Gumley@ssec.wisc.edu> writes:
> Dear IDL community,
>
> I'm hoping someone can provide me with some inspiration on a problem
> which has bugged me for a while now.
>
> I have 1354 x 10 float arrays of latitude, longitude, and image data
> from a satellite. I create a map projection, and convert the lat/lon
> coordinates to irregularly spaced device coordinates (x, y) in the
> graphics window. I then use TRIANGULATE and TRIGRID to create regularly
> spaced interpolated grids of the column and row coordinates in the
> original image array. If these interpolated column and row arrays are
> computed correctly, they can be used with INTERPOLATE to compute an
> image which is interpolated to the pixels in the graphics window. This
> method (in theory) should be better than the subjective technique used
> by my IMAGEMAP procedure.
>
> However the interpolated column and row arrays have bogus values along
> the top and bottom edges of the satellite swath (the edges are curves in
> the example). For example, along the bottom edge of the interpolated
> swath there are cyan pixels where the pixels should be darker blue. This
> causes the bilinear interpolated image (not shown here) to have very
> noticeable artifacts.
... remainder deleted ...
Hey Liam--
I haven't seen any responses so far. Unfortunately I don't have
anything great to report either. I tried TRIANGULATE and TRIGRID a
couple of times on some sky-mapping data (looking *up* from orbit, not
down). I also ran into some very strange artifacts on the edges of
the image which finally led me to a different approach [ which I can
discuss more upon request. ]
In the past few years we have seen some queries on this pair of
routines which suggest it's not entirely robust for production work.
These artifacts are one thing, and the whole non-colinear points
problem is another bad issue as well.
In this case it looks like TRIGRID is extrapolating beyond the actual
data points. Here is an example of your data, with a close-up showing
the pixels and where the original data points were.
ftp://cow.physics.wisc.edu/pub/craigm/cmtrigrid.gif
All the light-blue points are way beyond the true data points.
Perhaps you could post-process with a mask that removes pixels beyond
a certain distance?
Craig
--
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------