January 18, 2024

Energy usage dashboards for teaching physics?

 I just learned about three pretty cool dashboard webpages for showing students energy production / consumption which might be useful for discussing how electrical energy usage is related to climate change. 

The first one covers a large part of the globe: https://app.electricitymaps.com/map

The next two are specific to the United Kingdom: https://renewables-map.robinhawkes.com/#5.97/54.23/-3.617 and https://grid.iamkate.com/

I'd love to know about other options and if anything like the last two exist for North America or the U.S. Let me know if you've seen anything like these that I should be aware of!

December 04, 2023

Really interesting OpenBook titled "Engaging with Everyday Sounds"

I have had a tab open in my browser for several months to a book called Engaging with Everyday Sounds.  I'm sure that I discovered this book through one of the podcasts that I subscribe to related to acoustics, but I have since forgotten which podcast it was. 

This book is interesting not only due to the content but also because it is an OpenBook and therefore free to read online. Perhaps what is most unique about this book is that embedded within are sound recordings related to the chapter material.

This is neat work, and I would like to read it more closely rather than just the light skimming that I do every time I return to the tab.

December 01, 2023

Social Justice in Acoustics and Soundscape Research

I recently listened to a great episode of one of my favorite podcasts - 99% Invisible - that I just can't get out of my head. The episode was called Home on the Range - if you have yet to hear it, you should go listen to it now.

The episode is a profile of a suburb of Cincinnati, a majority-Black town neighbored by a gun range used by the Cincinnati police department. For a variety of structural and historically racist reasons, the town had to build housing incredibly close to the gun range.  The focus of the episode is mainly on the reasons why that came to be, how the situation has gotten worse over time, and, finally, a possible resolution to the issue. 

What struck me about this was that it seems clear to me that this is a type of social justice issue that the community of people who work in the field of acoustics and especially those in the field of soundscapes should have been aware of years (or decades!) ago.  Some people in the acoustics research community may have heard of this town and the noise situation, but for me, it was a totally new story.

I don't mean to compare this to the story of Black Wall Street in Tulsa, OK - but I definitely feel echoes of that history in my reaction to the podcast episode.  When I think of soundscapes as related to social justice, I can think of examples of airplane flight paths over low-income neighborhoods and I can think of examples of urban soundscape research with possible links to increased health risks, but I feel that I don't have a handle on the state of soundscape work and where there are opportunities to use acoustics to make people's lives better.

If anyone out there does this sort of work, let me know!

April 10, 2023

Something I'm reading intersected with stuff I"m listening to

Around the end of the year, I listened to this episode of 99% Invisible which featured a story about how emergency vehicle sirens use higher sound levels than they historically did. The podcast mentioned the story was a part of the book "Golden" about the theme of silence in the world today. That sounded interesting, so I purchased the ebook to read.

I've been reading the book and enjoying it. The book is less about the acoustics of silence and more about the psychological aspects of searching for silence (or peace) in a loud and chaotic world. Still, it has been a worthwhile read so far.

I was a bit surprised to find an episode of Twenty Thousand Hertz also titled "Golden," which was also based on the book.  It, too, was a really great episode - I recommend checking it out.

March 17, 2023

Link dump from "Back to Work" podcast (episode 605)

I've listened to the "Back to Work" podcast since it started. If you have never listened to this podcast, it's a bit hard to explain. Initially, it was about productivity at work. Over time it has become less about that and more about all sorts of issues related to existing in the varied environments that we all exist in. The topics cover a wide range: work, home, online, offline, hobbies, Apple, markdown, and productivity.  This particular episode had a great set of shared links that I wanted to remember. My favorites from the episode were:

March 15, 2023

Why does Rice play Texas?? A podcast episode about Kennedy's moon speech.

