A script to mark ALL Fridger's galaxies

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 9 months
Location: Montreal

Post #81by Cham » 22.03.2007, 01:35

hahaa ! Ok, I just changed the "" to nil, using a search-replace in your script, and it solved the problem. Now, only galaxies are properly marked.

Now, I can't wait for your corrected galaxies database, since it was obvious to me that there are some errors in the actual version of deepsky.dsc.
Last edited by Cham on 22.03.2007, 01:36, edited 1 time in total.
"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
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #82by t00fri » 22.03.2007, 01:36

Actually, in the course of the massive overhauling of my deepsky.dsc database, I am presently also incorporating all the members of the local group from the new, precise NED-1D distance database. So far, I only had a few in the catalog (besides the MilkyWay only

LMC, SMC, M31, M32,...+ NGC's, Sculptor, Fornax, WLM, Leo I

Soon there will be about 30, i.e. the complete set including the familiar Dwarf galaxies. I guess it will be looking nice when the Milky Way is inspected at fairly close distance.

Bye Fridger
Image

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

Post #83by Cham » 22.03.2007, 01:37

Definitely interesting. Having the COMPLETE local group is a major must have. Can't wait to install it.
"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
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #84by t00fri » 22.03.2007, 01:48

Cham wrote:hahaa ! Ok, I just changed the "" to nil, using a search-replace in your script, and it solved the problem. Now, only galaxies are properly marked.

Now, I can't wait for your corrected galaxies database, since it was obvious to me that there are some errors in the actual version of deepsky.dsc.


Well these are not really errors! These are largely UNKNOWNS, otherwise I would have used the right distance values, of course.

Obviously, I need machine readable /catalogs/ for the distances, since I don't have the time to sort out 10000 values by hand ;-) . Many (at larger redshift) are simply NOT measured.

So far for the remaining unknown distances, I used a VERY rough approximation. I assumed the absolute magnitude to be a constant equal to the /peak/ value of the distribution from the SBF-distance measurements (i.e. m - M). The peaks differ somewhat for spirals and ellipticals +irr's. This I took into account.

In my forthcoming release, additionally ~1000 galaxies received very precise distance values due to the first release of the NED-1D database. Many more distances will be published in the next NED-D release. It was a VERY tedious affair to come forward with this new NED-1D database. So far it required extracting and examining the individual results from ~ 350 scientific publications...

Bye Fridger
Image

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Post #85by ElChristou » 22.03.2007, 02:20

t00fri wrote:...So far it required extracting and examining the individual results from ~ 350 scientific publications...


:!: gasp...
Image

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 9 months
Location: Nancy, France

Post #86by Vincent » 22.03.2007, 11:21

t00fri wrote:Cham,

well my script was written for Vincent's modification being ABSENT. I used "" instead of nil. As Chris wrote, this has to be coded right, eventually. That's not my concern right now.

That script was just for fun ;-)

Bye Fridger


Hey, Fridger,

I'm glad to see that we've finally managed to make you code (well, actually hack...) a few lines in celx ! :wink: Great !
I think that this script perfectly shows that Celestia can represent both a scientifical and an educational powerful tool. And even more...

Then, if we manage to make celx clearly distinguish the different types of DSOs (Galaxy, Nebula, OpenCluster) before the release of 1.5.0, I'll provide an updated/optimized version of your script, if you give me permission, of course...
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #87by t00fri » 22.03.2007, 12:48

Vincent wrote:Hey, Fridger,

I'm glad to see that we've finally managed to make you code (well, actually hack...) a few lines in celx ! :wink: Great !

I think that this script perfectly shows that Celestia can represent both a scientifical and an educational powerful tool. And even more...



It is true, actually. While being very familiar with the /basic/ Lua syntax due to its virtual identity with Maple scripting code (my daily professional programming tool) , I noticed with pleasure the considerable, Celestia-specific expansions that have taken place in the meantime ;-) .

In fact, I got many further ideas during my brief Lua coding "excursion".

It is obvious that such a versatile scripting language with its good interface to the Celestia core is a most powerful tool notably for producing valuable statistical displays of Celestia objects and their properties!

Bye Fridger
Image

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 9 months
Location: Nancy, France

Post #88by Vincent » 22.05.2007, 10:29

The name of the DSO iterator was changed from celestia:dso() into celestia:dsos().
All the scripts I've posted in this discussion and that are affected by this change have been edited.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years

Post #89by dirkpitt » 22.05.2007, 13:38

This script is great! The output looks exactly like the pictures you see associated with sky surveys.

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #90by t00fri » 22.05.2007, 19:27

I have just committed my 2 celx scripts to CVS for 1.5.0pre4:

-- for marking & red-shift coloring all my 10000+ galaxies
http://www.celestiaproject.net/~t00fri/images/z-dist.celx.zip

-- for marking all member galaxies of the local group
http://www.celestiaproject.net/~t00fri/images/mark-lg.celx.zip

Bye Fridger
Image

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

Post #91by Cham » 22.05.2007, 19:46

We urgently need the scripts menu I was asking since a long time. Lets define a "scripts" folder inside the base directory, like all the other standard folders (textures, data, models, etc). Celestia should read the name of all the files (CEL and CELX) located inside that folder, and present them in a list under the "File" menu. We don't need something fancy or complicated. A simple list of scripts under the File menu, which gives the user the opportunity to select a script directly from the list without having to navigate through his HD hierarchy.

