Thank you, thank you, thank you. I got quite a few great suggestions for a name for the new HiRISE stereo pair application I mentioned previously. Here they are:

Through Twitter:

  • Pairendipity
  • Opportune Viable Extraneous Results Lending to Awesome Parallax: OVERLAP
  • Over Observed Possible Stereoscopic: OOPS
  • Super Mega Ultra Hyper Stereo Seeker
  • Cyclic Redundant Observations Search for Stereo-Effect-Yielding Extra Data: CROSSEYED
  • Twin Hunter
  • RENA
  • HiDyad
  • Coke Bottle Glasses
  • Coincidental Binary Groupings
  • Cypress Hill

Through comments:

  • HiRISE Serendipitous Accidental Pairs (HiSAP)
  • HiRISE Serendipitous Observations Accidentally Recorded (HiSOAR)
  • HiRISE Advanced Research in Explorative Stereo Software (HiARESS)
  • HiRISE Software of Topographical Explorative Research in Extraterrestrial Observations (HiSTEREO)
  • HiRISE Stereo PRojection Interface TEchnology/TElemetry (HiSPRITE)
  • High-resolution Analysis of Data Exploration in Stereo (HADES)
  • Serendipity
  • MarsUpilami
  • HiThere
  • HiRISE Stereo Pair Inspector (HiSPI)
  • Marvin

Of all of these, my favorite is Pairendipity, suggested by @avdflight through Twitter. It was also the very first suggestion I got, and I immediately fell in love with it. It captures the accidental stereo nature of the software quite marvelously.

I predict one or two team members will groan, but I think the whole rest of the team will be as delighted as I am. Thanks a bunch everyone, and thanks especially to @avdflight!


Help Me Name a New HiRISE Application

I need your help. I have a new HiRISE application, and it desperately needs a name. There’s no prize for this, although if the name is particularly ridiculous or groan-inducing, you’ll have the satisfaction of knowing you’re making me smile every time a team member has to use the app or talk about it.

The application hunts through our database of acquired observations and tracks down accidental stereo pairs. By “accidental stereo pair,” I mean a pair of observations that were not planned as a stereo pair but which happen to make a decent set.

The easiest example to imagine is the case where we’ve done a seasonal repeat monitoring series of a particular location, where we might have two, three, four, or more observations of the same site that were taken at different look angles. Odds are high there’s a good stereo pair in there.

Less easy is the case where we took a couple of observations that happen to overlap significantly. Maybe we were putting together a mosaic, for example. Maybe there’s a nice stereo pair in there, too.

So what kind of name do I want, you’re wondering. The application we use for planning stereo pairs in advance is called HiSEAS: the HiRISE Stereo Effect Analysis Software. I like this name. It’s got a nice, adventurous feel to it that brings to mind exploration and, well, pirates. But it’s also got a horrible homophonous pun in the name related to vision. That’s a good name, but it can’t be the name of this software.

Right now, this new application is called Find_Stereo_Pairs, which is very dull. I want something better, and I want you to help me with it. It does not have to start with “Hi,” nor does it have to be an action phrase (“find stereo pairs”).

You can try commenting below with names, but probably the best way to get me a name is to tweet it at me: @HiCommander. Like I said, there are no prizes beyond the knowledge that a HiRISE team member will probably have to say it at some point. The deadline is Friday morning, January 11, 2013, at 10 AM US Mountain Standard Time (UTC-7:00).

By the way, when I say, “I have a new HiRISE application,” I mean a student programmer, Ashley in this case, wrote a new HiRISE application for me. Nice!

Hi There

It’s been a long while since I last updated this thing. I see the most recent post is about a game I haven’t played in over a year. (It’s still a cool game, especially when you’re waiting in line.) Since I advertise this site in my Twitter info, maybe I should start writing here more.

I’m a software developer for HiRISE.

HiRISE is a big, badass camera currently in orbit around Mars. It’s carried by a gorgeous pelican-like spacecraft called the Mars Reconnaissance Orbiter, MRO.

