Wednesday, December 30, 2015

The War on Stars

This post contains spoilers for both Star Wars: Episode VII The Force Awakens and my academic semester. Read on at your own peril.

As always, I must begin by apologizing for not having posted in months. My academic load this semester, combined with my work schedule, was probably about the limit of what I could handle and didn't leave me with a lot of time left over for blogging (or sleeping, for that matter). To remedy that, during winter break I'm going to try to find time to write about the classes I took, maybe posting every week or so. We're starting off today with my observational astronomy course.

But we're getting there through Star Wars. To begin, I enjoyed the movie a great deal (all three times). I also go into a Star Wars movie turning off the part of my brain that cares about scientific plausibility or consistency. In fact, I'm partial to the idea that Star Wars is science fantasy rather than science fiction, whatever that distinction may signify. Yet looking at media through a scientific lens is a fun way for me to analyze it, and it might even be educational. We'll see.

So, of course, TFA has a galaxy's worth of scientific errors, but there's one visual in particular I'd like to take a look at, because I think it gets at something important in astronomy. When the First Order fires the weapon from Starkiller Base at the New Republic, Finn on Takodana (Maz Kanata's planet) sees the beam split up and strike different planets in the Hosnian system. This is an impossible image, given the assumption that Starkiller Base, Takodana, and the Hosnian system all orbit different stars. The reason this image is so impossible is because, as the great Douglas Adams informed us, space is big, really big.

Now, I'm not thinking about the fact that light travels at a finite speed and there wouldn't have been time for the image to show up in Takodana's atmosphere. This is a universe with faster than light travel, so let's just mumble something about hyperspace and ignore that. Imagine that it did take years for the light of the beam to stretch across the lightyears; it still wouldn't look like it does.

The problem is that you can see multiple beams at all, that they can be resolved as striking different places. In astronomical terms, the angular separation between the beams is absurdly large. This point can be made with a simple trigonometric argument. If we imagine two lines connecting Finn's eyes and the planets struck by the beams, and another line connecting those two planets, we can make a little triangle.


What we're looking for is the angle between lines C and A. For our purposes, the relative lengths of A and C don't matter and we can just call one of those lines the distance between Takodana and the Hosnian system. Trig gives us the formula sin θ = B/C. But in astronomy we make use of the small-angle approximation a lot, which says that for very small θ, the sine of θ is approximately θ. So then we have θ = B/C.

The significant part of this formula is that, for astronomical purposes, staring up at the sky only gives us θ, not B (the size of the thing we’re looking at) or C (the distance to the thing we’re looking at). This means, without other factors, we can’t tell if we’re looking at a big object far away or a small object nearby.

Digging around Wookieepedia and starwars.com, it seems that Takodana is supposed to be in the Mid Rim of the galaxy and Hosnian Prime in the Core. If we assume that this galaxy is about the same size as ours (not necessarily a great assumption, but published maps show something like a spiral galaxy), then halfway out of the Core gets us a distance of 25,000 lightyears. We don't know the distances between the planets in the system, but if we make the very generous assumption that they are as far apart as Earth and Neptune, we get a distance of 4 lighthours. Plugging those numbers into the above formula (B=4 lighthours, C=25,000 lightyears), our angular separation is 2x10-8 radians, which converts to 4 milliarcseconds (mas). 1 mas is 1/1000 of an arcsecond, which is 1/60 of an arcminute, which is 1/60 of a degree. By comparison, the moon has an angular size of 31 arcminutes, over 400,000 times bigger.

So the beams wouldn't appear that far apart. In fact, you wouldn't be able to tell them apart at all. Okay, but why am I fussing about this? Because it gets into some interesting aspects of observational astronomy having to do with the wave nature of light. Specifically, when light waves enter an aperture, they diffract around the edges and form interference patterns. It's inevitable and must be taken into account no matter what type of observation you're doing.

When light diffracts through a perfectly circular aperture, it forms the following interference pattern, called an Airy disk.
"Airy-pattern" by Sakurambo at English Wikipedia 桜ん坊
That is, if you were to shine a laser pointer through a circular hole, instead of a dot on the other side, you would get the above pattern. However, trying this with a store-bought laser pointer and a hole punch won’t get you much, because the pattern is very sensitive to the wavelength of light used and the size of the hole.

In the case of the Starkiller beam, the aperture we're talking about is your pupil. The human pupil can change in size based on lighting conditions, but a good average diameter is 5 mm. The wavelength of the beam's light is based on its color. The red light of the Starkiller beam is at the long end of the visible spectrum, so let's call it 700 nm. These two variables play into the size and spread of the interference fringes.

In the 19th century, Lord Rayleigh proposed a criterion for determining the limits of image resolution. He said that if two images are closer together than the first minimum of the interference pattern, then you can't resolve them as two objects. This is arbitrary, but not entirely made up. If you add together the intensities of two interference patterns separated by less than that minimum, this is the difficult to interpret graph you get. Are you looking at one object or two?