This episode of the podcast "It Was Said" has been in my playlist for months now.  I've listened to pretty much the whole episode, and I think it's great. I'm biased, though, as a complete fan of Kennedy's "We choose to go to the moon" speech. I just wanted to be sure I could find this episode for sharing with students in physics or astronomy class.


March 14, 2023

Cover of the book "Sundown Towns" by James LoewenCover of book titled "I alone can fix it" by Carol Leaning and Philip RuckerCopy of book titled "Caste" by Isabel Wilkerson

I'll admit up front that I'm over three months past when most people do a year-end review. But it's spring break for me, and I almost feel like I have time to think about things like this for a few seconds. 

I like to read books. I'm certainly not the fastest reader out there, nor do I end up reading a huge amount of books each year, but usually, I'm able to finish at least 25 books a year. Last year, I only read 17 books.

As the end of the year approached, I looked back at the books I had picked and noticed that the lengths of books I was reading were trending upward. In 2020, the books I read had an average length of 314 pages. In 2021 it was 337 pages. Last year it was 342 pages. 

The longest book I read was "Sundown Towns" by James Loewen. Not only was that book long, it was also a slow read for me. I can't exactly explain it - the book never seemed to drag, but yet it was the type of book that took more deliberate reading.

Another long book was "I Alone Can Fix It" by Carol Leonnig and Philip Rucker. This was about the last year of the Trump presidency. I try not to read too many contemporary political books, but in 2021 I had read a book about the first three years of the Trump administration, so I figured the Leonnig and Rucker book would be a good way to finish the story of what happened in the White House.  In retrospect, I'm a bit ambivalent about my decision to read both of those books. I think they were fine choices for what they were, but I'm not sure how much they will stick with me long term.

The last specific example of a long book I read was "Caste" by Isabel Wilkerson. Out of the 17 books I finished in 2022, this was the book with the highest average rating on Goodreads. I enjoyed this book, although there were some chapters in the middle which I felt dragged a bit. Wilkerson wrote about an event that happened to her at an unnamed business in Chicago towards the start of the book. I am positive that I had either heard her tell that story on a podcast or in a radio interview well before her book was published, but I couldn't find where I had heard it before. I definitely recommend this book even though it was a bit long and had a few slow parts to it. There is a reason it was so highly rated by many people.

I think another reason I ended up finishing fewer books than I wanted was that I am mostly reading books that I check out from the library as ebooks. Often times, I don't finish a book before it is due and then there is a hold on the book while others read it. I end up with a number of books-in-progress that I'm always planning to come back to after finishing the library books. 

So far this year, I've only finished three books. I'm probably already behind in my goal for finishing 25 books this year. That's okay, though. I still like reading whatever I can.

March 13, 2023

The value of doing science - a podcast recommendation

I listen to a lot of podcasts - so many that I'm usually weeks (or months) behind on several that I subscribe to. A fairly recent episode of Radiolab definitely caught my attention, though.


This episode started by introducing listeners to the "Golden Fleece" Award, a made-up award by a long-time senator from Wisconsin. The premise of the award was that there were scientists squandering taxpayer money on frivolous research. Having seen and heard politicians do this for as long as I have been involved in science, I was bracing for bad news. At best, I figured that the episode would debunk the idea of frivolous studies but then go back and say that the politicians have a duty to make sure the money is not wasted.

The episode was so much better than that. 

I don't want to spoil it for you if you haven't heard it already - just go listen to it! There's stuff to share with your students if you teach or your family if you do (or just love) science. I learned about a type of snail I had never heard of, the cone snail, which is just super fascinating! 

March 11, 2023

Bioacoustics of whales in the news!

Last week I caught this article in the Washington Post about how whales can use "vocal fry" in some of their sound production. The Washington Post article definitely used the hook of vocal fry as being associated with something that (often, young) women face criticism for. I have never understood why so many people seem to have extreme opinions about how people's speech sounds in terms of the creakiness or register of the voice. I am just not sensitive to it, and although I have heard people with distinctive voices, I guess I default to trying to judge them by what they say rather than how they sound as they say it.

