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

Home » Public Forums » archive » Re: Restore problem.
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: Restore problem. [message #67807] Thu, 27 August 2009 14:45
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Liam Gumley" <liamgumley@gmail.com> wrote in message
news:abab51bc-6813-4b0c-a285-51e72c9c5e33@w6g2000yqw.googleg roups.com...
On Aug 27, 2:24 pm, "R.G. Stockwell" <noemai...@please.com> wrote:
> "David Fanning" <n...@dfanning.com> wrote in message
>
> news:MPG.250089ba351c1ddf989864@news.giganews.com...
>
>> R.G. Stockwell writes:
> ...
>> I'm not saying you are wrong about this, and
>> there could very well be a problem with RESTORE.
>> But, that would be *far* down on the list of things
>> I would be checking. Have you considered that the
>> variables you put into the save file may not have
>> had the values you thought they had? That would
>> be at the top of my list.
>
>> Any luck duplicating the problem?
>
> Aparrently it can be reproduced by writing the save in
> IDL 7.0.6, and reading it in IDL 7.1.
>
> However, I see the problem reading the file (from 7.0.6) in IDL 6.3 as
> well.
>
> I'll snoop around and see if I can make a good example.
>
> I agree that the RESTORE problem seems unlikely (and user
> error seems quite likely), but this is such a simple operation.
> It is basically 3 steps.
>
> Save, array1, array2, array3
> email it to me
> restore, filename
>
> cheers,
> bob

Have you considered computing a checksum for the file to make sure it
is not corrupted during the email step? md5sum works well for this
task.

Do you see the same problem if you skip the email step?

I just ran the following test and everything worked as expected:

Create save file on Mac running IDL 7.1:
IDL Version 7.1, Mac OS X (darwin x86_64 m64). (c) 2009, ITT Visual
Information Solutions
IDL> data = dist(256)
IDL> save, data, filename='dist256.sav'

Send file to Linux box (via scp) running IDL 6.2 and read it:
IDL Version 6.2 (linux x86_64 m64). (c) 2005, Research Systems, Inc.
IDL> restore, 'dist256.sav'
IDL> help, data
DATA FLOAT = Array[256, 256]
IDL> print, max(abs(data - dist(256)))
0.00000

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/

*********************************


thanks Liam, good suggestions.

I have not reproduced the problem locally. I think I will conclude that
this
is "user error" in the creation of the file. I suspect there was a
miscommunication
between what the data was, and what data was actually sent.

cheers,
bob
Re: Restore problem. [message #67808 is a reply to message #67807] Thu, 27 August 2009 14:41 Go to previous message
liamgumley is currently offline  liamgumley
Messages: 74
Registered: June 2005
Member
On Aug 27, 2:24 pm, "R.G. Stockwell" <noemai...@please.com> wrote:
> "David Fanning" <n...@dfanning.com> wrote in message
>
> news:MPG.250089ba351c1ddf989864@news.giganews.com...
>
>> R.G. Stockwell writes:
> ...
>> I'm not saying you are wrong about this, and
>> there could very well be a problem with RESTORE.
>> But, that would be *far* down on the list of things
>> I would be checking. Have you considered that the
>> variables you put into the save file may not have
>> had the values you thought they had? That would
>> be at the top of my list.
>
>> Any luck duplicating the problem?
>
> Aparrently it can be reproduced by writing the save in
> IDL 7.0.6, and reading it in IDL 7.1.
>
> However, I see the problem reading the file (from 7.0.6) in IDL 6.3 as well.
>
> I'll snoop around and see if I can make a good example.
>
> I agree that the RESTORE problem seems unlikely (and user
> error seems quite likely),  but this is such a simple operation.
> It is basically 3 steps.
>
> Save, array1, array2, array3
> email it to me
> restore, filename
>
> cheers,
> bob

Have you considered computing a checksum for the file to make sure it
is not corrupted during the email step? md5sum works well for this
task.

Do you see the same problem if you skip the email step?

I just ran the following test and everything worked as expected:

Create save file on Mac running IDL 7.1:
IDL Version 7.1, Mac OS X (darwin x86_64 m64). (c) 2009, ITT Visual
Information Solutions
IDL> data = dist(256)
IDL> save, data, filename='dist256.sav'

Send file to Linux box (via scp) running IDL 6.2 and read it:
IDL Version 6.2 (linux x86_64 m64). (c) 2005, Research Systems, Inc.
IDL> restore, 'dist256.sav'
IDL> help, data
DATA FLOAT = Array[256, 256]
IDL> print, max(abs(data - dist(256)))
0.00000

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
Re: Restore problem. [message #67810 is a reply to message #67808] Thu, 27 August 2009 12:24 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"David Fanning" <news@dfanning.com> wrote in message
news:MPG.250089ba351c1ddf989864@news.giganews.com...
> R.G. Stockwell writes:
...
> I'm not saying you are wrong about this, and
> there could very well be a problem with RESTORE.
> But, that would be *far* down on the list of things
> I would be checking. Have you considered that the
> variables you put into the save file may not have
> had the values you thought they had? That would
> be at the top of my list.
>
> Any luck duplicating the problem?

Aparrently it can be reproduced by writing the save in
IDL 7.0.6, and reading it in IDL 7.1.

However, I see the problem reading the file (from 7.0.6) in IDL 6.3 as well.

I'll snoop around and see if I can make a good example.

I agree that the RESTORE problem seems unlikely (and user
error seems quite likely), but this is such a simple operation.
It is basically 3 steps.

Save, array1, array2, array3
email it to me
restore, filename

cheers,
bob
Re: Restore problem. [message #67811 is a reply to message #67810] Thu, 27 August 2009 12:17 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
R.G. Stockwell writes:

> I have a very simple, yet very wrong situation.
> I am reading a saved file, with restore.
> The numbers are flat out wrong, but the variable names,
> and array dimensions are the same. There is a float array,
> and an integer array (nothing fancy).
>
> I've tried reading it on a few different machines,
> different versions of IDL, 32 bit and 64 bit. They
> all read it "wrong".
>
> are there known bugs in RESTORE?
>
> RESTORE: IDL version 7.0 (linux, x86_64).

I'm not saying you are wrong about this, and
there could very well be a problem with RESTORE.
But, that would be *far* down on the list of things
I would be checking. Have you considered that the
variables you put into the save file may not have
had the values you thought they had? That would
be at the top of my list.

Any luck duplicating the problem?

Cheers,

David

--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Restore problem. [message #67812 is a reply to message #67811] Thu, 27 August 2009 12:04 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Jean H." <jghasban@DELTHIS.ucalgary.ANDTHIS.ca> wrote in message
news:h76jau$3rc$1@news.ucalgary.ca...
> R.G. Stockwell wrote:
>> I have a very simple, yet very wrong situation.
>> I am reading a saved file, with restore.
>> The numbers are flat out wrong, but the variable names,
>> and array dimensions are the same. There is a float array,
>> and an integer array (nothing fancy).
>>
>> I've tried reading it on a few different machines,
>> different versions of IDL, 32 bit and 64 bit. They
>> all read it "wrong".
>>
>> are there known bugs in RESTORE?
>>
>> RESTORE: IDL version 7.0 (linux, x86_64).
>>
>> cheers,
>>
>> bob
>>
>>
>>
>>
> could it be an Endian issue?
>
> Jean

don't see how. RESTORE does not allow endian control.
That should be taken care of with the XDR file fomat.

More info: We lose our NANs as well. They seem to become zeroes,
but not always (i.e. i get 2.3 instead of NAN for instance).
Also, the range of the numbers is somewhat normal (i do not get
everything as 10^-323 for instance - the numbers are in the range of
-1000 to 1000).

cheers,
bob
Re: Restore problem. [message #67813 is a reply to message #67812] Thu, 27 August 2009 11:29 Go to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
R.G. Stockwell wrote:
> I have a very simple, yet very wrong situation.
> I am reading a saved file, with restore.
> The numbers are flat out wrong, but the variable names,
> and array dimensions are the same. There is a float array,
> and an integer array (nothing fancy).
>
> I've tried reading it on a few different machines,
> different versions of IDL, 32 bit and 64 bit. They
> all read it "wrong".
>
> are there known bugs in RESTORE?
>
> RESTORE: IDL version 7.0 (linux, x86_64).
>
> cheers,
>
> bob
>
>
>
>
could it be an Endian issue?

Jean
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Restore problem.
Next Topic: Measuring sphericity of a set of voxels.

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

Current Time: Wed Oct 08 13:43:24 PDT 2025

Total time taken to generate the page: 0.00453 seconds