Wex and I had an extended discussion about 'halve_horiz' on chat. I'll summarize merely by saying that this implementation is fine if the resolution is an even number, but will introduce an unfortunate partial-pixel spatial shift if the resolution is odd. He'll submit a revision that will make us both happy.