Skin a Cat

Before I begin let me make it clear that this is not about abusing cats. I love cats. We have a cat. We treat him very well. He treats us as though it’s our duty to worship him. He’s a cat.

This is about the old adage that “there’s more than one way to skin a cat.”


Mira-type variable stars are pulsating red giants. They’re old, and late in their lives they’ve exhausted most of the hydrogen fuel in their cores so they start burning helium in the core, and hydrogen in shells around the core. They expand to great size, and start to pulse, changing brightness in periodic fashion. But their cycles aren’t perfectly regular, each is a bit different from all the others. They’re named for the prototype of the class, omicron Ceti, which the ancients called Mira (“the wonderful”).

Our own sun, 5 billion years or so from now, will expand to red giant size and possibly turn into a Mira-type variable. It will get so large that it will engulf the earth and fry it — so we have less than 5 billion years to find another place to live.

All Miras show irregular cycles, each with a slightly different period, amplitude, and cycle shape. But for some, the period doesn’t just jitter about an average value, it actually shows a trend, a secular change. Not too long ago Templeton and Willson (2005) studied a large sample of Miras to find out which were showing secular change in period. They adopted a conservative test in order to minimize the number of “false alarms,” which means they may have missed some but the ones they did identify are “for real.” Out of 547 Mira-type variables studied, 57 showed secular trend in period, so such change may not be the norm but it’s not rare either. Their study, a major result in astronomical research, was based entirely on data collected by amateur astronomers, mostly using visual photometry (the eye) to estimate brightness.

Now to the topic of this post (finally!). How can we tell that a Mira-type variable (or any kind of data) is changing its period with a secular trend? It turns out there are many methods — more than one way to skin a cat. Let’s look at some different techniques applied to one of the stars which Templeton and Willson identified as showing a large period change, BH Crucis, or simply BH Cru.

The most obvious method is to estimate each individual period. This can be done in many ways, including finding the time at which each cycle reaches its maximum, then estimating the period as the time from one maximum to the next. This can sometimes be difficult because we can’t always see the star (especially if the sun is too close) so we might miss a maximum entirely. For BH Cru, obscuration by the sun is only a minor problem. As the light curve shows, most of the maxima are sufficiently well-observed to estimate their timing:

The earliest cycles aren’t as well-observed as later ones, but we can estimate most of the times of peak brightness, which gives these estimates of the period on a cycle-by-cycle basis:

The average period is about 525 days, but it jitters around a lot. There are also two values that are very different from the others early in the series. This is because one of the maximum timings is, in a sense, “too early” so it makes the period estimate for the preceding cycle too short and that for the following cycle too long. The maximum timing isn’t actually wrong, but it fails to represent the main period of the star — for a reason we’ll see soon. In any case, this method — estimating individual periods — doesn’t really reveal a secular trend in the period of BH Cru.

Another period analysis method is Fourier analysis. The Fourier spectrum of the star reveals its periodic nature immediately:

There’s a tall peak at frequency just less than 0.002 cycle/day, corresponding to period of 523 days. But Fourier analysis won’t tell us about period change. Or … will it?

Notice that there’s a second peak just to the right of the main peak. Sometimes such a peak is an alias of the main peak, just a ghost image. But in this case it’s real. It’s not a separate period, it mixes with, and interferes with, the main peak to produce frequency modulation and amplitude modulation of the main oscillation. There are ways to disentangle the frequencies that cause such modulation, giving this:

Notice that there’s another peak in this spectrum, a small one, at about frequency 0.0057 cycle/day (period about 175 days).

That means there’s another, smaller (and faster) oscillation of this star. That’s what caused one of the maximum timings to be “too early” to represent the main period. Most of the cycles have a clearly defined maximum, like this one:

However, if that smaller oscillation occurs near the time of maximum and is strong enough, it can make the maximum “lean to the left” and happen earlier than the peak of the main cycle, like here:

It may also be timed just right to make a maximum “lean to the right” and happen later than the peak of the main cycle, like here:

