New star generator for other galaxies... (work in progress)

Post requests, images, descriptions and reports about work in progress here.
Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 59
With us: 20 years 5 months
Location: Montreal

Re: New star generator for other galaxies... (work in progre

Post #81by Cham » 12.09.2011, 20:58

Here's a sample of 2001 stars from a new STC file, using the red curve shown above for the "base" main sequence.

Most of the K stars that I selected are having a reasonable radius. However, a few of them have a radius of about 1.5 Sol (is that possible ?), and a few others are having a radius of 0.4 or even 0.35 Sol (the one which appears as a small redish square on the plot). The HR main sequence curve is nice, though. Maybe I should lower the AbsMagn variations and keep all the stars close to the interpolated curve ? What do you think ?

NewHR.jpg
"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
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 59
With us: 20 years 5 months
Location: Montreal

Re: New star generator for other galaxies... (work in progre

Post #82by Cham » 12.09.2011, 21:29

Now, here's something interesting that I was unaware of (I must admit that I'm not very familiar with luminosity classes).

I removed completely all random variations on the AbsMagn and followed strictly the main sequence curve, as described above. Then the stars are drawing some branches which are particularly visible in the K and M sections. I guess these branches are the various luminosity classes (I, II, III, IV, V, etc) ? Is that it ? Chris, Selden, Fridger ?

HRlum.jpg


Also, the selected star is shown as a redish square. It's a K9V star and its radius is only 0.36 RSol. Please, I need a confirmation that this is right.
"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
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 59
With us: 20 years 5 months
Location: Montreal

Re: New star generator for other galaxies... (work in progre

Post #83by Cham » 12.09.2011, 22:01

I think I understand better the branches shown above, with the help of this page :

http://www.atlasoftheuniverse.com/hr.html

This means that my code isn't right...

If I understand things correctly, I should create only "V" types of stars for the main sequence, is that right ? I shouldn't assign randomly any other luminosity classes to the stars (as I said, I'm not very familiar with the Lum classes, so I'm learning something new here. Sorry to expose my ignorance here ! :oops: ).
"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: 10190
Joined: 04.09.2002
With us: 21 years 9 months
Location: NY, USA

Re: New star generator for other galaxies... (work in progre

Post #84by selden » 12.09.2011, 23:44

Cham,

If you want to generate only stars which are still on the main sequence line (type V, as you wrote) then you are also implying that all of those stars formed at the same time and all are very young. The stars that you have been randomly generating in other regions of the HR diagram would correspond to older stars which have had time to migrate away from the main sequence already.

The stars to the upper right of the main sequence line in the HR diagram which you link to, have all had enough time to age so that they've changed their spectral types (*) The white dwarfs to the lower left have had (proportionally) even more time to age after having been giants for a while.

The HR diagram derived from the Hipparcos data (consisting of stars within a few thousands of LY of our Sun) includes a mixture of stars with different ages -- some young clusters, like in the Orion Nebula where the young, high-mass, hot stars are just starting to age to be larger and cooler after a few hundreds of millions of years, and some old, low-mass, cooler stars like our own Sun which have changed very little after billions of years.
____
* - They become giants as they inflated because the region where hydrogen was fusing expanded and came closer to their surfaces. Inside that region, closer to the centers of the giant stars, heavier elements are starting to fuse because that's all that's left -- the hydrogen there already has fused, becoming those heavier elements.
Selden

starguy84
Posts: 36
Joined: 02.12.2010
With us: 13 years 6 months

Re: New star generator for other galaxies... (work in progre

Post #85by starguy84 » 12.09.2011, 23:48

[EDIT: Selden explained the HR diagram much better than I did]

I don't know what's going on with your three branches of K/M stars, but a K9V star should be somewhere around 0.6 solar radii (and 0.6 solar masses). As a generic rule of thumb, for M stars, Mass (in solar units) should roughly equal Radius (in solar units).

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 21 years 9 months
Location: NY, USA

Re: New star generator for other galaxies... (work in progre

Post #86by selden » 13.09.2011, 00:08

Somewhere above I recall seeing a question of just how much slower Celestia is when it has a million stars. You can find that out by installing the data sets of 1 and 2 million stars derived from the Tycho Catalog and which are available on the MotherLode. With that many stars, it's reasonable to build a replacement binary star database in order to reduce the load time and to improve the runtime performance slightly.
Selden

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

Re: New star generator for other galaxies... (work in progre

Post #87by Cham » 13.09.2011, 00:30

I now understand clearly the "branches" on my previous HR plot. It's a mistake I made from ignorance about the luminosity classes (this project even teaches me things !).

Now, I'm all confused about the kind of distribution I want to do. I don't know anymore what to represent ! :?

When I started the project, I wanted to restrict myself exclusively to main sequence stars (so that means the luminosity class "V" only. Nomore I, II, II, and IV types). But then, should I take into account the relative populations of spectral classes ? If so, there will be almost no O, B and A stars in the distribution, and about 8% of G stars, 12% of K stars and a wooping 76% of M type ! They wont be visible at all while the user is traveling arbitrarily in the galaxy. I'm not sure this is very interesting. :?

So a random distribution of all main sequence spectral classes, without taking into account the relative population ? For 100 000 stars, is it reasonable ?

I could do what Chris was suggesting : only the most luminous stars, so nomore F, G, K, M stars ! Just a distribution of O and B stars of all luminosity classes.

I feel that this project is in danger of collapsing under the weight of inconsistencies ! :cry:

Really, I don't know anymore what to do. What would be your preferences ?

selden wrote:Somewhere above I recall seeing a question of just how much slower Celestia is when it has a million stars. You can find that out by installing the data sets of 1 and 2 million stars derived from the Tycho Catalog and which are available on the MotherLode. With that many stars, it's reasonable to build a replacement binary star database in order to reduce the load time and to improve the runtime performance slightly.

Could you elaborate a bit more on this ? Can I make a binary version of my STC file while keeping it in the extra folder ? If so, how can I convert a STC file to a binary version ?
"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
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 3 months
Location: Thyrrenian sea

Re: New star generator for other galaxies... (work in progre

Post #88by Fenerit » 13.09.2011, 01:54

Cham wrote:...
I feel that this project is in danger of collapsing under the weight of inconsistencies ! :cry:
....

There aren't inconsistencies imho, just a methodological question: the fact that first were the stars then the men which plots diagrams. HR is an empirical diagram, it need the stars to be already there; is the HR diagram that must be conformed to the stars' features, not the converse.

EDIT LATER:
I agree with Selden; the main's sequence stars evolves; so they can't be put altogether at the same time. It should be as one would put altogether all the animal species from Cambrian to Cenozoic into a single geological era: i.e the Mesozoic. There should be the TRex, but there shouldn't be neither trilobites nor horses.
Never at rest.
Massimo

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

Re: New star generator for other galaxies... (work in progre

Post #89by t00fri » 13.09.2011, 09:31

Cham wrote:Very important point, Chris. Thanks !

So no mass function.

I would always try to start from a realistic HR-diagram (<- Hipparcos, http://www.rssd.esa.int/index.php?proje ... age=HR_dia) and a realistic mass function (N_stars(mass) d mass) as inferred e.g. from the known stellar luminosity distribution via the familiar mass-luminosity relation.

The visibility problematics Chris mentioned above can then easily be accounted for by injecting a suitable brightness selection constraint in the statistical star generation algorithm based on the realistic distributions.

Adding additional cuts in statistical generators is a standard procedure. I usually do this via the well-known Von Neumann acception-rejection algorithm. In this way one arrives automatically at the brightest e.g. 50000 stars without using incorrect probability distributions.

Fridger
Last edited by t00fri on 13.09.2011, 09:43, edited 1 time in total.
Image

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

Re: New star generator for other galaxies... (work in progre

Post #90by Cham » 13.09.2011, 09:38

Fridger,

then what kind of stellar distribution do you propose ? Only the brightest stars ? So does it means only O and B stars of all luminosity classes (I, II, III, IV and V) ?
"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 3 months
Location: Hamburg, Germany

Re: New star generator for other galaxies... (work in progre

Post #91by t00fri » 13.09.2011, 10:01

Cham wrote:Fridger,

then what kind of stellar distribution do you propose ? Only the brightest stars ? So does it means only O and B stars of all luminosity classes (I, II, III, IV and V) ?

Generate > 1 million stars from the best experimental HR diagram (e.g. HIP)/ mass function without applying any by hand modifications. However, accept a generated star only if it is sufficiently bright (method ? la Von Neumann). This finally will leave you with the 50000 brightest stars, say, as obtained from an unbiased sample of > 1 million.

As I already indicated , you can check your obtained sample with the realistic 2M stars set (CML).

Fridger
Image

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

Re: New star generator for other galaxies... (work in progre

Post #92by Cham » 13.09.2011, 10:06

t00fri wrote:Generate > 1 million stars from the best experimental HR diagram (e.g. HIP)/ mass function without applying any by hand modifications. However, accept a generated star only if it is sufficiently bright (method ? la Von Neumann).

And how can I do that ? And what does "sufficiently bright" means ? This is too vague for me.
"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 3 months
Location: Hamburg, Germany

Re: New star generator for other galaxies... (work in progre

Post #93by t00fri » 13.09.2011, 10:16

Cham wrote:
t00fri wrote:Generate > 1 million stars from the best experimental HR diagram (e.g. HIP)/ mass function without applying any by hand modifications. However, accept a generated star only if it is sufficiently bright (method ? la Von Neumann).

And how can I do that ? And what does "sufficiently bright" means ? This is too vague for me.

The actual minimal brightness value will depend on the role your stars are supposed to play in the galaxy rendering. You can easily estimate the minimal required brightness from visibility criteria within Celestia or from the resulting average star distance etc.

Fridger

EDIT: I don't know your technical abilities with the computer, so I cannot give advise here. I only know how I would do it.
Image

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

Re: New star generator for other galaxies... (work in progre

Post #94by Cham » 13.09.2011, 10:24

t00fri wrote:EDIT: I don't know your technical abilities with the computer, so I cannot give advise here. I only know how I would do it.

I don't think I know how to extract the data from a "realistic HR-diagram" on the internet.
"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 3 months
Location: Hamburg, Germany

Re: New star generator for other galaxies... (work in progre

Post #95by t00fri » 13.09.2011, 10:39

Cham wrote:
t00fri wrote:EDIT: I don't know your technical abilities with the computer, so I cannot give advise here. I only know how I would do it.

I don't think I know how to extract the data from a "realistic HR-diagram" on the internet.

I would do it by writing a small Perl script (as usual) that I run through the Hipparcos star catalog at CDS Strasbourg. It picks out for each HIP star (with a measured parallax) the absolute magnitude and the B-V color value. Just as done in your previous reference

http://www.atlasoftheuniverse.com/hr.html

Then you have the data available and can e.g. derive the abs.mag number distribution N_stars(M_abs) dM_abs by projecting the HR-diagram onto the M_abs axis. And so on...

Got to go for lunch ...

Fridger
Image

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 21 years 9 months
Location: NY, USA

Re: New star generator for other galaxies... (work in progre

Post #96by selden » 13.09.2011, 12:29

Cham wrote:
selden wrote:Somewhere above I recall seeing a question of just how much slower Celestia is when it has a million stars. You can find that out by installing the data sets of 1 and 2 million stars derived from the Tycho Catalog and which are available on the MotherLode. With that many stars, it's reasonable to build a replacement binary star database in order to reduce the load time and to improve the runtime performance slightly.

Could you elaborate a bit more on this ? Can I make a binary version of my STC file while keeping it in the extra folder ? If so, how can I convert a STC file to a binary version ?

Unfortunately, Celestia uses only the one binary star catalog file which is in the data directory. It doesn't process binary star catalogs in the extras directory, although it would be very helpful if it could. The file that comes with Celestia contains only the Hipparcos catalog of stars. If you replace the file, the replacement probably should include those stars, too. I think there's a conversion program on SourceForge (there once was for the previous binary file format, anyhow), but it doesn't process STC files. As I recall, it wants the input data to be in a tabular format. The "million star database" Addon on the Motherlode provides a replacement for the binary file.
Selden

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

Re: New star generator for other galaxies... (work in progre

Post #97by t00fri » 13.09.2011, 13:41

selden wrote:
Cham wrote:
selden wrote:Somewhere above I recall seeing a question of just how much slower Celestia is when it has a million stars. You can find that out by installing the data sets of 1 and 2 million stars derived from the Tycho Catalog and which are available on the MotherLode. With that many stars, it's reasonable to build a replacement binary star database in order to reduce the load time and to improve the runtime performance slightly.

Could you elaborate a bit more on this ? Can I make a binary version of my STC file while keeping it in the extra folder ? If so, how can I convert a STC file to a binary version ?

The file that comes with Celestia contains only the Hipparcos catalog of stars.

Yes, but including the new reduction by Floor van Leeuwen, 2007.
http://www.atlasoftheuniverse.com/hr.html

This means the best available parallaxes for the calculation of the required absolute magnitudes!

Much of the respective work has been done already in Andrew's Perl script
buildstardb.pl that resides in src/tools/stardb. The script also contains a host of needed conversion routines, including magnitudes in various standardized filter bases and abs.mag <-> app.mag conversion using the parallaxes. Since MACs include a complete UNIX on the command-line level, I suppose Perl is also available by default.

In addition, there is the C++ code of binary <-> ascii converters (startextdump, makestardb ) for Celestia stars in the same directory.

Edit: But that material is partly outdated and/or not yet ported to the Eigen library etc:
[

The startextdump program converts a binary Celestia star database to an
easy to edit ASCII format. The command line is:

startextdump [options] [<input file> [<output file>]]

The resulting ASCII file can be used very easily also with Maple, Mathematica. Perl can directlyl read in the binary stars.dat file, making another converter superfluous.

Of course, the reverse tool is also available in this directory in source-code form:

Makestardb converts an ASCII star database created by startextdump to a
binary star database readable by Celestia. Makestardb does not support the old star database format; the output files it produces are only usable with versions of Celestia
newer than 1.3.2.

The command line is:

makestardb [--spherical] [<input file> [<output file>]]

]

Edit:

A working binary version of startextdump.exe for new stars may be found at ChrisL's familiar file archive:

http://www.celestiaproject.net/~claurel/celest ... xtdump.exe

Fridger
Last edited by t00fri on 15.09.2011, 21:07, edited 1 time in total.
Image

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

Re: New star generator for other galaxies... (work in progre

Post #98by t00fri » 13.09.2011, 16:47

Cham,

here is another idea:

I converted the binary 2million stars from CML to ASCII format with ChrisL's tool without problems. I can pack them for download to CM if you are interested.

You could even play the following "game" with these real 2 million stars:
convert the given coordinates to galactic coordinates (l, b) along with a vector pointing to the galactic center. Note, conventionally our Sun is taken as the vertex in the galactic plane. Here we rather want to use the galactic center instead of the Sun...

You then may generate a realistic set of stars e.g. for Andromeda (M31) by just modifying the galactic center vector to point to the center of M31 ;-)

That's what I did with my binary stars (visualbins.stc) in the old CM thread
http://forum.celestialmatters.org/viewtopic.php?t=210

++++++++++++++++++++++++
No HR-diagram to generate, yet a realistic brightness and color distribution of these 2 million stars for Andromeda!!! ;-)
++++++++++++++++++++++++

Takes very little time to do.

Let me also mention that the ASCII version of the 2million stars can easily read into Mathematica/Maple. So you may do lots of further analysis with them.


Fridger
Image

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

Re: New star generator for other galaxies... (work in progre

Post #99by Cham » 14.09.2011, 00:59

Finally !

I solved the galaxy rotation issue ! This one was pretty hard :x

I can now orient any star distribution to match any galaxy in Celestia. The Mathematica star generator is now fully functionnal. 8)

As a variation to my project, I made this one which I find very nice. A life scenario in M31 !

Using a rough estimation from the Drake equation, I defined 1000 fictious main sequence stars (the radius are now very consistent for all the stars in the distribution, especially the K stars ! The main sequence smooth curve I'm using is now very good). The stars are distributed on the Galactic Habitable Zone (well, an approximation to it, since it's very badly known). On the picture below, all these stars were marked using a celx script :
Lstars.jpg


Here's their HR plot, with a profile view :
Lstars2.jpg


The average distance between adjacent stars is roughly 4000 LY ! Too bad for civilisation communication ! :wink:

# Population statistics :
# 0 O stars (0%),
# 0 B stars (0%),
# 7 A stars (0.7%),
# 100 F stars (10%),
# 325 G stars (33%),
# 433 K stars (43%),
# 135 M stars (14%).

Take note that there are lots of controversies about the possibility of life around a star located inside a galactic arm, or even in between arms, or under or above the arms (galactic plane)... I don't want to discuss this here.

I'll test and explore further that distribution before releasing it ...

The script is usefull to locate a star :
Lstars3.jpg
"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
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 59
With us: 20 years 5 months
Location: Montreal

Re: New star generator for other galaxies... (work in progre

Post #100by Cham » 14.09.2011, 10:38

Lets populate M33 too ! :mrgreen:

M33.jpg


M33b.jpg


I need a list of all spiral galaxies within 10 millions LY ! Someone ?



EDIT : Fridger,
what is the analytic smooth function that was used to draw the spiral arms templates ? r(theta) = ?
Last edited by Cham on 14.09.2011, 17:57, 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!"


Return to “Add-on development”