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

Home » Public Forums » archive » Re: edit .sav file
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: edit .sav file [message #61480 is a reply to message #61476] Fri, 18 July 2008 07:42 Go to previous messageGo to previous message
Allan Whiteford is currently offline  Allan Whiteford
Messages: 117
Registered: June 2006
Senior Member
Bulrush wrote:
> On Jul 18, 3:43 am, Allan Whiteford
> <allan.rem...@phys.remove.strath.ac.remove.uk> wrote:
>
>> Bulrush wrote:
>>
>>> Hi all,
>>> Can I edit, and access the contents of a .sav file?
>>
>> It's unclear (to me, at least) exactly what you want to do.
>>
>> You can restore the contents of a .sav file at the IDL command line by
>> typing:
>>
>> restore,file='myfile.sav'
>>
>> and you get the contents to play with which you can later save.
>>
>> If you had a .sav file with two varibles, say a and b and you wanted to
>> increase the value of a by 1 then you would type:
>>
>> restore,file='myfile.sav'
>> a=a+1
>> save,a,b,file='myfile.sav'
>>
>> If you're looking for something with more power then see:
>>
>> http://cow.physics.wisc.edu/~craigm/idl/cmsave.html
>>
>> and if you're looking for something which does even more then see
>> David's reply.
>>
>> Thanks,
>>
>> Allan
>
>
> I see. Thanks. I am a noviece IDL user. I have read a lot about
> the .sav file in this group. I tried the "RESTORE" routine, but seems
> like I still can not see the contents and add anything I want in it.
>
> Thanks anyway!

After restoring your file, type the "help" command.

You should see something like:

IDL> restore,'myfile.sav
IDL> help
% At $MAIN$
A INT = 3
B INT = 2
Compiled Procedures:
$MAIN$

Compiled Functions:

IDL>

i.e. the variables stored in the save file should just end up in your
current scope.

Thanks,

Allan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Spherical Surface Plot w/ fsc_surface from David Fanning (:
Next Topic: Something Has Changed

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

Current Time: Fri Oct 10 20:06:20 PDT 2025

Total time taken to generate the page: 0.24247 seconds