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

Home » Public Forums » archive » Re: Selecting data from two separate 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: Selecting data from two separate arrays [message #71501] Tue, 22 June 2010 03:20 Go to previous message
Fster is currently offline  Fster
Messages: 6
Registered: June 2010
Junior Member
On 21 June, 21:33, Ed Hyer <ejh...@gmail.com> wrote:
> On Jun 21, 12:57 pm, Fster <francis.colle...@live.co.uk> wrote:
>
>> Would it be easier to combine them into one array? The issue is that
>> one array is on the x and y axis, and the other is on x, y, z axis,
>> BUT the x and y axis are the same for each of the arrays and equal
>> number of grid points...
>
> So, you want to select points from the XY array, and the extract the
> corresponding data from the XYZ array, right?
>
> There are quite a few ways to do this. Here's a simple one, not the
> fastest, but the simplest code-wise:
>
> DATA2 = <XY data>
> DATA3= <XYZ data>
> ;Get size of Z dimension
> NZ=(size(DATA3))[3]
> ; pick points from the XY data
> F2 = WHERE(DATA2 ge VALUE,NF2)
> ; set up an array to hold the extracted 3D data
> DATA3_EXTRACT = FLTARR(NF2,NZ)
> ; load the data into the array
> for IZ=0l,NZ-1 do DATA3_EXTRACT[*,IZ]=(DATA3[*,*,IZ])[F2]

In IDL is last section of the last line is it indexing or multiplying?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MPFIT Chance probability
Next Topic: I/O with file lists

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

Current Time: Wed Oct 08 15:34:27 PDT 2025

Total time taken to generate the page: 0.00454 seconds