spacerest / moon Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
currently there's a dictionary that has the nasa vis id for each year. Figure out how to do this another way.
Also add an option for south up visuations (is it the same just flip the north up viz or does that miss something?)
>>> ui.set_moon_phase()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sadie/Projects/moon/moon/dialamoon.py", line 50, in set_moon_phase
raise e
File "/home/sadie/Projects/moon/moon/dialamoon.py", line 44, in set_moon_phase
if datetime.strptime(date, '%Y-%M-%d').year != datetime.strptime(self.moon_datetime_info['time']+'C', '%d %b %Y %H:%M %Z').year:
TypeError: strptime() argument 1 must be str, not None
The year in .moon_datetime_info
stays at 2019
even though the package gets the moon for 2020
:
>>> ui.set_moon_phase("2019-01-05")
True
>>> ui.get_moon_phase_date()
datetime.datetime(2019, 1, 5, 9, 0, tzinfo=datetime.timezone.utc)
>>> print(ui.moon_datetime_info)
{'time': '05 Jan 2019 09:00 UT', 'phase': 0.46, 'age': 29.069, 'diameter': 1786.9, 'distance': 401096, 'j2000': {'ra': 18.4926, 'dec': -21.4849}, 'subsolar': {'lon': -168.825, 'lat': 0.316}, 'subearth': {'lon': 3.622, 'lat': -2.295}, 'posangle': 355.6}
>>> ui.set_moon_phase("2020-01-05")
True
>>> ui.get_moon_phase_date()
datetime.datetime(2020, 1, 5, 9, 0, tzinfo=datetime.timezone.utc)
>>> print(ui.moon_datetime_info)
{'time': '05 Jan 2019 09:00 UT', 'phase': 0.46, 'age': 29.069, 'diameter': 1786.9, 'distance': 401096, 'j2000': {'ra': 18.4926, 'dec': -21.4849}, 'subsolar': {'lon': -168.825, 'lat': 0.316}, 'subearth': {'lon': 3.622, 'lat': -2.295}, 'posangle': 355.6}
"The basic format for a Dial-A-Moon API call is:
https://svs.gsfc.nasa.gov/api/dialamoon/{UTC timestamp in YYYY-MM-DDTHH:MM}
Note: there is always a letter T in between the date and time, and it is not something that should be converted" svs.gsfc.nasa.gov
maybe it isn't compatible with some versions of python3
I don't know if this package really benefits from having the ability to return the numpy.ndarray version of the image. It could be worth simplifying this so there aren't such large dependencies.
Good day, just a tip: It'd be great to have an option of downloading Moon images even per hour as SVS NASA provides them.
Thank you for the package and best regards, Pavel
TypeError('Expected maxsize to be an integer or None')
Per https://stackoverflow.com/questions/47218313/use-functools-lru-cache-without-specifying-maxsize-parameter, lru_cache decorator needs parentheses
/home/sadie/Projects/moon/moon/terminal_ui.py:11: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
plt.show()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.