Re: Confusions with map_image! [message #66857] |
Fri, 12 June 2009 08:20  |
hethomas
Messages: 19 Registered: December 2008
|
Junior Member |
|
|
Ah so it is as I feared! Will look further into the problem of fitting
the map to my image and see what that produces!
Thanks again,
Helen
|
|
|
Re: Confusions with map_image! [message #66858 is a reply to message #66857] |
Fri, 12 June 2009 08:05   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
hethomas writes:
> I am not surprised by the results that are in my original grid (the
> one that I made as an amalgamation of my data). The thing that is
> surprising me is that when I use map_image on the image, the values
> change significantly, depending on the window size (and more
> obviously, whether the bilinear keyword is set) etc. It is this that
> has made me wonder how valid the results of Map_image are and what
> variables I should be using to get a "correct" result!
Well, yes, if you are using BILINEAR your results
*will* change with the size of the window! Those
extra pixel values have to come from somewhere.
BILINEAR interpolation will make them up for you.
(Often in the way you *wish* they were, rather than
the way they are.) Better in your case to use
nearest-neighbor interpolation so pixels are
replicated, but original values are not changed.
MAP_IMAGE is really a *display* technique (and a
poor one at that). It would probably be much better
to fit a map coordinate system to your image, rather
than fit the image to your coordinate system. There
are lots of articles on my web page and in the archives
of this newsgroup that address this issue. (Including
one this morning that points out how impossible this
is to do!)
But I would steer well clear of MAP_SET and any of
its associated routines if you really care about map
projected images. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
|
|
|
|
Re: Confusions with map_image! [message #66866 is a reply to message #66865] |
Fri, 12 June 2009 05:37   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
hethomas writes:
> Having spend the last couple of weeks trying to figure this out, I
> gather this isn't an uncommon problem, but hope that someone might be
> able to clarify -
>
> I have taken some global satellite data, and rebinned this into
> 0.25x0.25 degree pixels. Now I want to plot my data as an image for
> display. The data was originally in the format lat, long, data, but I
> formed data into a grid of 1440 x 720 in order to plot.
>
> The issue I am having is that there appears to be so many variables
> regarding the use of MAP_IMAGE, which seem to change my values
> significantly that I am not unsure what the "right" answer is! For
> example, the maxiumum value in my original grid could be 50, yet after
> using MAP_IMAGE this is reduced to say 35. The main factor which
> seems to affect this is the window size - I have set this to
> xsize=1453, ysize=749 in order to have a resulting image size of
> x=1440, y=720, but the values (although close) are still different.
>
> If anyone can shed any light on this I would be really greatful!
I think it is likely that this is completely the wrong
approach. :-)
Why don't you tell us more about the image (where you
got it, etc.) and maybe we can suggest something that
will work.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Confusions with map_image! [message #66970 is a reply to message #66858] |
Fri, 12 June 2009 17:49  |
jameskuyper
Messages: 79 Registered: October 2007
|
Member |
|
|
David Fanning wrote:
...
> MAP_IMAGE is really a *display* technique (and a
> poor one at that). It would probably be much better
> to fit a map coordinate system to your image, rather
> than fit the image to your coordinate system.
It sounds like the original data he's using are MODIS L2 products, in
which case the the most appropriate coordinate system to use for any
given orbit's worth of data would be virtually any cylindrical
projection with it's axis tilted so that the "equator" of the projection
corresponds roughly to the ground path of the satellite (it can't be an
exact fit). However, he's interested in an entire day's worth of data
covering (incompletely) the entire globe. No single projection is going
to be a good fit for all of the orbits of an entire day's worth of data.
I think he's stuck with fitting his data to his coordinate system, and
not vice versa.
MODIS data, because of the high inclination of it's orbit, heavily
over-samples the polar regions. About the only thing he could do to
adapt his projection to the data is to choose one that exaggerates the
size of the polar regions; but that would only make sense if he's
actually interested in the polar regions.
|
|
|