comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: Confusions with map_image!

Re: Confusions with map_image!
type: item
description: 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.")
creator: David Fanning
date: 2009-06-12T12:37:57-00:00

Re: Confusions with map_image!
type: item
description: Hi David - it is quite likely that I am taking the wrong approach so any suggestions are more than welcome! The image I have was created by taking MODIS data for the entire globe (say, a day's worth of imagery), retrieving the SO2 from each of the individual images and combining them, and regridding the entire dataset onto a 0.25x0.25 degree grid. I have also been trying the method you used in the TOMS Aerosol Display problem although I'm not sure whether this is going to alleviate the issue either! Thanks Helen
creator: hethomas
date: 2009-06-12T13:24:37-00:00

Re: Confusions with map_image!
type: item
description: hethomas writes: > The image I have was created by taking MODIS data for the entire globe > (say, a day's worth of imagery), retrieving the SO2 from each of the > individual images and combining them, and regridding the entire > dataset onto a 0.25x0.25 degree grid. I have also been trying the > method you used in the TOMS Aerosol Display problem although I'm not > sure whether this is going to alleviate the issue either! MODIS data!? Oh, dear. :-( I suspect (as I always have) that the problem may lie then in the regridding approach you are taking. How exactly are you doing the regridding? (I hope you are not using IDL for this!) 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.")
creator: David Fanning
date: 2009-06-12T13:39:45-00:00

Re: Confusions with map_image!
type: item
description: Oh dear..... yes, I used IDL. The processing code (written by someone else) runs in IDL and spits out an ASCII file for each individual MODIS image containing lat, long and SO2. I ran this code for each of the 575 images for a day's worth of data, rebinned each individual file to the 0.25x0.25 grid, combined the files and removed any duplicate points (by averaging the SO2 value). Have I made a catostrophic gaff?
creator: hethomas
date: 2009-06-12T14:02:41-00:00

Re: Confusions with map_image!
type: item
description: hethomas writes: > The processing code (written by someone else) runs in IDL and spits > out an ASCII file for each individual MODIS image containing lat, long > and SO2. I ran this code for each of the 575 images for a day's worth > of data, rebinned each individual file to the 0.25x0.25 grid, combined > the files and removed any duplicate points (by averaging the SO2 > value). Have I made a catostrophic gaff? I don't know if you have made a catastrophic gaff, but there are PLENTY of opportunities for maximum values to be averaged out with all the rebinning and averaging you are doing. Why are you surprised by the results? 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.")
creator: David Fanning
date: 2009-06-12T14:32:59-00:00

Re: Confusions with map_image!
type: item
description: David, 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!
creator: hethomas
date: 2009-06-12T14:48:19-00:00

Re: Confusions with map_image!
type: item
description: 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.")
creator: David Fanning
date: 2009-06-12T15:05:30-00:00

Re: Confusions with map_image!
type: item
description: 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
creator: hethomas
date: 2009-06-12T15:20:30-00:00

Re: Confusions with map_image!
type: item
description: 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.
creator: jameskuyper
date: 2009-06-13T00:49:27-00:00