Your typical spacecraft is a box with an antenna, some sort of power source, and a bunch of bits sticking out. Some thrusters, too, of course. Gotta have thrusters. On MRO, the antenna is huge. The power source is a giant pair of wing-like solar arrays. HiRISE is the biggest bit that isn’t the HGA (high-gain antenna) or the SAs (solar arrays). It’s a huge telescope barrel pointing down at the surface of Mars in MRO’s normal flight configuration.

Mars Reconnaissance Orbiter

Artist’s concept illustration of MRO over Mars. (NASA/JPL)

Here’s a picture. I’ll give you three guesses as to which of these things is HiRISE. Some clues: Does it look like a big, foil-wrapped radio dish? That’s not HiRISE. Does it look like solar arrays? Not us. The next thing you think might be us is, in fact, us.

(Here’s a link to a picture of a pelican. See? MRO kind of looks like a pelican.)

As I say, I’m a software developer. Sometimes people like to call me a software engineer, but I don’t really think of myself as an engineer.

I started out in planetary science after an undergrad journey through physics and astronomy. If you’ve heard of Jay Melosh or Rick Greenberg, they were my grad school advisors. If you haven’t heard of them, they were still my advisors but it’s not critical that you know who they are so let’s skip forward a bit.

I love space. I love planets. I love science. I love doing all the dicking around that comes with science. I’m not fond of the follow-through, though. That’s the publishing part, the giving-of-talks part, and that’s in many ways the most important part of science.

I can, however, turn a lot of my dicking around into something other scientists can use to do their thing more easily, and since much of my dicking around turns out to be computer programming, that was the clear path forward.

So I do that. I write software that scientists use. In this case, it happens to be software that is used to plan images that are then taken by a camera orbiting Mars on a what is basically a foil-wrapped box. I also write the software that we use to generate commands for that camera; these are almost always imaging commands.

The planning tool is called HiPlan. The commanding tool is called HiCommand. Other fun names of tools that I’ve developed include these: HiTemp, HiSEAS, Data Slacker, The HOGG, and HIPHOP. I’ll explain those some day, but let me just say for the record how awesome it is to hear the science team talking about “hiphopping” and “hogging” the latest image. I giggle a little bit inside every single time.

Because the commanding tool is called HiCommand, I call myself HiCommander on Twitter and elsewhere.

I don’t do my thing alone. I often work with one or two student programmers, with exotic names like Steve, Missy, a different Steve, Shawn, Josh, Jeremy, Arjang, Ben, Brian, and Drew. I’m worried I might have forgotten some. A plurality of the time, when they leave, they go off to the DoD or one of its subcontractors. Missy went off to State, though, and that makes me especially happy. By “State” I mean “The United States Department of State.” She’s in the diplomatic corps. I love that.

In addition to the student programmers, members of the science team often generate prototype tools that I then take under my wing. HIPHOP started out as an IDL program written by science team member Nick. HiTemp started out as an IDL program written by science team member Laz. HiSEAS started out as an IDL program written by science team member Shane. Data Slacker started out as a Python program written by science team member Ross.

There are three other full-time software developers on the team, each responsible for software in different areas of HiRISE operations. I’m the lead on the planning and commanding, though, and for that, it’s just me, my student or two, and the occasional science team member who puts together a prototype.

Right now, in the middle of August 2012, you might be most aware of HiRISE because of what we’ve done in support of the Mars Science Laboratory, Curiosity. I prefer to call it MSL, because I like TLAs.

MSL landed on Mars on August 5th or 6th, depending on where you were. I was in Tucson, gathered together with a bunch of other HiRISE folk, and we watched it in our main conference room, so that was August 5th for us. After MSL had landed, our work really began, because, you see, a few minutes before MSL touched down on Mars, we had taken a picture of it.

We had taken a picture of it at the end of its parachute, racing through the very thin atmosphere of Mars.

So we spent the night waiting for the data to get to us, then waiting for it to be processed, and then combing through the—oh, wow, targeting specialist Nicole found it pretty quickly. Way to go, Nicole!


