astropy / astropy-tutorials

Tutorials for the Astropy Project
BSD 3-Clause "New" or "Revised" License
290 stars 174 forks source link

Notebook to do simple solar system simulation #457

Open pllim opened 4 years ago

pllim commented 4 years ago

I adapted one to use astropy at https://github.com/pllim/playpen/blob/master/notebooks/solar_system.ipynb . @kakirastern suggested I open a PR but I opted for an issue instead. If you really want it here, I can open a PR. Thank you.

p.s. It is sure very convenient and way more readable to use astropy units. I did notice a performance hit though. But then again for a tutorial, readability is more important. This notebook is not meant for serious simulation.

kakirastern commented 4 years ago

Thanks for the issue @pllim! Will first discuss the performance issue with the team during the next Learn Astropy telecon/co-work hour. Will keep you posted.

pllim commented 4 years ago

Re: Performance, most of the examples I found only have the Sun and one or two other planets "active" (the rest commented out). I guess that's how they dealt with it.

eblur commented 3 years ago

I really like this, also as a nice introductory example for object oriented programming and building classes in Python.

Performance would definitely be an issue for our testing infrastructure, so maybe we should stick to using one or two planets. Adding the additional planets could be an exercse.

@kakirastern how about you start a Colab notebook with this as the start?

kakirastern commented 3 years ago

Yup, sure @eblur I could start a Colab notebook and have it ready by the next time we meet

kakirastern commented 3 years ago

Just started a colab notebook and check that it has been properly adapted where applicable to run on Google Colab: https://colab.research.google.com/drive/19ybq701_sle0RPv0EQEgf7YYSbg_oi0m?usp=sharing

pllim commented 3 years ago

@kakirastern , feel free to ping me if you need help with specific things. I am not sure what I am supposed to do on Google Collab otherwise. I'll let you take the lead. Thanks!

kakirastern commented 3 years ago

Thanks @pllim 😊 Sorry just got your message today, and am working on the notebook now during this week's Learn Astropy telecon / co-work hour

kakirastern commented 3 years ago

Let me submit a PR for this today 😉