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

Home » Public Forums » archive » More histogram magic help please!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
More histogram magic help please! [message #92952] Fri, 01 April 2016 03:12 Go to previous message
rjp23 is currently offline  rjp23
Messages: 97
Registered: June 2010
Member
I still haven't quite got my head around all the histogram magic that's possible but fairly sure it'll massively help me speed this up.


for i=0L, n_elements(lons)-1 do begin
for j=0L, n_elements(lats)-1 do begin

find=where(longitude GE lons[i] and longitude LT lons[i]+1 AND $
latitude GE lats[j] and latitude LT lats[j]+1)

if find[0] NE -1 then assigned_value[find]=data[i,j]

endfor
endfor

I have a large 2 million+ element 1D array that has a latitude/longitude associated with each point.

I also have a second 2D gridded array and I want to work out which of the grid boxes each value of the large array falls into.

I just can't seem to get the histogram syntax quite right!

Thanks in advance
[Message index]
 
Read Message
Read Message
Previous Topic: Coyote Returns
Next Topic: JSON file manipulation in idl

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

Current Time: Wed Oct 08 11:31:57 PDT 2025

Total time taken to generate the page: 0.00479 seconds