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 #84956 is a reply to message #84955] Wed, 19 June 2013 13:58 Go to previous messageGo to previous message
masterjedirobyn is currently offline  masterjedirobyn
Messages: 2
Registered: June 2013
Junior Member
On Wednesday, June 19, 2013 4:41:29 PM UTC-4, David Fanning wrote:
> David Fanning writes:
>
>
>
>> That is an awful lot of data points. I can see why there is some
>
>> thrashing going on. Can you get this to work if you take some reasonably
>
>> small number of random points from your data and worked with those?
>
>> Maybe you are so oversampled, it won't make any difference. :-)
>
>
>
> What if you used HIST_ND to bin up your lat/lon arrays, then looped
>
> through each bin and used the reverse indices vector to select the data
>
> values you want to use in each bin. Take the median value of the data
>
> values as the value for the bin. That would take seconds, rather than
>
> days.
>
>
>
> 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.")

I am not familiar with the HIST_ND routine, but I have used hist_2d to make frequency density plots before. I'm having trouble wrapping my head around what the call to hist_nd would be. The syntax is

hist=HIST_ND(V,[BINSIZE,MIN=,MAX=,NBINS=,REVERSE_INDICES=])

and I have lat[409,13248],lon[409,13248],var[409,13248]. Would I call something like this:

hist_lat=hist_nd(lat,binsize=1,min=-90,max=90,reverse_indice s=ri_lat)
and
hist_lon=hist_nd(lon,binsize=1,min=-180,max=180,reverse_indi ces=ri_lon)

and then I would loop through -90 to 90 for lat and select the median from the bin (and -180 to 180 for lon), which would leave me with 1D lat and lon arrays? I could then use these arrays with an interpolate command, thus avoiding griddata altogether? I apologize if I'm completely wrong in how I understand this.

As per your previous reply, I am currently running grid_input on my data, but it's been running for several hours. I have never tried using a tolerance keyword in triangulate, but I may try after grid_input finishes running. After reading the article above on usegriddata.html, is the key part of that article the use of the map_proj routines? (i.e., using map_proj_init and map_proj_forward on the lats and lons before passing them to triangulate?)

Thank you so much for your replies.
[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: Wed Oct 08 19:27:28 PDT 2025

Total time taken to generate the page: 0.00362 seconds