We can easily get properties of individual stars with StarData
, i.e. StarData[star, property]
. But this is not very useful. I might as well look up the star in Wikipedia or elsewhere.
Such a database becomes useful not as an encylopedia, but as a comprehensive dataset which we can use to calculate various statistics and relationships between properties. For example, plot a HertzsprungRussel diagram.
How can I retrieve a property of all stars in the database?
This seems to work in principle, but in practice it takes such a long time that it is plainly unusable. It would probably take more than an hour to finish.
magn = StarData[EntityClass["Star", All], "AbsoluteMagnitude"];
In that time I could google up several easier to use databases, download the data, figure out how to import it to Mathematica, etc. And that's just one property.
Is there a better way then? Is there something wrong with the syntax I am using that causes this to be so slow? If not, then what is the point of all these *Data
functions, given that several of them are practically unusable unless we're satisfied with looking at items (stars) one by one? Is there anyone on this forum who is able to make real practical use of this function? If yes, how?
StarData
contains about 100,000 stars. That's not a lot. 100,000 floating point number take less than a megabyte of storage and arithmetic with such arrays typically takes less than a millisecond.