Selden's mark_messier script

All about writing scripts for Celestia in Lua and the .cel system
Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Selden's mark_messier script

Post #1by Cham » 10.12.2004, 05:36

On Selden's web site :

http://www.lepp.cornell.edu/~seb/celest ... html#3.5.3

I've found a very nice script that put a square around all Messier objects. Because of this file, I'm in the process of discovering the Celestia scripting abilities for the first time ! :oops:

So now I have two questions :

How can I configure Celestia so it load this script each time I start Celestia ? I want that script to be permanent.

In the script, there are many command lines like this one :

mark { object "M11" size 20 color [ 0.0 0.5 0.5] symbol "square" }

So what are the various options, besides of "square" ? Can I mark something with a circle ? A cross ? etc...
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 2 months
Location: Germany

Re: Selden's mark_messier script

Post #2by Harry » 10.12.2004, 10:56

Cham wrote:How can I configure Celestia so it load this script each time I start Celestia ? I want that script to be permanent.
You can use it as your start-script by replacing start.cel in your Celestia directory, or by editing celestia.cfg and pointing it to the new script as start-script.
So what are the various options, besides of "square" ? Can I mark something with a circle ? A cross ? etc...

For CEL-scripting you can look stuff like this up in Don's Scripting Guide, in this case you can use:
- diamond (default)
- plus
- square
- triangle
- x

For CELX-scripts you can look in my CELX guide. The possible optiosn for marking objects are identical in both.

HTH,

Harald

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #3by Cham » 10.12.2004, 13:19

Thanks a lot for the reply.

What is the difference between a cel script and a celx ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #4by selden » 10.12.2004, 13:27

CEL scripts are simple lists of commands. There are no looping constructs, for example.

CELX scripts are based on Lua, a full-featured embedded programming language.

For details, you'll need to read the documents mentioned above.
Selden

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #5by Cham » 10.12.2004, 13:37

I've tried many celx scripts and they do not work at all :(

Celestia says they are invalid script files. I'm using Celestia 1.3.2 on OS X. Is CELX implemented on the OS X version ?

Selden, I think your mark_messier cel should be part of the standard installation. Do you have other cel files which are marking something, except the various galaxies stuff ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #6by selden » 10.12.2004, 13:57

Unfortunately, It seems that Lua is not included in the version of Celestia built for OS X. You might want to discuss that with Hank.

[EDIT:
The Messier script is the only one I wrote to mark objects. Using it also requires a DSC catalog that defines all their locations. Many of Messier's objects aren't included in the databases that are included with Celestia, which is why I would up doing them as an Addon. There are enough compromises in creating that kind of mixed catalog, that it isn't obvious to me how it could be added "cleanly" to the distributed version of Celestia.]
Last edited by selden on 10.12.2004, 14:07, edited 2 times in total.
Selden

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #7by Cham » 10.12.2004, 14:00

Selden,

do you have other cel stuff, which marks something ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #8by selden » 10.12.2004, 14:07

Sorry, no.
They should be relatively straight forward to create, but as I mentioned in the edit above, corresponding catalogs have to be created, too. You can't mark an object unless Celestia knows its location.
Selden

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #9by Cham » 10.12.2004, 17:56

selden wrote:The Messier script is the only one I wrote to mark objects. Using it also requires a DSC catalog that defines all their locations. Many of Messier's objects aren't included in the databases that are included with Celestia, which is why I would up doing them as an Addon. There are enough compromises in creating that kind of mixed catalog, that it isn't obvious to me how it could be added "cleanly" to the distributed version of Celestia.]


About the Messier catalog, what compromises were you talking about ? Distance evaluation from the sun ? What is the accuracy of your Messier_all catalog ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #10by selden » 10.12.2004, 18:15

It's been long enough that I don't recall all of the details. I think most of the relevant info is in the Readme and in the DSC catalog.

For most of the objects I initially used the coordinates and distances shown at the SEDS Web site. I managed to improve most of them using coordinates from Simbad. Distances were more problematic.

Also, the presentation is inconsistant. Most of the galaxies, for example, were defined using just Celestia's builtin Galaxy models. One or two have pictures included in the final version of the Addon.

[EDIT:
Also, when "billboard models" are involved, the coordinates in the DSC catalog are those which are needed to place the picture at the correct location so that its features align closely with those in photographs which cover much larger areas of the sky. The coordinates of the pictures' centers often are quite a ways away from the official coordinates of the objects involved.]
Selden

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #11by Cham » 10.12.2004, 21:26

IMHO, the Messier catalog is so well known and so "important" that it SHOULD be included in the standard installation of Celestia. How can an astronomy software can let it as an "addon" ? This is beyond my comprehension !
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Return to “Scripting”