Anyway, back to the science presented in the article. The source of the research was a recent paper in the journal Science. I don't have access to this journal, but I did poke around a bit on the page enough to read the abstract and "Secrets of whale vocal anatomy" paragraph. I downloaded the videos included in the supplementary materials. If you're a fan of seeing how science is done, it's always interesting to get a peek into the process by watching videos like these. The footage is raw and different from what you might expect in a science documentary. I love stuff like this! 

I also skimmed through the references and noted several citations to articles from JASA - I'm sure there were several ASA members pleased to see their work cited in Science.  

Anyway, bioacoustics is a really fascinating field and I'm happy to see it get noticed by these publications. I sort of wish the fraught topic of vocal fry in humans hadn't been used to make the science seem catchier, though.

February 17, 2023

This new meta-analysis of the effectiveness of mask-wearing was more interesting than I expected

There is an updated meta-analysis of how respiratory illnesses spread and the effectiveness of prevention techniques such as hand-washing and mask-wearing. I didn't expect to be thinking much about the effectiveness of mask-wearing or not anymore, but I was reading a recent newsletter from The Atlantic which featured an interview with the author of an article breaking down the meta-analysis paper. (Subscription probably required for The Atlantic.)

I did spend what felt like a lot of time before the Fall semester began in 2022 trying to figure out what sort of language I was going to put in my syllabus regarding masks.  What I finally came up with was this simple policy: "Masks are optional, but respect for others is not. Some people may choose to wear a mask some or all of the time, and some people may choose never to wear a mask. Either choice at any time should be respected." That language seemed to work well, and I've been reasonably happy with it. 

I had a more difficult time figuring out if I should be wearing a mask or not. On the one hand, I am reasonably healthy and not at a high risk for hospitalization with a COVID infection.  On the other hand, long COVID is a real thing and as a scientist I should probably be practicing what the science says is best policy. What I finally came to realize was that the worst part of wearing a mask while teaching was that it made it difficult (in some cases almost impossible) to build relationships with students in my classes. So, I'm taking a calculated risk that the benefit of more easily building trust and rapport with students in my classes outweighs the risk of getting (and spreading) COVID.

What I found fascinating about the new meta-analysis was the conclusion that it was difficult (or impossible) to make any population-level conclusions about the effectiveness of wearing masks.  That doesn't negate the science which says on an individual level that masks provide reasonable protection for the wearer. I'm hoping that what I read is not just a confirmation of a prior belief - I'm trying very hard to be open minded and not just falling for a confirmation bias trap.  But still, it does seem a lot more in-line with what I have already been doing regarding masks - not masking when building relationships is important and masking in crowded/not-well-ventilated spaces where I'm not trying to build rapport with anyone I interact with.

I also think this sort of balance of when to mask or not helps remind me that other people can choose to wear masks for individual reasons. None of those reasons need to be known to me or anyone else, really. And whether or not the individual masking has a measurable population-level effect doesn't really matter, I suppose. But I also figure it can't make the spread worse, right?

February 15, 2023

It's like "Slow TV" but for space geeks...

Remember a few years back when the Scandinavian import to Netflix was "Slow TV" featuring long train rides or marathon knitting sessions?  All of these were shown in real-time, using high-quality cameras, except nothing was edited for time.

May I present to you the Slow TV equivalent for space geeks - an 8 hour spacewalk shown in real-time:


I left this running for a bit in a background window today, and it was very soothing! I wish my workday was in microgravity!!

I can only imagine what it would be like to have a camera following me for 8 hours during my workday.  There would be interesting times during the day, like during classes and labs. Then, there would be the hours of tedious email answering and trying to get stuff prepped for the next class. Clearly there is a reason that type of Slow TV has never been attempted. 😄

February 14, 2023

