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

Home » Public Forums » archive » Re: Variable stride in array indices and other enhancements
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: Variable stride in array indices and other enhancements [message #15443 is a reply to message #15428] Wed, 19 May 1999 00:00 Go to previous messageGo to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Jack Saba wrote:
> I agree. The format that worked is not only REALLY ugly, it's unwieldy.
> It's also more difficult than necessary to figure out the correct syntax
> for any individual case.

No argument from me.

In many cases, I suspect people just want to do what Ken asked: extract
every nth element along each dimension. Perhaps we could come up with a
specification for an array dicing routine.

The closest paradigm in IDL that I'm aware of is the netCDF routine
NCDF_VARGET (see the Scientific Data Formats documentation). It is a
general purpose routine for reading multi-dimensional arrays from netCDF
files. It also recognizes that users might want to read subsets of an
array, including skipping elements along each dimension. The following
optional keywords to NCDF_VARGET are allowed in IDL 5.2:

COUNT
An optional vector containing the counts to be used in reading Value.
COUNT is a 1-based vector with an element for each dimension of the data
to be written.The default matches the size of the variable so that all
data is written out.

OFFSET
An optional vector containing the starting position for the read. The
default start position is [0, 0, ...].

STRIDE
An optional vector containing the strides, or sampling intervals,
between accessed values of the netCDF variable. The default stride
vector is that for a contiguous read, [1, 1, ...].

Perhaps we could design a specification for a function to dice an
existing array in memory which accepted similar keywords.

Cheers,
Liam.

---
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL and MPI
Next Topic: Re: behavior of arrays

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

Current Time: Sun Oct 12 13:02:10 PDT 2025

Total time taken to generate the page: 0.63928 seconds