Sharpened image of MSL on its parachute as taken by HiRISE. (NASA/JPL/University of Arizona)

We showed it off at the press conference the morning of the 6th, according to the clocks in JPL and in Tucson. You might have seen it. You probably thought, wow, MSL is really cool and the landing mechanism is crazy, but holy shit did we really take a picture of it on its chute, racing through Martian air?

Yes we did. This is it, here.

Like I said, HiRISE is a badass camera. The best part about it is that we did it 2008, too, for the Phoenix lander.

Did I really just write that the best part of the MSL image is that we’d already done a similar image four years earlier? What?

Obviously the best part about the MSL descent image is the MSL descent image.

In any case, yes, the world was reminded once again about HiRISE when MSL landed on Mars. When you see images taken from space of the rover and the area in which it’s working, that will be us as well. Sometimes the world forgets we’re there. Frowny face.

During the press conference on August 7th, MSL mission manager Mike Watkins said something along the lines of “Engineers hate surprises.” Implied as part of the larger story he was telling was that scientists love them.

This is why I don’t consider myself a software engineer. I love surprises, where “surprises” here means “bugs.” Bugs are mostly fun for me. Sure, they can be quite annoying, like the time I broke HiCommand when targeting specialist Anjani needed to generate some commands at 8 PM a number of years ago. But on the whole, they are fun to track down. Fun to pick apart. Fun to test.

Bugs are so fun, I award gold foil stars to our targeting specialists when they find one. I stick the stars on the nameplates on the doors to their offices. (It started when targeting specialist Ingrid jokingly asked if she would get a gold star for finding a bug. I thought, “Hell yes,” and ran off to the campus bookstore to buy a pack. Really good bugs earn a chocolate star, which is just a chocolate candy bar of slightly better quality than something produced by the Mars company, which I realize is a pretty unlikely thing for me to say.)

I also stick red foil stars of shame on my own nameplate when I really screw something up. Breaking HiCommand was a double red-star affair.

(Since I’m describing the HiPlan/HiCommand bug reward system, I should maybe note that finding a gold-star bug does not necessarily mean I get a matching red star. Indeed, it’s almost always one or the other, on my judgment. I am judge, jury, and deliverer of foil stars.)

So, no, I don’t hate surprises when it comes to my software. I love them. Ergo, I’m not really a software engineer. I guess you could say I’m a software scientist, except that’s not a thing anyone says, ever. “Computer scientist” is usually the term, but to me that means “AI researcher,” and I’m not that.

So there it is. Nice to meet you. I hope to talk more about HiRISE here, especially HiPlan and other tools.

Orbital: The Perfect iPhone Game

I’ve got a lot of games on my phone: 20 different tower defense games (wow, that can’t be right, can it?), my US RDA of match-three games, three Flight Control-style path-drawing games (oh, Aqua Globs, thank you for adding two new maps today), a handful of artillery games (iShoot is so close to Scorched Earth, it hurts), four—wait, really?—four pinball games? WTF. I don’t even like pinball in real life.

Lately, though, I’ve been playing just one game, which looks to be pretty much the perfect iPhone game: Orbital.

Orbital Field

Orbital presents you with a large, empty field. At the bottom, you have a little cannon that oscillates back and forth, rhythmically sweeping its bore like a windshield wiper across the field. When you tap the screen, the cannon fires a shot. When the shot hits an obstacle or a wall, it bounces off. While it moves, the shot loses momentum and slows down. When the shot stops, it expands radially until its perimeter hits an obstacle, at which point the shot becomes a new obstacle itself, with the number 3 in the center. When such a circle is hit by another shot, the number in the center—a counter—decrements. When the counter reaches zero, the circle vanishes and you score a point. If the fired shot comes back across a boundary at the bottom of the screen, just above your cannon, you lose. Optionally, the circles may distort the playing field like heavy masses gravitationally distort space, affecting the fired shot’s path.

Sounds thrilling, doesn’t it?