Therefore that secondary period, although weak, is strong enough to perturb the timing of maximum brightness, and make it more difficult to estimate individual periods. That’s one of the reasons the individual-periods method didn’t detect a secular trend in period, but it’s not the main reason (which we’ll see later).

More to the point, there’s a very clever way (in my opinion) to use the frequencies near the main one, the ones which combine and interfere to create frequency/amplitude modulation, to reconstruct the period changes of the star. It gives this rough estimate of the changing period, but definitely indicates the existence of a secular (but not linear) trend:

It suggests a decline, followed by a rapid increase, followed by a more gradual decrease.

There’s another technique based on Fourier analysis, in which we “window” the data, looking only at a limited time slice to estimate the average period during that window. Then we let the window slide through time to get a measure of how the period changes over time. The method is called, not surprisingly, windowed Fourier analysis. One of its advantages is that we can use the standard methods to estimate the uncertainty in each period estimate. It gives this:

Now, there’s little doubt that the period of BH Cru shows a secular trend. But again, the trend itself is rather complicated, certainly not linear, showing a decline, followed by a rapid increase, followed by a more gradual decline.

Finally, we can use the method applied by Templeton and Willson, wavelet analysis. For data unevenly spaced in time, a good method is the weighted wavelet Z-transform, or WWZ. Among its many virtues is the fact that it produces pretty pictures:

The band of reddish color indicates the main oscillation. It’s weaker earlier, but that’s mainly because it’s statistically weaker simply because there’s less data. Also, the range of colors isn’t sufficient to reveal the large range of numerical values. We can compress the numerical range simply by taking logarithms, which gives this plot:

showing that the main oscillation exists throughout the entire time span, although it’s (statistically) weaker in the early part of the data.

The WWZ also enables us to compute the period as a function of time, which looks like this:

Again, there’s a decrease, followed by a rapid increase, followed by a more gradual decline.

There you have it — four different ways to look for secular trend in the period of a data set. Let’s plot the results of the last three methods for comparison:

Clearly they’re in excellent agreement! Method 2, combining interfering frequencies, gives a rougher estimate, but it also makes it easy to detect secular period change if you didn’t already know it was there.

We can also add the result of the individual-periods method:

Now we see the reasons it didn’t reveal the secular trend right away. For one thing, it shows a lot more “jitter.” For another, the “too early” and “too late” maximum timings due to the secondary oscillation threw off some of the period estimates, by a lot (the early ones are “off the scale” on this plot). Finally, the sparsity of early data caused me not even to estimate the individual periods until after the rapid period increase was well under way, so we simply missed it.

No doubt about it, there really is more than one way to skin a cat. The general agreement of multiple methods means that there’s also no doubt about the secular trend in the period of BH Cru — a decrease followed by a rapid increase followed by a more gradual decline.

And in case I haven’t emphasized it often enough, not just this star but all 547 in the study by Templeton and Willson proves the extreme high quality, and tremendous scientific value, of the Herculean efforts of amateur astronomers.

