Thursday, October 16, 2014

Hooray, Octave supports numpy-style boolean array indexing operations

I've only just discovered that Gnu Octave (the Gnu version of Matlab) supports numpy-style boolean array indexing operations, in particular

  • logical operations on vectors to return boolean true/false vectors
  • array indexing using vectors on vectors
An example, using a simple vector a.
octave:2> a=[1 2 3 4 1 2 3 4]
a =

   1   2   3   4   1   2   3   4

Create a boolean mask called b with all elements of a greater than 2.
octave:3> b=a > 2
b =

   0   0   1   1   0   0   1   1
Now use b to access only those elements of a that are true in the mask array b.
octave:4> a(b)
ans =

   3   4   3   4
Why use Octave when we have python/numpy/scipy? Sometimes its just faster to fire up octave to get a look at data, and matlab/octave syntax is much less verbose than python.

Tuesday, August 26, 2014

More on the possible AD 774/775 hit on the Earth by a nearby GRB

I hadn't heard of either the odd AD 774/775 values of the C12/C14 and increased B10 ratios or the hypothesized casue: a nearby (within the Milky Way) Gamma Ray Burst before reading a blog post by Greg Laden related to climate change a while ago.

It turns out the GRB hypothesis was only recently advanced: Hambaryan & Neuhäuser, 2013, MNRAS, 430, 32 [full article text available online here]. Back at the time Phil Plait actually covered the story in his blog, which has a nice write up of the idea and why other explanations (Solar Flare, Magnetar, nearby Supernova) are claimed to be less likely than a "short" (neutron-star merger induced) GRB.

It somewhat surprises me that an event of the magnitude necessary to alter the isotopic composition of the Earth's atmosphere in less than a few seconds could occur without (a) anyone seeing anything and recording it, and more over (b) not causing any significant biological events (e.g. animal, plant or human deaths). Still, reality often runs counter to naive expectation (i.e. "common sense") so I'm not too put off the idea by that.

For now I'd view this idea of the Earth getting hit by a short GRB as a plausible hypothesis rather than concrete fact, at least until several more studies come to the same conclusion. Still, it is a rather fun and exciting idea.

Friday, August 01, 2014

What happened in the year 774/775?

Something odd happened to the Earth around the year 774/775. For the background, head over to Gred Laden's blog, where this is just part of a larger question about climate reconstruction.

A few exerts follow to give you  a taste of what caught me eye.

A long time ago, probably in our galaxy but kind of far away, a cosmic event happened that caused the Earth to be bathed in Gamma rays in AD 774 or 775.
...
There is chemical and physical evidence, though, of the Gamma ray burst. The best evidence is the large scale conversion of stable Nitrogen isotopes into unstable Carbon–14 isotopes in the upper atmosphere. As you know, radioactive (meaning, unstable) Carbon–14 is created continuously but at a somewhat variable rate in the upper atmosphere. Some of that Carbon is incorporated, along with regular stable Carbon, into living tissues. After the living tissue is created and further biological activity that might retrofit some of the Carbon atoms ends (i.e., the thing dies) the ratio of radioactive Carbon to stable Carbon slowly changes as the radioactive Carbon changes back into Nitrogen. By measuring the ratio now, we can estimate how many years ago, plus or minus, the originally living thing lived and died. But it does vary. Solar activity, nuclear testing, other things, can change the amount of Carbon–14 that gets produced. And, a cosmic event that happened in 774/775 caused the production of enough Carbon–14 to throw off the chronology by hundreds of years.

Now why haven't I heard of this event before? How certain are we that it was a Gamma Ray Burst, and if so, where was the source?

Thursday, July 24, 2014

Fifteen years in orbit and awesome: The Chandra X-ray Observatory

Yesterday, July 25rd, 2014, marked the 15th anniversary of the launch of one of NASA's Great Observatories: the Chandra X-ray Observatory. I was one year into my first post-doc at Johns Hopkins at the time, and watched the launch in one of the conference rooms on the 1st floor. Later I spent many years working on data from Chandra. I can't believe its been so long.


Over-views of the 15 years of Chandra:

For information on the accompanying press release image go here.