Here’s why this game is awesome:

Orbital Field, Shot Fired

1. It’s simple. See above; that’s the entirety of the game. Those are all the rules.

2. It’s gorgeous. The graphics consist of neon lines and colorful particle effects. They’re 100% pure visual candy.

3. There’s a single control. One. Uno. Ichi. Eins. The Chinese word for “one.” Just tap the screen anywhere—anywhere at all—to fire a shot. You simply wait for the cannon to swing back to whatever position is best for firing a shot, then you tap the screen. Done.

4. It’s quick. A typical game lasts around a minute if you’re good. Ten seconds is more like it sometimes. This means you can actually play a complete game while waiting in line for your gyro. Hell, you can probably play a half-dozen games. Because…

5. No load time between games. When you tap New Game, you get the new game immediately. When the game ends, you can tap the screen to get the menu immediately, and from there, you can tap the New Game button again.

That’s it. Extremely simple gameplay. Gorgeous graphics. Quick games with no load times between. It’s the perfect portable game. You can sit there all day, pushing a single button, getting immediate, awesome visual feedback. It’s the perfect game.

Also, it has a cool robot voice.

Two Things

Two things of note, both of which amount to this: What the hell is wrong with us?

1. Starbucks has really awful coffee. What the hell is wrong with you people?

Seriously. I’ve never had a good cup of coffee (or a good tall of coffee, or grande of coffee, or venti of coffee, or whatever the hell they want to call it) at a Starbucks. Never. It always tastes a little burnt, and it’s always too goddamned hot even to hold the cup, even with one of those little wraps designed to make hot coffee cups holdable. I can only imagine that it’s their mixed drinks that people are after…but if the fundamentals of the mixed coffee drink are not sound, how in the hell can the mixed drink even taste good, except by masking the goddamned coffee? So why not just chug a Mountain Dew or whatever? Go ahead and warm it up and add some cream if you need to.

And yet—AND YET—this morning, driving home from the airport, there’s some backed up traffic at Broadway and Campbell. “Hm,” I think to myself. “Must be an accident.” Yeah, well, it kind of was an accident. An accident of marketing. These people are backed up waiting to get into the Starbucks parking lot! And it looks like it’s two goddamned lines in, merging into one! What the fuck is wrong with you people? Seriously, if it’s 7:30 in the morning and I want coffee, I’ll be fucked if I’m gonna wait in line. I’m getting coffee at 7:30 in the morning because I need a fucking cup of coffee right now!

7-11 never has a line. Circle K never has a line. And it tastes better. And there are more of them than there are of Starbucks. They surround them.

Also, punch line: The very same intersection has a Safeway kitty-corner across the way, at the southeast corner. That Safeway? Yep, it has a Starbucks in it. Lewis Black wasn’t kidding. You can, even today, walk out of a Starbucks and see another Starbucks.

I’m enjoying a delicious cup of Diedrich French roast right now. It’s tasty. I had to wait a whole 40 seconds for it to brew in my Keurig. In a few minutes, I’m gonna grab a delicious cup of Timothy’s cinnamon flavored coffee. Suck on that, you chumps waiting in line at Starbucks.

2. Check out the grocery store pop (“soda”) aisle. What the hell is wrong with us?

I was at that Safeway (not getting coffee, thank you very much) and ventured into the pop aisle. “Soda” for you heathens not from MN. You know what I saw?

I saw an entire aisle with pop on one side and snack chips on the other.

Repeat: The whole goddamned aisle was pop on one side and snack chips on the other.

Please consider that for a moment. Where do I even begin? Well, aside from the obvious two-word declaration: We’re fucked.

(The crackers, popcorn, and mixed nuts were in an entirely different aisle, by the way.)

3. Bonus Thing of Note

Grocery store salsa is pretty damned good. And in great variety.

If only I could find some chips to go with it…

JFreeChart’s (Ab)Normal Distribution Function

I’ve got a long-running project that’s very nearly completed, in which I’m converting some old IDL code to Java for the modeling of Martian photometry as observed by HiRISE. I use JFreeChart in this project (and all of my projects that require charts, in fact).