27 responses to “Skin a Cat

  1. These astro posts are fascinating. Thanks for doing them.

  2. Hi Tamino,
    been a while since I can find an open thread so I will ask this question here. Steve Mc and others have lately been particularly discussing two things: first that using the same data in paleo recons for calibration and reconstruction results in what is called the “screening fallacy”, and secondly that using the calibration period as being during this large uptick period will produce hockey sticks from white and red noise on its own. IE screening based on correlation with recent warmth.

    I recognize that this is an ongoing issue and that you may not think it is worth addressing or responding to but I think it has significant interest and i’d be interesting to know what would be the best method of calibration. Gergis et al (2012) for example intended on detrending first then screening. I think the best practice statistically is interesting.

    • Can’t say about Gergis, but in Mann 2008, the final reconstruction *is* validated against red noise, using data that is *not* used in the calibration.

      If you take a bunch of series and select them according to whether they match an upward trend on a *portion* of the record, of course the final result will contain an upward trend *over that portion*, even if you just used information-free, red noise series. So how can you tell whether your reconstruction is worth anything? Simple: you test whether it matches the record on an *other* portion of it, that was *not* used for training/calibrating/screening your reconstruction.

      This distinction between the training set and the test set is the basis of machine learning. And yes, Mann does that (his claim to academic fame is precisely to have introduced proper machine learning to long-term paleoclimate reconstructions).

      BTW, McIntyre is fully aware of all this.

      • Gavin's Pussycat

        Can’t say about Gergis, but in Mann 2008, the final
        reconstruction *is* validated against red noise, using data
        that is *not* used in the calibration.

        It’s the same in Gergis. But instead of a single recon they have an ensemble of reconstructions. In each member there is a calibration period and a verification period.
        This is completely separate from — andro happens after — the “screening” that the current hoopla is about.

    • By “others”, I assume you mean like Lucia (original entertainment here) and I think in current comments?

  3. Gavin's Pussycat

    > He treats us as though it’s our duty to worship him

    And damn right he is. We are owned by a cat too. Big, black and purry, and adds years to our lives

    • Hmmmm. Does Gavin’s Pussycat know that Gavin is using the computer? Or should that screen name be “Pussycat’s Gavin”????
      Inquiring gnomes want to mind…

      • Gavin's Pussycat

        It has a history. And our cat is no pussycat…

      • Ah, I see. Gavin’s Pussycat is clearly an outdoor cat, allowed to wander away from the confines of the regular work world (and RC), to say things that Gavin chooses not to say…but in a kinder, gentler way than a bulldog might be expected to behave…

    • My two favourite lines on Cats (and, yes, we have a much-fussed-over monster):

      Dogs have owners. Cats have staff.

      If cats could talk- they wouldn’t.

  4. You both have, of course, taken instruction on your duties

    • Rattus Norvegicus

      Eli, +1. That is one of the funniest cat videos evah!

    • Susan Anderson

      Could be our family Norwegian Forest Cat, gorgeous beast! I rather like the following one, the deer behavior is characteristic. Neither cat nor deer is a good proxy for deniers, but smarter one *might* get the science properly.

      (hope my source code steal works!)

    • When Henri (a.k.a. the cat in the video) turns to look at the camera at 1:30, he looks just like Gerard Depardieu. On a good day.

      Of course, he is a French cat, so that may have coloured my perception a bit… or, not.

  5. Tamino,

    This has nothing to do with the substance of your post, but I don’t believe that it is well-accepted that the Earth (or even Venus) will be engulfed by the Sun in the giant phase (since significant mass loss from the sun will allow the planets to expand their orbit, remaining free from the advancing photosphere).

    Of course, habitability crisis issues exist well before that, on the order of 1 billion years from now. There exists upper limits to the amount of thermal radiation that the Earth can emit, in the ballpark area of 300 W/m2 or so. Once the brightening sun delivers more energy than this to Earth, it will progress into a runaway greenhouse stage, or at least a variant of it that allows for significant water loss to space (and possibly causing carbon starvation in many planet as atmospheric CO2 levels would plummet). This occurs as the surface temperatures reach 60-80 C and stratospheric H2O mixing ratio increases rapidly.

    • I don’t have the reference handy, but my recollection is that the latest research suggests that there is a high probability that the sun will engulf the earth.

      There are competing factors that make it hard to be certain, and not just because orbits are inherently hard to predict on long time scales anyway (e.g. will Venus eventually be tossed out of the solar system?).

      On the one hand you have mass loss from the sun causing orbits to expand, as you say. However, on the other hand there are two other factors that the latest calculations suggest may be more than enough to compensate.

      The first is tidal drag. In the case of the earth and moon, the earth’s rotation drags the tidal bulge caused by the moon ahead of the moon (so high tide occurs about an hour before the moon is overhead) because the earth rotates faster than the moon orbits. As a consequence, the gravitational force that the moon “sees” is not quite at right angles to its orbit and therefore some of the earth’s rotational energy is transferred to the moon causing the earth’s rotation to slow and the moon to move further away.

      In the case of the earth and the sun, when the sun expands to red giant phase, it’s rotational speed will slow enormously due to conservation of angular momentum. I forget the exact figure but I think it was something in the order of thousands of years for one rotation. This will cause the tidal bulge in the sun caused by the earth to be behind the earth, slowing it down and causing it to lose energy.

      The second is friction — as the sun expands, so does its atmosphere, and therefore the density of particles that the earth will be passing through will increase, again robbing it of energy.

      As I recall, the authors of the paper ran a bunch of simulations and a high percentage of them (more than 50%) resulted in the earth eventually being engulfed. (It’s kind of interesting that it’s not more clear-cut — i.e. Mercury is definitely a goner, Jupiter is definitely OK, but earth is right on the cusp.)

      I also seem to recall (again unreferenced, sorry about that) that the “time left for life on earth” is also much shorter than you suggested, in the order of 100 million years before the oceans evaporate (note: not boil) leaving no liquid water left on the surface.

      Provided there is sufficiently advanced life around for a reasonable period of time before that, of course, then it could keep the earth in the Goldilocks zone simply by slowly moving its orbit outwards as required. The simplest way to do that would be to divert asteroids to do flybuys, transferring a tiny amount of their orbital energy to the earth over a very long period of time. Not without risk, of course, and given humans have not yet proven capable of dealing with problems a few decades into the future there’s not much hope at this stage of humans making an effort to help potential future life forms millions of years hence, but the possibility exists at least theoretically.

      • Thanks Jason, if you find a reference let me know. Part of my comment was based on the Sackmann work back in 1993, though I don’t pretend to keep up with every detail concerning solar evolution theory.

      • Regarding the biosphere lifetime, I’m with Barton that a general consensus ballpark in the literature is in the neighborhood of ~1 billion years, based on models of stellar evolution and geologic weathering rates that end up removing CO2 at the expense of a brightening sun. You’re right though that a true “runaway greenhouse” might not happen in time for an intermediate moist greenhouse case, but even that presents severe issues in maintaining habitability.

    • Of course, habitability crisis issues exist well before that, on the order of 1 billion years from now […] runaway greenhouse stage […] significant water loss to space (and possibly causing carbon starvation in many planet as atmospheric CO2 levels would plummet) […] surface temperatures reach 60-80 C and stratospheric H2O mixing ratio increases rapidly.

      More alarmist propaganda. Why should we believe your models when you can’t even predict next week’s weather accurately? Also, I read a paper in E&E that showed it was warmer than that during the Medieval Warm Period anyway.

      You can run around like Chicken Little, but I won’t believe a word of it until Steve McIntyre has thoroughly audited it and the Heartland Institute has told me what to think.

  6. I think the 100 million years figure is from a 1989 paper by Kasting et al. It’s been revised upward. I’m fairly sure the present estimate for the life of the ecosphere is in the 1-2 GY range.

    That could be extended by moving the Earth’s orbit outward. We could accomplish that just by sending a big enough comet past in the right orbit once every 13,000 years or so.

  7. “Red Scare”
    — by Horatio Algeranon

    CO2 is naught to mention
    Up against the Sun’s expansion
    Which will surely cook our goose
    Sauté the Earth in Betelgeuse

  8. The very small, ‘minor’ peak in the Mira variable is roughly analogous to the purpose of having sympathetic (non-plucked strings) on a sitar. A lot of the keening sound in a sitar is caused by a plucked string making a nearby sympathetic string start to vibrate in and out of phase with the plucked string.

  9. Ok, “machine learning” apparently came along a couple of decades after I took statistics (we were using Friden mechanical calculators).

    So what’s the difference between statistics and “machine learning” — and would this variable star data be analyzed differently in one vs the other?

    I found some bits on this at
    http://stats.stackexchange.com/questions/6/the-two-cultures-statistics-vs-machine-learning

  10. Great post. I am interested in doing more than contributing measures to AAVSO and just ordered your book from Lulu. Looking forward to learning more about analyzing light curves.