The pattern of the Airy disc is described by a Bessel function, which is a special function invented to be the solution to some common differential equations. The first minimum of the Airy disc is the point where the function goes to 0 for the first time and happens at an angular distance of θ = 1.22λ/D, where λ is the wavelength of light, D is the diameter of the aperture, and 1.22 is a rounded-off figure for a number that goes on forever, because Bessel functions aren't very nice functions.

In fact, my observational astronomy professor explained that if we're going to use 1.22, we might as well memorize a few more digits because that number only comes up with perfectly circular apertures anyway, and 1.22 is not much greater than 1, so you're not gaining much precision as it is. In most cases, making the approximation that θ = λ/D works well enough. The interesting thing to note about this criterion is that fine angular resolution results from small wavelength or large aperture. This is why radio telescopes are much bigger than optical telescopes. Radio telescopes are looking at very large wavelengths (centimeters to meters compared to hundreds of nanometers), so to be able to resolve images, they need much larger apertures.

Since I just made up the wavelength of our beam and I'm assuming the pupil is exactly 5 mm, let's leave off the .22. In that case, our minimum angular resolution is 700 nm/5 mm = 1.40x10-4 radians, which comes out to 29 arcseconds. This limit is ~7000 times higher than our estimated angular separation of 4 mas for the Starkiller beams. To our eyes, the split beams would look like one beam.

...if they looked like anything at all. If you remember, Finn also saw the beams during the daytime. And as you may also remember, the only celestial object we tend to see during the day is the Sun (and the moon depending on its phase, and occasionally some planets and stars near sunrise and sunset). We intuitively know why this is: the Sun washes out dimmer objects. Even the reflected light of the Sun in the atmosphere is bright enough to wash out dim objects.

But why should that be? If the point where a star is has star and atmosphere, shouldn't it be a smidgen brighter than atmosphere alone? And shouldn't we be able to tell the difference? It turns out we can't, and the reason why is preserved in an ancient system for judging the brightness of stars that has persisted to this day with a few modifications.

The Greek astronomer Hipparchus set about cataloging the fixed stars a little more than two thousand years ago, managing to compile the position and brightness of several hundred of them. He called the brightest ones “stars of the first magnitude,” the second brightest “stars of the second magnitude,” and so on down to the dimmest stars visible to his naked eye, which he placed at magnitude six. Many an astronomy student today curses Hipparchus for giving lower numbers to brighter stars, but the system has stuck nonetheless.

In the 19th century, the English astronomer Norman Pogson realized that with a little fudging, it looked like 1st magnitude stars were 100 times brighter than 6th magnitude stars. You can divide this up a little further and discover that a magnitude jump of 1 represents a change in brightness of about 2.5 (2.55 ~ 100). But to our eyes, 1st magnitude stars don't seem to be 100 times brighter than 6th magnitude stars. They're not necessarily 6 times brighter either, but that's much closer to what we perceive than the physical reality. That's because human eyes don't respond to light in a linear fashion, but on a logarithmic or power scale instead (the details are messy and beyond my understanding).

If one star is twice as bright as another star, the above relation tells us that the magnitude difference is less than 1. In other words, Hipparchus might not even have noticed. The gist is that very small changes in brightness don't register to us if they are below a threshold called the just-noticeable difference. So while star+atmosphere is slightly brighter than atmosphere alone, it's not enough of a difference for our eyes to notice. And if the Starkiller beams shine with the brightness of a star (which seems about right given that Starkiller Base seems to explode into a star), then we wouldn't be able to see the beams at all during the day, let alone tell them apart.

But this isn't a problem just for human eyes. We don't point our telescopes at the sky during the day for the same reason. Modern telescopes pipe their images down to CCDs, digital devices that convert photons into electrons and count them up at each pixel. We can tell we've found something in a CCD if there's a signal that is significantly more intense than the background. But the background is noisy, and if the fluctuations from noise are greater than the difference between the background and the signal, then we can't tell if we've actually found anything at all.

Returning to Hipparchus for a moment, early astronomers noticed that brighter, lower magnitude stars appeared bigger than dimmer stars. We now know that the biggest stars are about a thousand times wider than our Sun. Yet we don’t see any stars in the sky that are a thousand times bigger than any other stars. In fact, it turns out the star with the largest angular size is R Doradus at 0.057 arcseconds. This is still tiny, with the moon about 30,000 times wider. But it doesn’t seem plausible that we could line up 30,000 stars as we see them in the night sky across the face of the moon.

The answer goes back to diffraction. To the naked eye, all stars are too small to have a resolvable disk. Instead, while the width of the central peak of a diffraction pattern is a function only of the aperture size and wavelength, the intensity across that width depends on the overall brightness of the object. As such, brighter stars appear bigger to our eyes, because diffraction means the whole Airy pattern is brighter, and that pattern is not point-like. Thus the size of a star in the night sky is not directly related to its physical size except insofar as bigger usually means brighter. We are not seeing the physical disk of the star itself, only the illusory Airy disk that results from diffraction.

Anyway, I think that’s enough nerding out over Star Wars and astronomy for now, what with me passing the 2000-word mark. I'll have more to say about observational astronomy later because I want to touch on image processing, which was a big chunk of the class. Next up will probably be quantum physics, though, because that’s a demon I’ve yet to exorcise.