# Filter data from StarData based on Distance from Sun?

Posted 1 year ago
1092 Views
|
|
0 Total Likes
|
 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 lightyearsand 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-1STThe 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]