I miss old twitter

 I was one of the users of the Tweetbot client for Twitter. Back in January the access to twitter got switched off from the app and since then any user will see this when launching the app:

I used to read twitter in chronological order. It's not clear to me that I can do that anymore and I'm not really interested in letting an algorithm decide what is important for me to read. 

I'm not writing this to say I'm “leaving twitter” but I'm not really able to use it the way I want anymore. That bums me out, but eventually I hope to figure things out. 

January 16, 2023

Ways to make graphs for class use

I seem to at least once a semester realize that I have forgotten all the apps and websites that I've seen that help to produce graphs for class use.  These graphs can be used for formative assessments or quizzes/exams in class.  In no particular order:

Motion map maker (credit ???)

Graph template on Desmos (credit @fnoschese)

Adjustable graph template on Desmos (credit @MrJoeMilliano)

Remix of above (credit @a_freeparticle)

GraphSketch.com (I have not used it, I just sort of discovered it by googling.)

There is a pretty good Mac app called GraphSketcher, which is no longer in development, but mostly still works.  Alternatives to GraphSketcher are mostly programming environments.

There's another Mac app called Grapher which is basic but sometimes useful. 

I have downloaded a spreadsheet with adjustable sliders (filename Adjustable XVT Graphs_2020_Sliders_VBA.xlsm) for making kinematic graphs. (credit Dan Hosey) I can't find a current link to that spreadsheet, but here is version Dan put on Desmos.

Here's a video demonstrating how to make nice graphs in Inkscape. (Credit Marco Almeida)

The oPhysics site has a graph drawing page. (credit ???) Also, that site has OTHER physics drawing tools that I should try to remember.

I'll try to update this page in the future as I (re)discover other options.

February 02, 2019

STEM Scholar Colloquium Series Spring 2019


I'm pretty excited to see our line-up of speakers that we have invited this semester for the STEM Scholar Colloquium Series at JJC this semester.  It's great that we were able to invite an engineer from Lockheed Martin - we haven't had any engineers come speak at JJC that I can remember since I started there.  I'm also personally looking forward to the physics talk in March.  Finally, I know that everything I hear in April will be new to me, since I've never done anything related to biochemistry.  I'm really excited to hear from all of the speakers!  

December 30, 2018

Popover breakfast!

This morning we had homemade popovers for breakfast - they were great!! So great that I forgot to take a picture until after I finished one and had ripped open the second.

I’m not making any promises, but if you’re at our house in the winter months and you ask nicely, you too could enjoy this treat.

December 21, 2018

"...if you want to learn something, I can't stop you. If you don't...I cannot teach you."


As I was catching up on some podcasts after finals week, the episode of Freakonomics called "Where Does Creativity Come From? (And Why Do Schools Kill It Off)?" which had the following line from legendary trumpeter Wynton Marsalis: "...if you want to learn something, I can't stop you. If you don't want to learn it, I cannot teach you."  Whoa!  That is so true. I can't count the number of times that I have students in my class who are there because they have to fulfill a science credit (for various reasons) and have very little interest in the physics I am trying to discuss.  I think that I have tried for years to foster a classroom environment where learning can happen, but I sometimes forget that students have to WANT to learn what I am offering to teach.

Following my continuing philosophy to not hide anything in terms of pedagogy, learning, or teaching from my students, I plan to hang some printouts of these images I made and have them in the classroom as a reminder that the choice to engage in learning is solely up to the learner.

After hearing this episode, I thought for sure that some other teacher had discovered this great podcast episode and the Marsalis line before I did.  I did a quick search and the only post I could find was this one on Medium from Shaun Mosley.  I like how he tied the process of developing creativity and learning to the differences between extrinsic and intrinsic motivations. It is something I have certainly thought a lot about as I have planned my classes and made the shift to Standards-Based Assessment and Reporting.

To all the teachers out there: if you have a chance to listen to the podcast episode, I'd love to know what you think about it and what you are doing in your class to engage learners in creativity. Let me know!