I happened to be digging into the source code for the NormalDistributionFunction2D class and I found this piece of madness:

public double getValue(double x) {

  return Math.exp(-1.0 * (x - this.mean) * (x - this.mean)

    / (2 * this.std * this.std)) / Math.sqrt(2 * Math.PI

    * this.std * this.std);


“std” is the function’s standard deviation, set at construction.

The madness is in the denominator of the function: the square root of…a constant times the standard deviation squared. Isn’t that just the standard deviation times the square root of a constant? And the square root of a constant is itself a constant.

So why isn’t the denominator just a constant times the standard deviation? Why have four multiplications in there followed by a call to the math library? This expression is evaluated every single time the NormalDistributionFunction2D’s getValue method is called!

Because the standard deviation could be negative! Wait, what? No, it can’t. Even if there was some sense to it, the only computation in this code involves squaring the standard deviation, effectively stripping it of its sign. The denominator really ought to be a pre-computed constant times the standard deviation.

Also, since the class doesn’t let standard deviation be changed after construction, the entire denominator can be pre-computed at construction, as can the denominator of the exponent used in the numerator. Neither component ever changes once the object has been constructed.


This is in version 1.0.10 of JFreeChart, by the way. Maybe it’s been fixed by now. I probably ought to be a good open source citizen and submit a fix myself if it’s not been fixed.

D&D Miniatures: First Game

I finally got around to trying out the D&D Miniatures game this past Saturday. Verdict: Fun.

Galen came over and we tried out a couple of test battles first. Skipping the Starter Set’s Quick Start Battle, we dove right into the “Evil Wilderness Warband” vs. “Good Civilization Warband” match. (These guys need better names for their teams.) For reference, the bands are as such:

Evil Wilderness Warband

  • Young green dragon
  • Yuan-ti swiftscale

Good Civilization Warband

  • Dwarf battlemaster
  • Elf warlock
  • Human sellsword

First match, I played the Good Civilization Warband and Galen played the Evil Wilderness Warband on the Crossroads map. It’s literally a crossroads: two roads crossing over, with an old, abandoned rest stop nearby, and pretty much nothing else on the map. The battle went almost exactly not how I expected. I took the dragon down surprisingly quickly, and the yuan-ti lasted much longer on its own, against all three of my guys, than either of us imagined was possible. In the end, though, Good prevailed. Note: Don’t let anyone ever get anywhere near the elf warlock, though. She is worthless in a melee battle.

For the second match, we switched sides. I played the Evil Wilderness Warband and Galen played the Good Civilization Warband, this time on the Monster Lair map. The Monster Lair is much more interesting, with lots of forest cover, a stream, and, of course, a monster lair in a cave. This one was more interesting, and that worthless elf warlock met an awful end at the awful front of a green dragon. The dragon and the yuan-ti dropped at about the same time this match, and Good once again prevailed.

We took the training wheels off next and dove into a real battle. Eh, mostly real. We picked minis from the Dungeons of Dread set, going with a 100-point band each, maximum of five figures, maximum figure cost of 60 points (instead of 200, 10, and 150, respectively, for the standard warband). Since I’ve had these for many months, you’d think I’d have a great band sitting around, pre-made, but that’d mean you have no idea who I am. (This despite the database I’ve got set up for this very purpose.) We just rifled through the cards, looking for themes and interesting combinations, and finally came down to these:

Evil Underdark Monsters

  • Balhannoth
  • Grick (2)
  • Giant centipede (2)

Good Civilization Humanoids

  • Cleric of Pelor
  • Halfling paladin
  • Tiefling warlock
  • Elf archer (2)

Mine was the Good Civilization Humanoids, despite the presence of two elves (hated elves!), and Galen’s was the Evil Underdark Monsters. Again with the names! And yes, that’d be Sir Wellby Greenapple there, albeit sans Shiroi.

We used the Flooded Ruins battlemap, and let’s just get that out of the way right now: That map looks a lot cooler than it really is. The river cutting through the middle is very cool, and it’s a fun tactical challenge, yes. Each team has two starting zones, with team A’s zones on one side of the river and team B’s on the other. Good. Each team has one victory zone, located on the opposite side of the river from its victory zone. Nice. You have to cross the river to get to your victory zone. That’s a reasonable tactical challenge that adds something to the match without overwhelming the players with complexity. Great.

Except that each victory zone is also a teleporter leading to the other zone, and each of the victory zones is located on a straight line about ten squares from one of the two opposing starting zones. That arrangement effectively turns the map into a line: If you can start your team out in a starting zone ten squares directly in an unimpeded line from a teleporter whose opposite end is your own victory zone, what’s the point of the river? What’s the point of the other starting zone?

We made it less silly by ignoring the fact that the victory zones were linked teleporters. Another fix would be to ignore the direct-line starting zones. This adjustment would make full and interesting tactical use of the map. Each team would have two routes to its victory zone: a winding path on one side of the river to the opposing zone/teleporter, or a slightly more direct route across the river. (One could also just ignore the victory zones, but more than a couple minis actually use the victory zones as part of their abilities, so ignoring the victory zones would hinder those particular minis.)

The Good Civilization Humanoids were pretty cool, with the kinds of abilities you’d expect from good guys: cooperative abilities, healing abilities, etc. The cleric’s Aura of Radiance gives all allies within 5 squares a damage bonus on melee attacks. His Combat Healing power heals any ally within 5 squares who makes a melee attack with a natural roll of 16 or more (i.e., 1/4 of the time). These two abilities really help the cleric support nearby allies engaged in melee combat. He’s also got a champion power that gives all of his allies a bonus to attack rolls against an enemy that attacks the cleric and misses.

Meanwhile, the paladin has his Vindicating Blow attack, which he can use to heal himself or an ally whenever the paladin hits an enemy. The paladin is all about melee attacks, and he combines quite nicely with the cleric. Worked correctly, the paladin gets extra damage, heals an ally, possibly gets a bonus to hit, and possibly heals himself every time he attacks when near the cleric.

The tiefling warlock looks better on cardstock than in practice. His Inevitable Blast attack does a lot of damage, but he has to hit… I almost never did, as I recall. His Price of Pride attack is pretty sweet, causing the afflicted enemy to take damage a little more than half the time whenever that enemy attacks, but the Price of Power actually has to land, and it’s only usable once—and no recharge! (I totally blew it on the balhannoth.)

Even the hated elf archers were pretty cool, provided they could keep moving and could stay away from the enemy.

As for the Evil Underdark Monsters… They seemed to work pretty well, too, especially that damned balhannoth. It’s basically a teleporting, tentacled, slaughter tank. We had a little problem understanding its Warp power, but I think I’ve figured it out now. Because we didn’t quite understand it, Galen never invoked it; I would have had an even tougher time defeating the underdark dwellers if there was a chance I could miss before even attacking.

The gricks were especially irritating to me. Their inherent resistance to all types of energy damage affected the cleric the most, since his one and only attack is Radiant damage. It also effectively cancels his Aura of Radiance, since the latter adds exactly the amount of energy damage the grick’s resistance reduces.

The giant centipedes weren’t anything particularly special, although they did well for large chunks of the Flooded Ruins map. They can move twice as fast whenever they spend their whole movement adjacent to a wall, and there are enough walls spaced exactly right that the centipedes can scuttle all over the battlefield quite quickly. The exception is the river, of course—since these are not aquatic centipedes (…), they move half as fast in the water; okay, so that brings them to normal speed when near a wall in the water, but there are chunks of the map where they can’t do that, making them extra slow.

Overall, this last battle was pretty fun, and the game itself is also pretty fun. I’m thinking at this point that I’ll stick with the cleric, paladin, and warlock combination. It seemed to work well. I’ll probably use the elf archers again if I have to fill out some slots in my bands.

Gotta come up with better names for the bands though…