Or maybe a scripts browser, listing all the CEL and CELX files in the Celestia installation (including the extras sub-folders) ?
"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
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #92by t00fri » 22.05.2007, 19:50

Cham wrote:We urgently need the scripts menu I was asking since a long time. Lets define a "scripts" folder inside the base directory, like all the other standard folders (textures, data, models, etc). Celestia should read the name of all the files (CEL and CELX) located inside that folder, and present them in a list under the "File" menu. We don't need something fancy or complicated. A simple list of scripts under the File menu, which gives the user the opportunity to select a script directly from the list without having to navigate through his HD hierarchy.

Or maybe a scripts browser, listing all the CEL and CELX files in the Celestia installation (including the extras sub-folders) ?


Chris was also just picking this issue up again in a mail to me. Well personally, I don't feel much of a need. I click Open... or Open Recent... and see what you just proposed. All I got to do is click.

Bye Fridger
Image

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

Post #93by Cham » 22.05.2007, 20:00

t00fri wrote:Well personally, I don't feel much of a need. I click Open... or Open Recent... and see what you just proposed. All I got to do is click.


Well, to me, this is the root of the problem. Usually, Celestia remembers the last folder I've opened. But very often, I have to change directories to find some other files. When I try to open a script from within Celestia, I then have to move through all my disk hierarchy, and I'm losing some time doing it. In the classroom, this is bad. So having a scripts menu (or at least a browser) can help to save LOTS of time.
"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
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #94by t00fri » 22.05.2007, 20:15

Cham wrote:
t00fri wrote:Well personally, I don't feel much of a need. I click Open... or Open Recent... and see what you just proposed. All I got to do is click.

Well, to me, this is the root of the problem. Usually, Celestia remembers the last folder I've opened. But very often, I have to change directories to find some other files. When I try to open a script from within Celestia, I then have to move through all my disk hierarchy, and I'm losing some time doing it. In the classroom, this is bad. So having a scripts menu (or at least a browser) can help to save LOTS of time.


Yes, that is not what is called a very clever file browser strategy. I was afraid that this might be your problem.
But there are big differences in file-browser cleverness within the various OS. Hence script menue implementations will also become dependent on the graphical toolkit of the OS.

Bye Fridger
Image

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

Post #95by Cham » 22.05.2007, 20:24

t00fri wrote:Yes, that is not what is called a very clever file browser strategy. I was afraid that this might be your problem

Usually, all my scripts are located in the same "scripts" folder, and Celestia remembers that folder, so I don't have to navigate far away. From times to times, I have to change directory, and then it's a pain to be back to my usual directory. I think that the scripts menu should be very usefull.

t00fri wrote:Hence script menue implementations will also become dependent on the graphical toolkit of the OS.


Well, not if there's a scripts browser in Celestia.
"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!"

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #96by chris » 22.05.2007, 20:40

In my opinion, one of the main reasons for adding a script menu is to make it easy for newer Celestia users to actually find scripts. Users have a much better chance of finding scripts if they're listed on a menu than if they have to hunt for them in the file browser.

I also feel that the long-neglected 'Tour Guide' feature of Celestia should be replaced by a scripts menu.

--Chris

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Post #97by ElChristou » 22.05.2007, 20:41

I agree we should have something to manage scripts. IMO they are not enough used, we have seen recently some nice marking applications and I'm sure lots of other interesting scripts could be written.

If we go for a browser/manager, what I would really like to see is a way to read a description of the script; if we could implement a sort of header in the celx files where the author would write a few words, then use this header to display this description in a field of the browser/manager it would be excellent...

Why such description? Well some scripts are simple, some more complex, some are fantasy, some are just eye candy and some are more serious, let's say more "professional". Instead of decoding a not so obvious name file, a little description would be much more practical, specialy when you have dozen of them...

Is the idea bad/good? possible?
Image

rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years
Location: Norway

Post #98by rthorvald » 22.05.2007, 20:57

Cham wrote:I then have to move through all my disk hierarchy, and I'm losing some time doing it. In the classroom, this is bad. So having a scripts menu (or at least a browser) can help to save LOTS of time.


Why not just store the scripts in a folder in your dock for this purpose... Pop the dock folder and activate the relevant script from Finder... Won??t work with fullscreen, though.

Anyhow,
A simple scripts menu i like. Definitely NOT one that scans the entire Celestia dir tree, just the contents of a single folder and its subdirectories. Else, the menu would be cluttered by all kinds of stuff from addons that one does not want there in daily operation...

- rthorvald
Image

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

Post #99by Cham » 22.05.2007, 21:08

rthorvald wrote:A simple scripts menu i like. Definitely NOT one that scans the entire Celestia dir tree, just the contents of a single folder and its subdirectories. Else, the menu would be cluttered by all kinds of stuff from addons that one does not want there in daily operation...


I agree. The complete scan could be done in the browser only (if there's any), while the menu is only listing the base "scripts" folder. But the simple menu would be enough. I don't think we need something fancy or complicated like what ElChristou is suggesting, at least not for Celestia 1.5 (maybe in 2.0 ?).
"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
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years

Post #100by dirkpitt » 23.05.2007, 03:33

So should scripts now be considered part of the official binary distribution? (i.e., not just CVS) I don't see any Makefile for scripts..


Return to “Scripting”