|
Re: issue with CMSAVE [message #83909 is a reply to message #83908] |
Fri, 19 April 2013 14:05   |
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   |
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   |
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 #83916 is a reply to message #83915] |
Thu, 18 April 2013 10:14   |
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   |
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  |
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
|
|
|