Re: I for Interactive Programming? (was: widget_control and group_leader) [message #23113 is a reply to message #23112] |
Thu, 04 January 2001 09:47  |
Ray Sterner
Messages: 10 Registered: December 1997
|
Junior Member |
|
|
Jaco van Gorkom wrote:
>
> Richard G. French wrote:
>> ... I used to approach IDL as though
>> the I in Interactive meant 'interactive programming' - I'd start
>> a journal file, fiddle with the observations and analysis and display,
>> edit the journal file, and call it a program. I still take this approach
>> for rush projects, but taking the few minutes to annotate the code
>> and reorganize it so that it can be used again is now a high priority
>> for me.
>> Although I have written some widget programs over the years,
>> I still find myself quite often using IDL in this seat-of-the-pants
>> mode when I start a new project. I'd be curious to know how many
>> other readers of this news group use IDL primarily in this way.
>> Dick French
>
> Hi Dick,
>
> Count me in, I do this all the time. Usually forgetting to start a
> journal
> in time and thus cutting and pasting from the log window. I find that it
> often leads to faster and more 'creative' data analysis, although it is
> sometimes hard to really take those minutes at the end of the day for
> reorganizing and annotating the code.
>
> Jaco
>
> ------------------------------
> Jaco van Gorkom gorkom@rijnh.nl
> FOM-Instituut voor Plasmafysica Rijnhuizen
I work that way a lot too, and never remember to turn on journal. So
I wrote a routine
called grab_commands.pro that I can call at any point to grab all the
commands I've
used and put them in a file, like turning journal on and getting all
the previous
commands. It grabs commands from the recall buffer, which by default
only keeps a few
commands. In my IDL startup file I set !EDIT_INPUT=1000 which should
cover most cases.
It's been awhile since I've updated my public IDL library, but for now
I've put this
routine at http://fermi.jhuapl.edu/temp/grab_commands.pro
It should work for any version that has the IDL recall_commands
routine (not sure when that
came in, maybe IDL 5?). Once you get it just do grab_commands,/help
for all the deatils.
--
Ray Sterner ray.sterner@jhuapl.edu
The Johns Hopkins University North latitude 39.16 degrees.
Applied Physics Laboratory West longitude 76.90 degrees.
Laurel, MD 20723-6099
|
|
|