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

Home » Public Forums » archive » non-rectangular array subset
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: non-rectangular array subset [message #89452 is a reply to message #89450] Fri, 17 October 2014 14:49 Go to previous message
Chris Anderson is currently offline  Chris Anderson
Messages: 3
Registered: August 2014
Junior Member
Jess,

Subsetting your data using the 'where' function will allow you to subset your data from your image arrays into one-dimensional vectors that can then be concatenated together into a single array. I'm sure this can be done in a cleaner fashion, but one potential example, given two images and some sort of threshold could be:

index1=where(image1 gt threshold,cnt)
if (cnt gt 0) then output_data=image1[index1]

index2=where(image2 gt threshold,cnt)
if (cnt gt 0) then output_data=[output_data,image2[index2]]

Your output_data vector then will contain a one-dimensional array of the values you have subset from your original images. All of your LAI values for the regions you are using will be in one array.

On Friday, October 17, 2014 6:42:07 AM UTC-7, Fabien wrote:
> Hi,
>
>
>
> A 2d grid of data is the same as an "image", and third or fourth
>
> dimensions (e.g. time or atmospheric levels) are simply a "pile of images".
>
>
>
> Depending on the size of your array you could do some dimension juggling
>
> (https://www.idlcoyote.com/tips/rebin_magic.html, case study 1) or use a
>
> loop over the other dimensions.
>
>
>
> Fabien
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Converting days since 0-01-01 to Julian/Gregorian days - how can IDL recognise 0 AD?
Next Topic: File time issue

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

Current Time: Sun Oct 12 06:45:09 PDT 2025

Total time taken to generate the page: 0.79789 seconds