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

Home » Public Forums » archive » Trailing array dimensions
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: Trailing array dimensions [message #91347 is a reply to message #91338] Wed, 01 July 2015 16:02 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Wednesday, July 1, 2015 at 2:21:07 AM UTC-7, rj...@le.ac.uk wrote:
> Can someone explain where I'm going wrong with this please?
>
> I have some data which is generally 2 dimensional but occassionally they'll only be 1 data point in the netcdf file, meaning that IDL will initiate it as being 1 dimensional.
>
> For these cases I catch them and reform them to keep the trailing "empty" dimension and put them into a structure.
>
> If I do a help on the structure, this works and keeps the trailing dimension. If however, I do a help on the variable in the structure directly it loses the trailing dimension:
>
> IDL> help, data
> ** Structure <16d2e18>, 12 tags, length=200, data length=197, refs=1:
>
> my_variable
> FLOAT Array[10, 1]
>
> IDL> help, data.my_variable
> <Expression> FLOAT = Array[10]
>
> Any ideas?

I've never gotten this to work right. I complained loudly about this in the year 2000, fifteen years ago, and nothing has changed.

The answer is, if you are using 2D arrays or larger in structures, prepare for array jiggery-pokery to happen behind your back. The only thing you can do is REFORM() it when you use it.

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: i need to use this idl function. but how ?
Next Topic: Filtering out noise quickly?

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

Current Time: Fri Oct 10 20:45:16 PDT 2025

Total time taken to generate the page: 0.88075 seconds