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

Home » Public Forums » archive » Re: issue with CMSAVE
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: issue with CMSAVE [message #83908] Fri, 19 April 2013 14:06 Go to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Whew, finally I can post again!
Re: issue with CMSAVE [message #83909 is a reply to message #83908] Fri, 19 April 2013 14:05 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Thursday, April 18, 2013 12:17:31 PM UTC-4, fgg wrote:
> I'm using Markwardt's CMSAVE and I'm having problems saving
structures that include a 2-D array:
>
> my_struct = {a:1, b:2, c:make_array(544,8, /byte)}
>
> cmsave, data=my_struct, file='C:/Documents/test.sav', /verbose
...
> % CMSAVE: Expression must be named variable: <BYTE (Array[544, 8])>

This is a bonafide bug which affects the special case when you are
trying to save a multi-dimensional byte array. Congratulations for
finding it!

There is a bug fix on my web site.
http://cow.physics.wisc.edu/~craigm/idl/cmsave.html

Craig
Re: issue with CMSAVE [message #83911 is a reply to message #83909] Fri, 19 April 2013 06:37 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> fgg writes:
>
>> c_var = make_array(544,8, /byte)
>> my_struct = {a:1, b:2, c:c_var}
>>
>> Same issue:
>>
>> cmsave, data=my_struct, file='C:/Documents/test.sav', /verbose
>> % CMSAVE: CMSAVE version 1.16
>> % CMSAVE: CMSV Library version 1.7
>> % CMSAVE: Portable (XDR) SAVE/RESTORE file.
>> % CMSAVE: Saved variable: A.
>> % CMSAVE: Saved variable: B.
>> % CMSAVE: Expression must be named variable: <BYTE (Array[544, 8])>
>
> Yes, mine does this, too. I don't know why. Craig will have to explain
> it to us. IDL 8.2.2 on Windows 7.

Craig is having problems posting to the newsgroup for some reason, but
in a private e-mail to me he indicates that this is indeed a bug in the
software that applies to multidimensional byte arrays. He has fixed the
problem, and made it available on his web page:

http://cow.physics.wisc.edu/~craigm/idl/cmsave.html

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: issue with CMSAVE [message #83914 is a reply to message #83911] Thu, 18 April 2013 16:04 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
fgg writes:

> c_var = make_array(544,8, /byte)
> my_struct = {a:1, b:2, c:c_var}
>
> Same issue:
>
> cmsave, data=my_struct, file='C:/Documents/test.sav', /verbose
> % CMSAVE: CMSAVE version 1.16
> % CMSAVE: CMSV Library version 1.7
> % CMSAVE: Portable (XDR) SAVE/RESTORE file.
> % CMSAVE: Saved variable: A.
> % CMSAVE: Saved variable: B.
> % CMSAVE: Expression must be named variable: <BYTE (Array[544, 8])>

Yes, mine does this, too. I don't know why. Craig will have to explain
it to us. IDL 8.2.2 on Windows 7.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: issue with CMSAVE [message #83915 is a reply to message #83914] Thu, 18 April 2013 10:22 Go to previous messageGo to next message
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
btw, SAVE will work just fine. But I need the nice /APPEND keyword of CMSAVE.
Re: issue with CMSAVE [message #83916 is a reply to message #83915] Thu, 18 April 2013 10:14 Go to previous messageGo to next message
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
You mean something like this?

c_var = make_array(544,8, /byte)
my_struct = {a:1, b:2, c:c_var}

Same issue:

cmsave, data=my_struct, file='C:/Documents/test.sav', /verbose
% CMSAVE: CMSAVE version 1.16
% CMSAVE: CMSV Library version 1.7
% CMSAVE: Portable (XDR) SAVE/RESTORE file.
% CMSAVE: Saved variable: A.
% CMSAVE: Saved variable: B.
% CMSAVE: Expression must be named variable: <BYTE (Array[544, 8])>


On Thursday, April 18, 2013 12:30:40 PM UTC-4, Coyote wrote:
> On Thursday, April 18, 2013 10:17:31 AM UTC-6, fgg wrote:
>
>
>
>> I'm using Markwardt's CMSAVE and I'm having problems saving structures that include a 2-D array:
>
>>
>
>
>
>> my_struct = {a:1, b:2, c:make_array(544,8, /byte)}
>
>> cmsave, data=my_struct, file='C:/Documents/test.sav', /verbose
>
>> % CMSAVE: CMSAVE version 1.16
>
>> % CMSAVE: CMSV Library version 1.7
>
>> % CMSAVE: Portable (XDR) SAVE/RESTORE file.
>
>> % CMSAVE: Saved variable: A.
>
>> % CMSAVE: Saved variable: B.
>
>> % CMSAVE: Expression must be named variable: <BYTE (Array[544, 8])>
>
>>
>
>> How can I fix this?
>
>
>
> Well, you could make your C field point to a named variable instead of an expression. :-)
>
>
>
> Cheers,
>
>
>
> David
Re: issue with CMSAVE [message #83917 is a reply to message #83916] Thu, 18 April 2013 09:30 Go to previous messageGo to next message
DavidF[1] is currently offline  DavidF[1]
Messages: 94
Registered: April 2012
Member
On Thursday, April 18, 2013 10:17:31 AM UTC-6, fgg wrote:

> I'm using Markwardt's CMSAVE and I'm having problems saving structures that include a 2-D array:
>

> my_struct = {a:1, b:2, c:make_array(544,8, /byte)}
> cmsave, data=my_struct, file='C:/Documents/test.sav', /verbose
> % CMSAVE: CMSAVE version 1.16
> % CMSAVE: CMSV Library version 1.7
> % CMSAVE: Portable (XDR) SAVE/RESTORE file.
> % CMSAVE: Saved variable: A.
> % CMSAVE: Saved variable: B.
> % CMSAVE: Expression must be named variable: <BYTE (Array[544, 8])>
>
> How can I fix this?

Well, you could make your C field point to a named variable instead of an expression. :-)

Cheers,

David
Re: issue with CMSAVE [message #84048 is a reply to message #83911] Fri, 19 April 2013 15:34 Go to previous message
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
That's fantastic! Thanks a lot for posting this, David!... and thank you, Craig, for fixing the code and making it available so quickly!

Cheers,
Fabio


On Friday, April 19, 2013 9:37:27 AM UTC-4, David Fanning wrote:

> Craig is having problems posting to the newsgroup for some reason, but
> in a private e-mail to me he indicates that this is indeed a bug in the
> software that applies to multidimensional byte arrays. He has fixed the
> problem, and made it available on his web page:
>
> http://cow.physics.wisc.edu/~craigm/idl/cmsave.html
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: cgArrow Solid keyword with a cgWindow
Next Topic: Re: plot and contour inconsistency

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

Current Time: Wed Oct 08 13:51:52 PDT 2025

Total time taken to generate the page: 0.00520 seconds