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

Home » Public Forums » archive » How to grid pixel level data where latitude and longitude are 2D arrays
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: How to grid pixel level data where latitude and longitude are 2D arrays [message #84971 is a reply to message #84958] Thu, 20 June 2013 04:00 Go to previous messageGo to previous message
dplatten is currently offline  dplatten
Messages: 32
Registered: December 2007
Member
Hi David,

I've just read your reply about using HIST_ND instead of GRIDDATA. As a result I've rewritten a bit of GRIDDATA code that I've been using so that it now uses HIST_ND and the reverse indices. GRIDDATA used to take at least ten minutes to process my data files, whereas the new HIST_ND version takes about a second. Many thanks for your post!

David


On Wednesday, June 19, 2013 10:17:50 PM UTC+1, David Fanning wrote:
>
>
> Hist_ND is JD Smith's routine (and so, written extremely well). If you
>
> can't find a copy on his web page, you can find a copy (probably older)
>
> in the Public folder of the Coyote Library. The real reason to use it
>
> here is that it returns the reverse indices for you. Hist_2D doesn't do
>
> that.
>
>
>
> http://www.idlcoyote.com/programs/public/hist_nd.pro
>
>
>
> I would bin your lat and lon arrays (at the same time!) using Hist_ND.
>
> Then, I would loop through each bin (360*180 of them), using the indices
>
> for that bin to select the data values you want to use in calculating
>
> the single data value for that bin. I suppose you can do this part in
>
> various ways, but I would start by just getting the median value, I
>
> think.
>
>
>
> I don't know if that is the "key part", but I can't get my head around
>
> anything but rectangular grids, especially when it comes to map
>
> projections, so I do EVERYTHING in XY space, not lat/lon space. At least
>
> then I can explain what I am doing to someone. And, yes, it makes it
>
> easier to form triangles when the points are not all bunched up in the
>
> same location. :-)
>
>
>
> Cheers,
>
>
>
> David
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Cleaning up an inherited object...
Next Topic: convert .dat to .fits

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

Current Time: Fri Oct 10 06:51:44 PDT 2025

Total time taken to generate the page: 0.39942 seconds