AAPT SM 2023 Coding Integration Workshop

Welcome to the AAPT Summer Meeting 2023 Coding Integration and Data Science Integration in High School workshop. The workshop is happening in Ballroom A09 in the convention center.

Registered participants should direct their web browser (Chrome, Firefox, Safari, or MS Edge) to https://stemcoding.herokuapp.com/ and ask your instructor for the join key.

If you want more STEMcoding content, check out the STEMcoding YouTube channel. If you would like to 2.0 graduate credit hours in STEMcoding coursework, check out the AAPT-affiliated courses from STEMcoding.

For those in academia, use this link: http://go.osu.edu/physics_coding

WeTeach_CS Summit 2023

Computational thinking is a natural thing to incorporate into physics and astronomy. Students can learn to create interactive models, create, collect, and visualize datasets, and ask questions that only make sense to answer with a computer. Participants will hear about current research in computational thinking using coding, where science pedagogy can leverage computer science pedagogy to allow students to construct knowledge in both domains. Some model activities using computer programming and lessons incorporating computational thinking will be shared and discussed. All code is available as open source, and all lessons are shared as Creative Commons material.

Here is a list of the coding-based labs and activities I have used in physics and astronomy. There are not really in any kind of order. All work is shared via the Creative Commons Attribution-NonCommerical-ShareAlike 4.0 license. Feel free to use the content here for non-commercial purposes, but be sure to provide attribution.

Hubble Diagram using SDSS DataAstronomyModeling/Data Science
Measuring Distance with LightAstronomyModeling
Relative Abundance of Europium with SpectroscopyAstronomyModeling
Air Drag Modeling with p5jsPhysicsModeling
HR Diagram IntroductionAstronomyModeling/Data Science
Kepler’s 3rd LawAstronomyModeling/Data Science
Air Drag Analysis: Video vs ModelingPhysicsPhysics
RET 2021 Modeling Air Drag with Unity vs p5jsPhysicsPhysics
Exploring Simple CircuitsPhysicsPhysical computing
Micro:bit Stoplight LabPhyicsPhysical computing
Capacitors in Series and ParallelPhysicsPhysical computing
Photoplethysmography with MicrocontrollersPhysicsPhysical computing

Partial Solar Eclipse April 8th, 2024

Images of class solar observing event (Feb 3, 2023): https://flic.kr/s/aHBqjAzkSa

We have scoped out a spot in the front of the school with a clear view of the southern sky and lots of room for people outside. We have a new Sun Spotter scope which will be run by one of the other science teachers to make sure no one ends up with the sun reflected in their face. We also have two pairs of solar-safe binoculars that the teaching team has been trained to use. We also have 4-5 pairs of regular binoculars, which can be turned into solar-safe using gaffers tape and a pair of eclipse glasses. We will tape each solar filter over one binocular lens using gaffers tape to ensure no stray light enters the lenses. There is also a large tarp where we can poke a few small holes to make a pinhole camera setup.

On the morning of April 8th, the teacher team will gather the equipment and confer with the admins on how and when students will be allowed outside. The idea is to have the equipment set up one hour before the start of the eclipse and run through 4th contact if possible. Students will be encouraged to make their own pinhole camera setups using cereal boxes, large cardboard boxes, or something similar. The area where observing will be happening will also have as many eclipse glasses as possible to ensure no one is looking at the sun without protection at any point.

One telescope will be set up low to do projection viewing of the sun if the teachers are comfortable using the telescope without me there. There will also, hopefully, be a computer and large TV set up near the main doors leading outside with web coverage of the total solar eclipse so people can watch along safely.

Equivalent Width Activity for EXES

Searching for Europium using Stellar Spectroscopy

The complete activity is meant to take a full class and maybe even two.

The visible spectrum of the sun. Credit: OpenStax Astronomy. Fraknoi, Morrison, and Wolf

We are going to compare the relative amount of the elements nickel and europium in a couple of stars.

Plotting A Stellar Spectrum

Watch the “HOW TO” video: https://www.youtube.com/watch?v=XkOUVOJrtrQ

  1. If you haven’t already, copy the data to your Google Drive (use your initials in the file name).
  2. Highlight the 2 columns of data. Most spreadsheets will assume the left column goes on the x-axis and the right column goes on the y-axis. This data is ready to go since column A is the wavelength in Angstroms and column B is the relative flux or amount of starlight. You can think of this as the brightness of a particular wavelength.
  3. The easiest way to measure with the plot is if the chart type is set to ‘smooth line’.
  4. Change the title of the graph to “Star name Spectrum” but use the real star name. 🙂
  5. Change the y-axis title to Relative Flux or something similar.
  6. Change the limits on the x-axis and y-axis so just the region with the absorption feature is visible.
  7. Change the tick marks on the x-axis and y-axis so you can easily read off the plot. I used 0.05 on the y-axis with 4 minor marks and 0.1 on the x-axis with 4 minor marks. I also turned on all the various tick marks.

