Re: Extract Data from Point on Plot [message #64882] |
Thu, 29 January 2009 14:42  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mrjejones@gmail.com writes:
> Just for more clarification, I am reading this information from a
> netCDF file into IDL and doing a "plots" to draw it over a map_set. I
> just want to give the coordinate in the PS (x,y coords) and get the
> lat, long, and albedo for that pixel.
This is pretty much what I do for a living these days,
although I have pretty much completely given up on
MAP_SET for much of anything. The secret is being
able to set up a coordinate system for a rectangular
area of the graphics display. This could be an image,
a line plot, a contour plot, etc. For a map coordinate
system, I use the MAPCOORD object in the Catalyst
Library. Normally, I use this in conjunction with
a ScaleImage object, which has a method (via the
CatImage object) to convert a location in the local (map)
coordinate system into a location in a pixel coordinate
system, so it can obtain the value of that pixel.
I don't expect you to dive into the Catalyst Library,
but you can see the guts of this system at work in
TVINFO, which works with TVIMAGE to allow you to click
on any displayed image and get the value of the image
at that location. (More or less, of course, since this
works no matter what resolution you are displaying your
image in.)
I should be charging you thousands of dollars for this
information, but I'll give it away to you for free, since
Matt Savoie spilled the beans to me and didn't charge me.
The real secret is using SCALE_VECTOR together with
VALUE_LOCATE to locate the correct pixel value. It is so
slick it is embarrassing to think it only took Matt and me
a combined 35 years to think of it. :-(
Here are some articles to read. They all use this idea:
http://www.dfanning.com/catalyst/imgwin.html
http://www.dfanning.com/catalyst/maponimage.html
http://www.dfanning.com/graphics_tips/tvinfo.html
Cheers,
David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Extract Data from Point on Plot [message #64883 is a reply to message #64882] |
Thu, 29 January 2009 13:15   |
mrjejones
Messages: 3 Registered: January 2009
|
Junior Member |
|
|
On Jan 29, 3:26 pm, Brian Larsen <balar...@gmail.com> wrote:
> On Jan 29, 2:56 pm, mrjejo...@gmail.com wrote:
>
>> I would like to be able to specify in coordinates (x,y) a point on my
>> plot and IDL tell me what latitude, longitude, and reflectivity (I am
>> using the Z device then read into PS for 2-D display) is plotted at
>> that point. Basically, I want the raw data for that specific plot
>> point. It must be command-line based.
>
>> Any help would be appreciated!
>
> I have done a bit of this. Have a look at my routine interp2d_click()http://people.bu.edu/balarsen/IDLdoc/interp2d_click.html
>
> This may give you a good start (and may not :) )
>
> Cheers,
>
> Brian
>
> ------------------------------------------------------------ --------------
> Brian Larsen
> Boston University
> Center for Space Physicshttp://people.bu.edu/balarsen/Home/IDL
Brian, that's not exactly what I'm looking for, but it did point me to
seeing what's contained in the cursor.pro and see if I can explicitly
give the coordinates and work from there. I appreciate your help.
Just for more clarification, I am reading this information from a
netCDF file into IDL and doing a "plots" to draw it over a map_set. I
just want to give the coordinate in the PS (x,y coords) and get the
lat, long, and albedo for that pixel.
|
|
|
|
Re: Extract Data from Point on Plot [message #65008 is a reply to message #64882] |
Thu, 05 February 2009 13:19  |
mrjejones
Messages: 3 Registered: January 2009
|
Junior Member |
|
|
On Jan 29, 5:42 pm, David Fanning <n...@dfanning.com> wrote:
> mrjejo...@gmail.com writes:
>> Just for more clarification, I am reading this information from a
>> netCDF file into IDL and doing a "plots" to draw it over a map_set. I
>> just want to give the coordinate in the PS (x,y coords) and get the
>> lat, long, and albedo for that pixel.
>
> This is pretty much what I do for a living these days,
> although I have pretty much completely given up on
> MAP_SET for much of anything. The secret is being
> able to set up a coordinate system for a rectangular
> area of the graphics display. This could be an image,
> a line plot, a contour plot, etc. For a map coordinate
> system, I use the MAPCOORD object in the Catalyst
> Library. Normally, I use this in conjunction with
> a ScaleImage object, which has a method (via the
> CatImage object) to convert a location in the local (map)
> coordinate system into a location in a pixel coordinate
> system, so it can obtain the value of that pixel.
>
> I don't expect you to dive into the Catalyst Library,
> but you can see the guts of this system at work in
> TVINFO, which works with TVIMAGE to allow you to click
> on any displayed image and get the value of the image
> at that location. (More or less, of course, since this
> works no matter what resolution you are displaying your
> image in.)
>
> I should be charging you thousands of dollars for this
> information, but I'll give it away to you for free, since
> Matt Savoie spilled the beans to me and didn't charge me.
> The real secret is using SCALE_VECTOR together with
> VALUE_LOCATE to locate the correct pixel value. It is so
> slick it is embarrassing to think it only took Matt and me
> a combined 35 years to think of it. :-(
>
> Here are some articles to read. They all use this idea:
>
> http://www.dfanning.com/catalyst/imgwin.html
> http://www.dfanning.com/catalyst/maponimage.html
> http://www.dfanning.com/graphics_tips/tvinfo.html
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
I appreciate your help. I've read and use gobs of information from
your website and turned the Coyote library documentation into a PDF
(very handy). I'm going to read everything you said to but meanwhile I
had found this procedure "MAP_PROJ_INVERSE". What you described is
exactly what I want so I may ditch the map_proj.
Thanks for all the assistance you give the IDL community.
|
|
|