wolfram-language - 当天文学“足够黑”时,如何使用 Wolfram-Language 计算“适合观看之夜”的日期?
问题描述
我正试图围绕 Wolfram 语言(我没有使用 Mathematica 的经验)。
我注意到“它”有“关于”天文学的“知识”。所以我想知道我是否可以计算以下内容:
tell me the dates and start/finish times of 'dark, socially friendly viewing opportunities during school holidays' where
* 'socially friendly' means between after 10am and before 10:30pm in local time at my vantage point
* it is 'dark' for at least an hour
* where 'dark' means:
* it's between astronomical sunset and astronomical dawn
* the moon is either not risen, or less than 15% of its face is lit
* 'school holidays' means school holidays in NSW, Australia, in 2019 (which Wolfram Alpha doesn't 'implicitly know')
put such dates and times as events into my Google Calendar somehow :-)
解决这个玩具问题将帮助我欣赏在这个平台上解决问题的“方法”,它似乎迎合了 Wolfram 系统的优势。另外,每年查找资料可以为我节省一两个小时:-)
我将如何在 Wolfram 语言“程序”(方程式?)中处理这个问题?我可以在 Wolfram-Alpha 中执行此操作还是需要获取引擎?
解决方案
不是您问题的完整答案。只是一个起点。
tz = Entity["TimeZone", "Australia/Sydney"];
date = DateObject[{2019, 07, 14}, TimeZone -> tz];
Sunrise[Entity["City", {"Sydney", "NewSouthWales", "Australia"}], date, TimeZone -> tz]
同样对于Sunset
。
sunset = Sunset[
Entity["City", {"Sydney", "NewSouthWales", "Australia"}],
DateObject[{2019, 07, 14}, TimeZone -> tz], TimeZone -> tz]
您可以从结果中添加/减去 2 或 3 小时以获得“天文”值。
月相
MoonPhase[date]
(* 0.8913 *)
MoonPhase[date, "Name"]["Name"]
(* waxing gibbous moon *)
日落时月亮的位置
MoonPosition[Entity["City", {"Sydney", "NewSouthWales", "Australia"}], sunset]
(* {98.67\[Degree],25.03\[Degree]} *)
观看此视频,了解 WL 中与天文和空间相关的实体数据的概述。
推荐阅读
- java - DataSourceAutoConfiguration 之前的 Bean 初始化
- javascript - 如何在 React/Redux 中卸载之前以 100% 显示进度条组件?
- google-sheets - Google表格:尝试在一个单元格中获取价格,具体取决于您在不同单元格中选择的产品
- java - Xpath 复选框定位器
- erlang - Erlang中模式匹配到单数下划线符号'_'的含义
- python - 当 numpy dtype 是自定义转换器中的“对象”时,将 nan 转换为零
- android - 在Android中显示4层列表
- dpdk - dpdk testpmd 使用 fm10420 NIC (fm10k) 转发大量丢包
- python - Python selenium如何仅循环包含特定类名的行
- flutter - com.google.android.gms.providerinstaller 是什么意思?