Photo source/credit: Eric Delmar public domain image from Wikimedia Commons.
Images on this page are licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Creative Commons License

August 28, 2018

Some observations of doing a bit of data analysis with DBSCAN and pandas in a Jupyter notebook

Sorting Classifications for making graphs-VolunteerClassifications
Here is a Jupyter notebook I was using today to parse the classifications from the Steelpan Vibrations project. I'm leaving some of the notes here as a reminder to myself for the future. (I learned how to put the Jupyter notebook into the blog from this page.)

I really want to share this because in all my reading on using DBSCAN to do cluster analysis, I had a hard time finding any page online that was describing how the coordinates of the points identified in a cluster could be paired with matched data from the larger (original) data set. When I found the solution (see link in the comments between cells below) it was really obvious, but it was painful not knowing even how to google for what I was looking for.

Function to do the cluster identification with DBSCAN:
In [31]:
def dbscan(crds):
    bad_xy = []  #might need to change this
    X = np.array(crds)
    db = DBSCAN(eps=18, min_samples=3).fit(X)
    core_samples_mask = np.zeros_like(db.labels_, dtype=bool)
    core_samples_mask[db.core_sample_indices_] = True
    labels = db.labels_
    
    n_clusters_ = len(set(labels)) - (1 if -1 in labels else 0)
    unique_labels = set(labels)
    
    colors = plt.cm.Spectral(np.linspace(0, 1, len(unique_labels)))
    
    for k, col in zip(unique_labels, colors):
        if k == -1:
            # Black used for noise.
            col = 'k'

        class_member_mask = (labels == k)
        
        # These are the definitely "good" xy values.
        xy = X[class_member_mask & core_samples_mask]
        plt.plot(xy[:, 0], xy[:, 1], 'o', markerfacecolor=col,
                 markeredgecolor='k', markersize=14)
        #print("\n Good? xy = ",xy)
        #print("X = ",X)
        # These are the "bad" xy values. Note that some maybe-bad and maybe-good are included here.
        xy = X[class_member_mask & ~core_samples_mask]
        plt.plot(xy[:, 0], xy[:, 1], 'o', markerfacecolor=col,
                 markeredgecolor='k', markersize=6)
        #print("\n Bad? xy = ",xy)
        bad_xy.append(xy)

    plt.title('Estimated number of clusters: %d' % n_clusters_)
    plt.xlim(0, 512)
    plt.ylim(0, 384)
    
    clusters = [X[labels == i] for i in range(n_clusters_)]
    #print(clusters)
    #print(db.labels_)
    
    return clusters, labels
Import the classifications into a pandas DataFrame. I'm using header=None because there were no headings in the csv file:
In [32]:
import pandas as pd
df=pd.read_csv('averages-strike1.csv', sep=',',header=None)
This is the main part of the code that ends up calling the dbscan function at the end:
In [34]:
from matplotlib.patches import Ellipse
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.colors as col
cmap_1 = cm.ScalarMappable(col.Normalize(1, 11, cm.gist_rainbow))
import numpy as np
from sklearn.cluster import DBSCAN

x_val = []
y_val = []
frng = []
crds = []
ell = []

for centers in df.values:
    x_val.append(centers[0])
    y_val.append(centers[1])
    frng.append(centers[3])
    crds.append([centers[0], centers[1]])
    ell.append(Ellipse(xy=[centers[0], centers[1]], width=centers[4], height=centers[5], angle=centers[6]))
    centers_raw = {'XVal': x_val,
                   'YVal': y_val,
                   'Fringe': frng}
    
