0
$\begingroup$

I'm fascinated by the capability of the astronomical data available in V13. (Running 13.0.0.0 on a Mac M1.). Certain data such as altitude and azimuth for a star position should be time dependent but I can't figure out how to specify the time in the EntityValue request.

If I ask for the property with no time object qualifier I think I get a current value:

star = ctrl=Kolchab (* note, I'm not sure how to indicated free form input in this question *)
EntityValue[star, "Azimuth"]
(* Quantity[MixedMagnitude[{347, 5, 5.*10^1}], 
 MixedUnit[{"AngularDegrees", "Arcminutes", "Arcseconds"}]] *)

and if I wait a few minutes and try again, I get a different value:

EntityValue[star, "Azimuth"]
(* Quantity[MixedMagnitude[{347, 32, 3.*10^1}], 
 MixedUnit[{"AngularDegrees", "Arcminutes", "Arcseconds"}]] *)

So, I'm guessing that the data is the value current at the time of the request.

However, I would like to be able to specify a specific time (actually a set of times) but while I see how to specify a data qualifier I don't see how to specify the time.

Any thoughts?

$\endgroup$

1 Answer 1

2
$\begingroup$

Use EntityProperty with the provided "Date":

date = DateObject[{2014, 4, 9, 22, 0, 0}];

EntityValue[Entity["Star", "Kochab"], 
 EntityProperty["Star", "Altitude", {"Date" -> date}]]

(* Quantity[MixedMagnitude[{53, 58, 8.}], 
 MixedUnit[{"AngularDegrees", "Arcminutes", "Arcseconds"}]] *)

For multiple dates, map over the list of dates:

date1 = DateObject[{2014, 4, 9, 20, 0, 0}];
date2 = DateObject[{2014, 4, 9, 23, 0, 0}];
dateRange = DateRange[date1, date2, "Hour"];

EntityValue[Entity["Star", "Kochab"], 
 EntityProperty["Star",    "Altitude", {"Date" -> #}] & /@ dateRange]
$\endgroup$
3
  • $\begingroup$ Thanks. This is great. I knew DateObject worked but didn't realize it also could be used to specify the time so was looking for a TimeObject construct. Much appreciated. $\endgroup$
    – jmm
    Commented Dec 29, 2021 at 15:13
  • $\begingroup$ Great :-) Since it provides the solution, please consider accepting the answer. $\endgroup$
    – Domen
    Commented Dec 29, 2021 at 15:23
  • $\begingroup$ Done - and thanks again. $\endgroup$
    – jmm
    Commented Dec 30, 2021 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.