Re: programme driven variable names [message #52599] |
Thu, 22 February 2007 07:50 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ingo von Borstel writes:
> Indeed. That sounds like a plan. Works nicely.
> Thanks for the idea. Should have thought of it myself, though.
That occurred to me, too, But...you know how it is.
Some days just seem like Fridays from the get-go. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: programme driven variable names [message #52600 is a reply to message #52599] |
Thu, 22 February 2007 07:27  |
Ingo von Borstel
Messages: 54 Registered: September 2006
|
Member |
|
|
Hi,
> I think it would make more sense to write an IDL
> retrieval FUNCTION that could restore the data, stuff
> it into a structure of some sort, and return that.
>
> IDL> data_1 = GetSavedVarariables('file_1.sav')
> IDL> data_2 = GetSavedVarariables('file_2.sav')
> IDL> Plot, data_1.experiment, data_2.experiment
Indeed. That sounds like a plan. Works nicely.
Thanks for the idea. Should have thought of it myself, though.
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.
|
|
|
Re: programme driven variable names [message #52601 is a reply to message #52600] |
Thu, 22 February 2007 06:30  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ingo von Borstel writes:
> 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 think it would make more sense to write an IDL
retrieval FUNCTION that could restore the data, stuff
it into a structure of some sort, and return that.
IDL> data_1 = GetSavedVarariables('file_1.sav')
IDL> data_2 = GetSavedVarariables('file_2.sav')
IDL> Plot, data_1.experiment, data_2.experiment
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|