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

Home » Public Forums » archive » programme driven variable names
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
programme driven variable names [message #52602] Thu, 22 February 2007 06:19
Ingo von Borstel is currently offline  Ingo von Borstel
Messages: 54
Registered: September 2006
Member
Hi there,

I have a set of routines that act on similar sets of data. In order to
have these pre-processed data easily available for further analysis I
save the appropriate data structures in an IDL sav file for later
retrieval via the restore command.

Unfortunately, the variables saved will always bear the same name. This
is inconvenient, if I like to compare data from several of these data
sets, restored from several *.sav files.

Is there a way to rename variables during run-time without user interaction?

I have somthing along these lines in my mind:

PRO pre_process_data, datasetname
... ; do the pre-processing
; and save the pre-processed data
SAVE, filename=datasetname, datasetname_variable1,
datasetname_variable2, datasetname_variable3
END

And the following usage of restore on an IDL prompt:

IDL> pre_process_data, 'set1'
IDL> pre_process_data, 'set2'
...
IDL> reset
...
IDL>restore, 'set1.sav'
IDL>showvars
set1_var1
set1_var2
set1_var3
IDL>restore, 'set2.sav'
IDL>showvars
set1_var1
set1_var2
set1_var3
set2_var1
set2_var2
set2_var3

Best regards,
Ingo

--
Ingo von Borstel <newsgroups@planetmaker.de>
Public Key: http://www.planetmaker.de/ingo.asc

If you need an urgent reply, replace newsgroups by vgap.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: socket issue
Next Topic: Re: programme driven variable names

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

Current Time: Wed Oct 08 15:27:14 PDT 2025

Total time taken to generate the page: 0.00557 seconds