Function Makes Unexpected Appearance [message #65517] |
Wed, 04 March 2009 16:25  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
This business today with STRUCT_ASSIGN is the second time
this week something has popped up where I least expected it.
There was even an article about the phenomenon this week,
when a constant that appears in a rotating black hole
equation all of a sudden showed up in a three-body problem:
http://www.sciencenews.org/view/generic/id/41310
I keep running into the usefulness of Scale_Vector used
in conjunction with Value_Locate. That combination just
turns up in the oddest places, and always doing *exactly*
the job I had in mind.
STRUCT_ASSIGN is another of those extremely useful
functions that bails you out when you least expect it.
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: Function Makes Unexpected Appearance [message #65555 is a reply to message #65517] |
Mon, 09 March 2009 05:19  |
Brian Larsen
Messages: 270 Registered: June 2006
|
Senior Member |
|
|
Hmm,
so I think I must still need one of these sleepy epiphanies.
I tried reading the documentation and while I understand each word in
he documentation I don't understand the sentences. But when David
says something is worthwhile it is in one's best interest to
understand even if I will never use it. Does anyone have an example
of this showing its usefulness and an explanation of what you would
have had to do otherwise?
Cheers,
Brian
------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
http://people.bu.edu/balarsen/Home/IDL
|
|
|
Re: Function Makes Unexpected Appearance [message #65568 is a reply to message #65517] |
Sun, 08 March 2009 13:51  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
ed.schmahl@gmail.com writes:
> David must have written this after a few beers, I thought, when I went
> to the link provided, and
> read interesting stuff about Black Holes and the Three-Body program.
> "But what the heck does this
> have to do with the STRUCT_ASSIGN procedure?" So I checked out the
> docs on STRUCT_ASSIGN. Cool program! Might even be useful, but I was
> to tired to think about the relation to black holes and the "wierd
> constant" of the 3-body problem, and went to bed.
>
> About an hour later I woke up out of a sound sleep (David's messages
> can have this effect -- be warned), inadvertently awakening my gently
> snoring wife, and said to myself, "That's what David meant!'
>
> BlackHole=3D{a:randomn(10),wierd_constant:3.1415271818}
> ThreeBody=3D{b:randomn(5),wierd_constant:3.1415271818}
> STRUCT_ASSIGN, /VERBOSE, BlackHole,ThreeBody
> print,ThreeBody,format='(2F15.10)'
>
> Ed Schmahl,
> New member of STRUCT_ASSIGN FANS ANONYMOUS
Thank goodness. I *knew* I meant something, but I was having
a devil of a time remembering what it was! :-)
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: Function Makes Unexpected Appearance [message #65570 is a reply to message #65517] |
Sun, 08 March 2009 13:26  |
ed.schmahl
Messages: 11 Registered: October 2008
|
Junior Member |
|
|
David must have written this after a few beers, I thought, when I went
to the link provided, and
read interesting stuff about Black Holes and the Three-Body program.
"But what the heck does this
have to do with the STRUCT_ASSIGN procedure?" So I checked out the
docs on STRUCT_ASSIGN. Cool program! Might even be useful, but I was
to tired to think about the relation to black holes and the "wierd
constant" of the 3-body problem, and went to bed.
About an hour later I woke up out of a sound sleep (David's messages
can have this effect -- be warned), inadvertently awakening my gently
snoring wife, and said to myself, "That's what David meant!'
BlackHole={a:randomn(10),wierd_constant:3.1415271818}
ThreeBody={b:randomn(5),wierd_constant:3.1415271818}
STRUCT_ASSIGN, /VERBOSE, BlackHole,ThreeBody
print,ThreeBody,format='(2F15.10)'
Ed Schmahl,
New member of STRUCT_ASSIGN FANS ANONYMOUS
On Mar 4, 6:25 pm, David Fanning <n...@dfanning.com> wrote:
> Folks,
>
> This business today with STRUCT_ASSIGN is the second time
> this week something has popped up where I least expected it.
> There was even an article about the phenomenon this week,
> when a constant that appears in a rotating black hole
> equation all of a sudden showed up in a three-body problem:
>
> http://www.sciencenews.org/view/generic/id/41310
>
> I keep running into the usefulness of Scale_Vector used
> in conjunction with Value_Locate. That combination just
> turns up in the oddest places, and always doing *exactly*
> the job I had in mind.
>
> STRUCT_ASSIGN is another of those extremely useful
> functions that bails you out when you least expect it.
>
> 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.")
|
|
|