This page has documentation for the coding activities you can find on my GitHub here. More detailed info for each activity can be found in the individual activity README files on GitHub.
My GitHub repository Astronomy has python activities on various topics in astronomy. They are in the form of interactive Jupyter notebooks which can be accessed and run online. They are intended to take 1-2 hours.
Each code has a teacher version with all outputs and completed code. These have the suffix Teacher. The student file is much smaller as it is missing the outputs and has code completition tasks for the students to complete.
At the start of the code is the Aim of the activity along with a Predict section which encourages the students to think about the topic before starting the activity.
The goal of the coding activities are to process and visualise data, and to extract physical insights from them (as described in the AAPT report below). However by performing the activities students will inevitably also learn debugging, how to convert theory/models into code, and how to present data formally in a document or presentation.
The outputs (images, movies etc) were designed to be a starting point for my students to put their own data and visualisations in their reports and presentations. My hope is this will promote a deeper understanding of the topic and better engage the students, encouraging ownership and pride in their work.
Try the Code: You can now test some of the activities on our JupyterHub. If you would like to do this please email me! Since Oct 2021 the server is no longer running continuously to reduce running costs. I will set it up for 48 hrs if you would like to test some activities.
When the server is running sign up here with a username and password then head over to hub.astropython.com and log in! (It's important to use the second link after signing up so you get sent to the Welcome document) The welcome document has links which pull the activities you want to try from my GitHub. If something doesn't work please let me know! The server is built for my students so it can only handle 20-30 people at a time. If you do test out some of the activities let me know what you think.
NOTE: Since the server is not running continuously, if you want to keep your work please download it to your local computer, do NOT assume it is safe forever on the hub.
Otherwise you can send individual notebooks (with the required files) to students and they can upload them to jupyter.org/try. If you have your own JupyterHub setup clone the repository and do as you will!
You can also use Google Colab which is free to use!
You can adapt and use the activities how you like! Just remember to reference the original activity on GitHub.
You can make activities easier by:
You can make activites harder by:
Make activities easier for younger students and harder for older ones. Or maybe change the focus of an activity from code completion to data analysis with the figures the code creates, or perhaps a bug hunting exercise. The activities can be adapted endlessly.
This Jupyter Book has a treasure trove of tools and ideas for using notebooks in the classroom.
Adam LaMee, Scientific Computing Resources, Url: adamlamee.github.io/CODINGinK12/
Thomas Albin, Space Science with Python series, Url: https://twitter.com/MrAstroThomas
Peter Smith, Python Tutorials, Url: https://petercbsmith.github.io/
Brown & Wilson, Ten quick tips for teaching programming, PlosCompBiol, Url: doi.org/10.1371/journal.pcbi.1006023
American Association of Physics Teachers (AAPT), Computational Physics Report, Url: aapt.org/Resources/upload/AAPT_UCTF_CompPhysReport_final_B.pdf
PICUP, Integrating computing into physics, Url: compadre.org/PICUP/webdocs/About.cfm
astronomycenter Resources, Url: compadre.org/astronomy/index.cfm
There is a Data directory alongside the activity directories which contains all the data files for all activities. For descriptions of all the data files available go to Resources in the navigation bar then Data.
These are just brief summaries of each activity. Visit the activity directory on GitHub for the aim and prediction questions, all the inputs/data, and output images/files.
Click on one of the contents links below to jump to the activity.
Students upload an image of the moon they took and then annotate it. From the image they calculate sizes and depths of craters using the SkyField package. Requires students to calcualte the resolution of their telescope (or camera). They can then compare their image to known data and the included Lunar Reconnaissance Orbiter (LRO) and Lunar Orbiter Laser Altimeter (LOLA) data.
Students visualise the rings of Saturn and then the other gas giants using data from the Ring-Moon Systems Node of the Planetary Data System. They plot the inner satellites on their figures along with their Roche limits (rigid and fluid) to see which moons are about to break up!
Students visualise the Roche limit using the N-body simulation package rebound. They calculate the location of resonances between moons and between moons and ring particles. Then they identify ring features associated with these resonances. Finally they look briefly at shepherd moons.