A transit of Venus

(or how I learned to stop worrying and love the Sun)

This is going to be a longish post, the ravings of an obsessive-compulsive mind. So here’s the tl;dr… I took a picture using a telescope (indirectly). It’s Venus transiting across the Sun. It took some frantic last-minute work, but it was worth it because it won’t happen again for 105 years. Here is my picture:

The black dot is Venus. The whitish circle is the Sun. Behold, the glory of orbital mechanics!

OK, most of you can safely skip the rest of this post. Geek stuff follows…

The story begins 16 days ago. The annular eclipse of May 20th 2012. These are relatively infrequent (every 2 or 3 years), but what was special about this event was that the optimal centerline-path of the eclipse was only about a 3-hour drive away. So I packed up my gear and hit the road. Yes, I also took a picture then:

I learned a few things from this event. The first was that — damn — these things sneak up on you fast. I’m a science/astronomy geek, and knew this thing was going to happen, but it wasn’t until a few days prior to the event that some random news article reminded me that is was going to happen omgnow. So I had to scramble. The second lesson was that it really helps to do a few dry-runs for your observation. I was prepared with a pinhole projector and pinhead mirror for observing the eclipse, but I built (!) both of them the day of the eclipse and was in a rush. It turned out ok, but I glitched the math on my pinhead mirror focal length and so the image was more blurry than I had been hoping for. No big deal for the eclipse, though, since most of the experience was more atmospheric (pardon the pun)… The relaxing drive, the slowly darkening skies, and the unexpected sights along the way. The saying that “the journey is the reward” was spot-on.

Taking these lessons to heart, I decided to be more prepared for the then-upcoming Transit of Venus. After much armchair research, I figured that the absolute best viewing experience would be with a specialty telescope fitted with an H-alpha filter. The views are astounding, as is the price — it jumps into the $thousands before you can even blink.

So after careful deliberation (especially given the once-in-a-lifetime opportunity), I did what had to be done. Yep. I got a $10 #14 welder’s filter and $5 pair of eclipse glasses. (Looking at others’ expensive pictures? Priceless.) I do have a decent conventional telescope, but it’s a pain to lug around and I was thinking I wouldn’t really need it.

But I found that the eclipse glasses seemed useless for a transit — the naked-eye diameter of the Sun is surprisingly small, and the tiny dot that is Venus would be challenging to see. I also did a test shot of the Sun with my camera thought the #14 filter, and scaled a shot of the 2004 Venus Transit to that size to create a mockup of what I might be able to capture on Transit Day:

Unimpressive. Venus would be about 4 pixels — at best. I’d get better results with a longer zoom lens on my camera (Lumix GF3, 20mm); but I tend to prefer wide-angle shots, thus spending $hundreds for a lens I might not use very often was unappealing. And so I basically left it at that, figuring whatever I might manage to record would be just fine as a token momento. After all, NASA and professional astronomers would capture the event in stunning detail, so why bother trying, right?

Timeline: Tuesday June 5th. 10:30am.

I started off my morning with a weekly meeting with my boss, Johnath. I don’t recall exactly how we got to the topic of astrophotography and Venus, but we did. And something (read: Johnath’s nefarious plan) sparked my brain into thinking that surely it couldn’t be that hard to something with my telescope for the transit. And from that point on I knew my day would have one, intensive, singular focus.

The ideal way to view the Sun through a telescope is with a special H-alpha filter (expensive, as noted) or much cheaper general solar filter. Both basically block 99-point-lots-of-9s of the light entering the telescope, making it safe to look through directly with your eye. Alas, I had neither of these filters. (See above, re: prepare and practice.) Instead I fell back to an idea I had heard about, which involves physically blocking most of the telescope’s aperture except for a small opening. This would reduce, in my case, the light-gathering power of an 8″-diameter Schmidt–Cassegrain ‘scope — which is normally great for viewing dim galaxies and faint nebulae — to a much smaller opening. Say, a half-inch to 2 inches.

First step — measure twice, cut once. I was very precisely cutting a form from foam board (say that four times fast), because I wanted to ensure that it fit snugly and didn’t leak light. A full-aperture telescope pointed directly at the Sun has an overwhelming tendency to do things like cause blindness, burn things, and damage delicate optics. That would be bad. On top of the first foamboard layer would be a sheet of foil (because foamboard isn’t very opaque to light), and then a second layer of foamboard to help protect the foil and sit flush with the outer lip of the telescope body. A little bit of gray fleece on the back and flat-black paint helped cut down on reflections. Ta-da, done.

I also built a holder for the #14 welding glass I have, but didn’t end up using it. It’s too dark to use for projection, and viewing through an eyepiece just didn’t seem to work as well as projecting. I also ended up entirely skipping the creation of some kludgey adapter to attach my camera to the telescope (I have a camera fitting, but it’s for the ancient Pentax-K mount).

Finally, after all that, I set up everything to see if it worked. I got the sun projecting onto a small piece of foamboard, and my first thought was to wonder what I has screwed up to get such a big black dot in the image. Oh, wait. Right. That’s Venus. I wasn’t watching the time, and the transit was already underway. Hooray, it works!

After this I couldn’t directly see the sun from my patio any more, so I headed off to a park near work with an open view of the sky. Matt and Jared helped out with moving equipment and holding the projection surface (again, formboard) while I fiddled with the telescope. This is how we were set up for capturing the photo at the top of this post:

Afterwards, just for fun I took an image from NASA’s SDO satellite and scaled it down to compare with my own contrast-stretched shot. I will be the first to admit their $850 million toy captures a far superior image, but I’m still pleased with my own result. (To be clear, mine is on the left. 🙂

And that’s how I spent most of Tuesday.

Boom goes the dynamite

This weekend bug 758812 landed on mozilla-central. So begins a long, slow process of splitting up browser.js into smaller pieces.

“What’s the deal with browser.js, anyway?”

It’s big. Too damn big. For those unfamiliar with it, browser.js basically contains a bunch of the code for driving the UI in a Firefox window. Anything you click or see changing as you browse probably involves this code. A browser needs to do a surprising amount of stuff to work, and over time browser.js has become an eclectic collection of code. About 13K lines of code, in fact. That’s a lot, and leads to a number of problems… It’s a daunting behemoth for those new to the Mozilla code base. It’s haphazardly organized (at best), so it’s hard to find things unless you already know what you’re looking for. And looking at Mercurial’s history for the whole file doesn’t really give you a clear picture of how specific pieces evolve.

“So what are you going to do about it, punk?”

Break it up! The first step landed, which is just spinning out a few big chunks of related code into #included files (about 2K lines). As time goes on (and we see how changes work out), we’ll likely spin out even more. Some of these pieces may also end up evolving into JSMs, which has modest benefits for improving memory usage and startup time. We might even be able to share some of this code across products (Firefox, Fennec, B2G).

“And the bad news?”

Well, there really isn’t any. If you’re a Firefox user, you won’t see anything change. If you’re an add-on developer, you’re unlikely to be affected by these changes. The cleaving of browser.js is currently just a source-tree change with #includes, so the resulting browser.js that ships in Firefox is mostly the same. Future changes to move code into JSMs will have some impact, but we’ll try to keep change small and approachable. Really, it’s only Firefox front-end developers who are likely to notice the changes, patches to certain code in browser.js may now need to patch code in browser-foo.js instead.

“I’m not seeing any cats in this post so far.”

I am never one to disappoint. Here is my cat wearing a tiara.