Determining atomic abundance: Equivalent Width

Example plot for determining the equivalent width for absorption feature.

How to measure equivalent width

  1. First, count how far down from 1on the y-axis the “bell curve” bit goes and write that in a cell labeled Max Abs or something similar. This is the maximum absorption for this feature.
  2. Next, in an adjacent cell, hit = to enter a formula and click on the cell where you typed the value for the max absorption and divide that by 2. This is the half-max value.
  3. We will use the half-max value to count down from 1 on the y-axis to where the curve meets that y-value on both the right and the left. Write down in an empty cell the left wavelength where the curve meets that half-max value and then write down in another empty cell the similar value on the right side of the curve.
  4. Next, click an empty cell and click = to enter a formula. Be sure to put the difference between the right and left values in parentheses before you multiply by the max absorption.
  5. This value represents the equivalent width for this spectral feature. This is a numerical way to describe the relative abundance of a particular atom for a star. (Note: this is not the actual number of a particular atom.)
  6. Repeat for the other stars!

Plotting Spectra with Python and Google Colab

You can also try out some Python coding to plot the stellar spectra using Google Colab Notebook. Give it a try!

Google Colab Notebook Python Plot of Spectra

CT and Kepler’s 3rd Law

Students in physics and astronomy are often expected to be able to understand, explain, and interpret basic orbital mechanics using Kepler’s law of orbital motion. The work of Isaac Newton to expand and generalize Kepler’s laws is often the focus of student activities. Luckily, we are awash in authentic data, which students can leverage to explore how we came up with these laws and their applications to modern science learning.

One aspect of using orbital mechanics in an introductory physics or astronomy class is determining something unknown about an orbital system. For example, students can use periods and orbital radii of objects in a system to determine the central object’s mass. Linearization is a common way for a student to achieve this goal. When a student linearizes data, the goal is to produce a linear relationship such that the slope of the line can reveal a physical parameter of the system, such as the central object’s mass.

The scenario we are describing is perfect for computational thinking (CT). We can take data and reduce it to create a linear regression where the slope can lead to determining the mass of the central object. The video below shows an example of me using the periods and distances of the planets in our solar system to explore Kepler’s 3rd law through linearization. This example uses Desmos, but several modes of CT work here, including using a spreadsheet or computer programming. Exploring Kepler’s laws through data is also an application of data science pedagogy.

The Kepler spacecraft made some incredible discoveries over the years. The planetary system Kepler-11 is fascinating. It is a very compact solar system with six planets. Of course, the spacecraft is named after Johannes Kepler, who first empirically determined the three famous laws of planetary motion.

Kepler-11 System from NASA Exoplanet Catalog

This small dataset would make a great computational thinking (CT) activity. CT can mean writing programming code, working with a spreadsheet for data science, or creating or using a model or simulation. The goal is to explore Kepler’s third law of planetary motion.

Kepler’s 3rd Law

In the first version of this activity, students linearized the data set using Kepler’s third law of planetary motion to determine the mass of the star Kepler-11. Check out the spreadsheet version here. This is an introductory exercise to working with data in a spreadsheet. Students create a plot and answer questions using some basic skills. Using formulae and linear regression techniques with a spreadsheet can be very cognitively demanding for students, so leave time for scaffolding and differentiation.

Spreadsheet Version of Kepler’s 3rd Law Lab

Although the spreadsheet version of the lab worked out pretty well, I decided to make a Desmos calculator version. Students can work with the whole list of planetary data all at once, more like creating a numerical model to find the star’s mass. Check out the Desmos version here.

Desmos Version of Kepler’s 3rd Law Lab

Finally, I decided to create a version of Kepler’s 3rd law lab using some Python code in Google Colab. This version uses some standard data science techniques to determine the central star’s mass in the Kepler-11 system. Check out the Google Colab version on my GitHub repository.

Google Colab Python version of Kepler’s 3rd Law

Over the years, I have used these three activities individually and in concert sometimes. In my Astro 101 classes, I treat these activities as guided inquiries and give many hints and help. In my AP Physics C Mechanics classes, I might expect students to figure things out independently or in small groups.

While the only data I have about these activities is anecdotal, my research supports the general claim that students’ attitudes about computing improve when CT and data science are used in a science course. My experience was that using CT and data science to explore Kepler’s 3rd law helped students construct knowledge about building and using mathematical models while also cementing the use of the law in a learning context. For the most part, students have fun and feel a sense of agency about their learning. Using CT and data science, students learn not just an algebraic formula but also data literacy and CT skills.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.