Awesome, thanks!
Here's a dumb question. What do I use as the variable that holds all the matching data to call the associated data in the data set to those dates?
On Tuesday, June 26, 2012 3:28:20 PM UTC-5, (unknown) wrote:
> On Tuesday, June 26, 2012 12:07:29 PM UTC-4, pindsy wrote:
>> Hi everyone,
>>
>> I am having trouble figuring out how to search through an array of size [1,17824] and match it to the points in another array of size [1,70].
>>
>> What I am trying to use to match the two arrays are the month, day, year, hour, and minute within each dataset. I have made two arrays using julday and have been trying to go through each of those arrays to find matches. However, it only searches up to the 70 first lines of the larger array and dosen't give all the possible matches.
>>
>> Any ideas on how to fix this would be helpful.
>>
>> Cheers,
>>
>> Meredith
>
>
>
> On Tuesday, June 26, 2012 12:07:29 PM UTC-4, pindsy wrote:
>> Hi everyone,
>>
>> I am having trouble figuring out how to search through an array of size [1,17824] and match it to the points in another array of size [1,70].
>>
>> What I am trying to use to match the two arrays are the month, day, year, hour, and minute within each dataset. I have made two arrays using julday and have been trying to go through each of those arrays to find matches. However, it only searches up to the 70 first lines of the larger array and dosen't give all the possible matches.
>>
>> Any ideas on how to fix this would be helpful.
>>
>> Cheers,
>>
>> Meredith
>
> There are probably cleverer ways to do this, but the problem seems simple enough that a simple tool may be the best. Suppose the dates are d1 and d2 (d1 is the shorter vector)
>
> maxmintime=0.01
> n1=n_elements(d1)
>
> mintime=fltarr(n1)
> minid=lonarr(n1)
> for i=0,n-1 do begin
> dt=abs(d1(i)-d2)
> mintime(i)=min(dt,loc)
> minid(i)=loc
> endfor
>
> g=where(mintime lt maxmintime)
> if g(0) ne -1 then begin
> d1=d1(g)
> d2=d2(minid(g))
> endif else print,'No matches!'
On Tuesday, June 26, 2012 3:28:20 PM UTC-5, (unknown) wrote:
> On Tuesday, June 26, 2012 12:07:29 PM UTC-4, pindsy wrote:
>> Hi everyone,
>>
>> I am having trouble figuring out how to search through an array of size [1,17824] and match it to the points in another array of size [1,70].
>>
>> What I am trying to use to match the two arrays are the month, day, year, hour, and minute within each dataset. I have made two arrays using julday and have been trying to go through each of those arrays to find matches. However, it only searches up to the 70 first lines of the larger array and dosen't give all the possible matches.
>>
>> Any ideas on how to fix this would be helpful.
>>
>> Cheers,
>>
>> Meredith
>
>
>
> On Tuesday, June 26, 2012 12:07:29 PM UTC-4, pindsy wrote:
>> Hi everyone,
>>
>> I am having trouble figuring out how to search through an array of size [1,17824] and match it to the points in another array of size [1,70].
>>
>> What I am trying to use to match the two arrays are the month, day, year, hour, and minute within each dataset. I have made two arrays using julday and have been trying to go through each of those arrays to find matches. However, it only searches up to the 70 first lines of the larger array and dosen't give all the possible matches.
>>
>> Any ideas on how to fix this would be helpful.
>>
>> Cheers,
>>
>> Meredith
>
> There are probably cleverer ways to do this, but the problem seems simple enough that a simple tool may be the best. Suppose the dates are d1 and d2 (d1 is the shorter vector)
>
> maxmintime=0.01
> n1=n_elements(d1)
>
> mintime=fltarr(n1)
> minid=lonarr(n1)
> for i=0,n-1 do begin
> dt=abs(d1(i)-d2)
> mintime(i)=min(dt,loc)
> minid(i)=loc
> endfor
>
> g=where(mintime lt maxmintime)
> if g(0) ne -1 then begin
> d1=d1(g)
> d2=d2(minid(g))
> endif else print,'No matches!'
|