Message Boards Message Boards

0
|
5566 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Filter data from StarData based on Distance from Sun?

Posted 6 years ago

I am trying to get the name of stars that are in a range of distances from the Sun. The Input I have tried is:

EntityValue[EntityClass["Star", {"DistanceFromSun"->Between[{Quantity[10,"LightYears"],
Quantity[20, "LightYears"]}]}],  {"Name","DistanceFromSun"}]

which returns empty set. I've also used StarData instead of EnityValue, but I get the same result. Looking around in the documentation, I found an example in ParticleData that appears similar:

EntityValue[EntityClass["Particle",{"Mass"->Between[{
Quantity[900, "Megaelectronvolts"/"SpeedOfLight"^2], 
Quantity[1000, "Megaelectronvolts"/"SpeedOfLight"^2]}]}],{"Name","Mass"}]

which returns 9 particles.

Using Wolfram|Alpha to get a code example, I input:

List of stars with a distance from the sun between 10 lightyears and 20 lightyears

and several other variations. It doesn't understand my query. I have tried the Natural Language to no avail. Is there something I'm missing or does each property have a different way of filtering values?

Welcome to Wolfram Community! Please make sure you know the rules: https://wolfr.am/READ-1ST

The rules explain how to format your code properly. If you do not format code, it may become corrupted and useless to other members. Please EDIT your posts and make sure code blocks start on a new paragraph and look framed and colored like this.

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

enter image description here

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract