Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hertzsprung-Russel Diagrams

A Hertzsprung-Russel diagram is a chart that compares the temperature and luminosity of a number of stars and helps scientists draw conclusions about the changes stars undertake over their lifetimes. This lesson shows you how to use pandas to read in star data from a CSV, process it, and graph it using Matplotlib.

00:00 In the previous lesson, I showed you how to graph the radiance of a black body object based on its temperature. In this lesson, I’ll be diving into the classification of stars and the Hertzsprung-Russell Diagram.

00:12 Astronomers classify stars based on their attributes. One of the primary attributes is the surface temperature measured in Kelvin.

00:21 This is sometimes denoted as T sub eff for effective temperature. It is possible to discuss at least three different temperatures for stars, the temperature of their surface, the temperature of the corona, and the temperature of their interior.

00:35 Astronomers typically stick to the temperature of the surface and derive this by looking at their radiance patterns and work the Planck law backwards to arrive at the number.

00:45 The second attribute that is often used to describe a star is its luminosity. In layperson’s terms, that’s brightness. There’s a subtle difference between brightness and luminosity.

00:55 Kind of like the difference between mass and weight. So I’ll try to stick with luminosity, but for our purposes, the ideas are interchangeable. The third common attribute is the physical size typically measured in one of two ways, Kilometers, yes, that’s right science is in metric, my American friends, or the other option is as a ratio, a ratio between the size of the thing you’re measuring and the size of our sun.

01:21 The reason for using a ratio is it makes the numbers relatively small and easier to work with.

01:27 Let’s dig into luminosity a little more. As I mentioned, this is a measure of a star’s brightness or more accurately, an amount of radiation over time. Radiation over time is power, which means this can be measured in watts just like your light bulbs, just a lot more.

01:46 In fact, it can mean some pretty big numbers. Our star, the sun, isn’t particularly big and it has 26 zeros in its wattage number. Because that’s so large astronomers often use a ratio of a star’s luminosity over our sun’s, so 4L is four times the sun’s luminosity.

02:06 You’ll sometimes see an uppercase L with a little naught or a zero subscript to mean the sun. So L over L naught is this ratio that I’m talking about. I’ve also seen the L naught loosely used for other kinds of luminosity, so be careful. Related to luminosity is magnitude.

02:26 Again, this is a brightness thing, but in this case, it’s an observed value. There are two common magnitudes: the apparent magnitude is how bright it looks to us in the night sky.

02:38 While the absolute magnitude is a normalized number, this allows you to compare the actual brightness of two stars. Any given star might appear dimmer to us, but that could be because it’s much further away.

02:50 The normalization is done based on pretending you can move the star to 10 parsecs away and calculating its magnitude as if it were there. Parsecs. Yes, those are a distance regardless of what George Lucas and his Kessel Run might say otherwise,

03:07 What? You thought you’d get through a course on space without a sci-fi geek reference? If I get through the rest of this with only one, I’ll be very surprised.

03:15 As you might guess, the absolute magnitude is related to luminosity and in fact, this is the equation for calculating it. The magic number of 4.83 there is the luminosity of the sun, so the absolute magnitude of a star is calculated relative to the log of its luminosity, subtracted from our sun.

03:36 Like how magnitude is related to luminosity, a star’s color is related to its temperature. This is essentially an oversimplification of the black body graph that you saw before, considering just what the star’s peak wavelengths are.

03:50 So our sun is orangey-red. Rather than speak in terms of a color, the color index is a numeric representation of this same idea.

04:00 There are actually several different color indexes and they’re determined by measuring one or more wavelengths while covered with a filter. Then doing a bit of math.

04:10 The three most common filters are U for ultraviolet, B for blue, and V for photovisual.

04:18 The B-V index uses a blue and violet filter and uses a logarithmic scale where the star Vega is considered zero. For example, the B-V index of our sun is 0.656, while the BV index of Rigel is negative 0.03.

04:37 This all relates back to temperature because Planck’s law links the temperature to the wavelengths.

04:43 There are approximation formulas for turning a temperature into a color index, but they’re a little messy. For example, the B-V one is actually a composite of two different formulas and you pick which one to use based on the input temperature.

04:58 Instead of color index, sometimes a class letter is used instead. Again, this comes back to temperature. This kind of classification is known as the Harvard classification, and sometimes you will also see a number to go with it.

05:10 That number further subdivides the letter classification into a subset of temperatures. The numbers range from zero to nine, where zero is the hottest and nine is the coolest.

05:21 Because the Harvard system doesn’t convey everything you might want to know, there is another system that is more common now. It’s called the Morgan-Keenan classification, and it adds extra information to the Harvard classification.

05:34 It does this by appending a Roman numeral to the class to indicate the luminosity. For example, our sun is a G-class star with a hotness index of two. That’s relatively hot within the G class and a luminosity classification of five.

Become a Member to join the conversation.