centers_df = pd.DataFrame(centers_raw, columns=['XVal', 'YVal', 'Fringe'])
plt.figure(0)
plt.scatter(centers_df.XVal, centers_df.YVal, s=20, c=cmap_1.to_rgba(centers_df.Fringe), alpha=.6)
plt.xlim(0, 512)
plt.ylim(0, 384)
#plt.title('Subject id = %s'%(coords_x[0][2]))
plt.show()
#print(crds)
plt.figure(1)
clusters, labels = dbscan(crds)
/Users/amorriso/anaconda/lib/python3.6/site-packages/matplotlib/lines.py:1206: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if self._markerfacecolor != fc:
Check the DataFrame once, and then check it again after renaming the columns:
In [30]:
df[:15]
Out[30]:
x y filename fringe rx ry angle cluster
0 107.716469 213.009577 06240907_proc_00254.png 1.000000 85.034929 67.943204 -47.505782 0
1 114.698967 213.766703 06240907_proc_00258.png 1.333333 67.924027 67.389913 -51.659952 0
2 111.190662 218.375451 06240907_proc_00270.png 0.714286 67.455082 57.088226 -63.335567 0
3 113.800339 223.653310 06240907_proc_00276.png 8.333333 86.160744 73.501320 -73.822837 0
4 88.625250 218.599081 06240907_proc_00279.png 7.200000 119.292404 107.265178 -76.700412 0
5 81.290269 220.570363 06240907_proc_00281.png 7.333333 115.024131 109.400213 -91.981419 0
6 81.476925 215.762886 06240907_proc_00282.png 6.166667 115.916690 111.225947 -51.426068 0
7 72.502562 219.822452 06240907_proc_00292.png 7.200000 115.302500 108.964856 -54.631973 0
8 71.396729 213.876289 06240907_proc_00295.png 7.000000 132.873660 114.236231 -88.764995 0
9 73.012500 206.005209 06240907_proc_00299.png 10.000000 116.456652 113.427691 -82.312357 0
10 62.431250 206.850000 06240907_proc_00301.png 10.000000 104.117715 88.929126 -2.347311 0
11 141.296875 252.166667 06240907_proc_00301.png 3.666667 55.919208 29.365025 62.916449 -1
12 71.331521 212.055188 06240907_proc_00306.png 8.166667 122.378310 99.126123 -52.857932 0
13 71.714899 208.812385 06240907_proc_00307.png 8.666667 107.007787 98.573020 11.509674 0
14 286.998737 170.834790 06240907_proc_00307.png 1.200000 34.312887 32.881617 -0.016536 1
In [7]:
labels
Out[7]:
array([0, 0, 0, ..., 0, 1, 3])
These next two lines are the magic that connect the clusters identified by DBSCAN with the original classifications so that we can plot the fringe measurements for each cluster over time.
Finally figured this out by reading the question posted here: https://datascience.stackexchange.com/questions/29587/python-clustering-and-labels
In [8]:
cluster=pd.Series(labels)
df["cluster"] = cluster
Rename the DataFrame columns:
In [10]:
df = df.rename(index=str, columns={0: "x", 1: "y",2:"filename", 3:"fringe",4:"rx", 5:"ry",6:"angle"})
Assign each cluster its own variable:
In [27]:
cluster0 = df[df['cluster']==0]
cluster1 = df[df['cluster']==1]
cluster2 = df[df['cluster']==2]
cluster3 = df[df['cluster']==3]
cluster4 = df[df['cluster']==4]
cluster5 = df[df['cluster']==5]
cluster6 = df[df['cluster']==6]
cluster7 = df[df['cluster']==7]
Make plots!!!
In [29]:
plt.scatter(cluster0.index, cluster0.fringe)
plt.show()
In [36]:
plt.scatter(cluster1.index, cluster1.fringe)
plt.show()
In [37]:
plt.scatter(cluster2.index, cluster2.fringe)
plt.show()
In [38]:
plt.scatter(cluster3.index, cluster3.fringe)
plt.show()
In [39]:
plt.scatter(cluster4.index, cluster4.fringe)
plt.show()
In [43]:
plt.scatter(cluster5.index, cluster5.fringe)
plt.show()