sat, 10-mar-2012, 14:13
New antenna

New antenna

After the digital television transition several years ago, we bought an omnidirectional antenna from RadioShack and I mounted it on the rear eave of the house. It’s plastic and is saucer shaped. As the snow collected on it this winter we started losing the signal, so last weekend I tried to clear the snow off it, as I did last year, by gently shaking the mast until the snow slid off. This time, as the snow slid toward the edge, it put too much pressure on the bottom of the disc, where it’s screwed onto an L-shaped bracket that holds it to the mast. The plastic broke, it’s now tilted about 45 degrees, and probably won’t survive another winter. And, it’s still having trouble picking up even our strongest station.

A recent post on Lifehacker about a powerful interior antenna (the Mohu Leaf) resulted in an Internet investigation of antennas and whether something like the Leaf would work for us. I didn’t think it would for two reasons: our house has foil-backed insulation and reflective glass windows, and half our stations are in the high-VHF range (7–13) which isn’t what the Leaf is designed to pick up.

Here are the details of our television stations in Fairbanks:

Station (network) Channel Frequency (MHz) Direction
KFXF (FOX/CBS) 7 174–180 44°
KUAC (PBS) 9 186–192 43°
KATN (ABC/CW) 18 494-500 44°
KTVF (NBC) 26 542–548 238°

KUAC is only three miles away, and the rest of the stations are about five miles from the house. Two stations are high-VHF and the other two are UHF.

My plan was to build either a DB-4 or M-4 style UHF antenna (lots of plans are available on the Internet if you search for those two terms) and then add a VHF dipole to improve FOX and PBS.

Before I went to the trouble of building something complex like the DB-4 / M-4, I thought I’d start with a simple folded half-loop dipole designed for the range in between channels 7 and 9. If that got me KFXF and KUAC, I’d know what I needed to add to the UHF antenna to pick them up. Magically, the dipole was all I needed.

You can read about the theory and calculations on the Internet, but the length of the dipole (in inches) can be found with the following equation: 468 / MHz * 12". For the middle of channels 7 and 9, this works out to a dipole length of 30 11/16". This could be built in a variety of ways, but I chose a folded half-loop configuration, which means a single piece of wire, bent to form a loop stretched such that it’s 30 and 11/16th inches from tip to tip. The two ends of the wire are connected to the two leads of a 300 to 75 Ohm balun transformer (RadioShack part 15-1230), which typically has a coaxial connection on the other end.

Here’s a schematic:


I made mine from the bare wire inside a 72" section of 12-2 Romex, bending the ends around a screwdriver, which resulted in a separation of about 3/4" between the top and bottom of the loop. Each end was twisted around a brass screw, and tightened with the transformer tabs between two brass washers. The center of the dipole was screwed between two pieces of wood for support, and screwed to the roof of the arctic entryway. The photo shows the antenna and support. The main roof of the house is in the upper left corner.

I tested it in two orientations, one where each dipole was pointed at the stations, and one where it was perpendicular to the stations. Based on the signal strength numbers, I got slightly better results when it was close to perpendicular.

Surprisingly, this single loop of copper wire is all that we needed to pick up all the stations in our area. I got a signal strength of 100 for KUAC and KTVF, 84 for KFXF and 78 for KATN. Not bad for a $6 transformer and six feet of surplus wire!

tags: antenna  HDTV  house  TV 
tue, 06-mar-2012, 18:44
Nika in a blizzard

Nika in a blizzard

This morning we had five inches of new snow on the ground, and it’s been snowing pretty consistently since, with really heavy snowfall in the last hour or so. As of midnight last night Fairbanks was 12.7 inches below normal for cumulative snowfall since July 1st (last year), but if this keeps up, we may actually get to the normal amount of snowfall. It’s been many years since that happened.

Unfortunately, like last year, the blizzard of 2012 is coming at the very end of the winter. Last year we got more than a foot of snow at the end of February, and this time around it’s even later. Still, there’s at least three more weeks of good ski conditions to look forward to, and this snow may help flatten some of the bumps on the Valley trail.

It’s hard to take a photograph that captures what a blizzard looks like because the snow that’s falling just mushes the background, but take my word for it: it’s really coming down!

tags: weather  Nika  snow 
sun, 04-mar-2012, 12:15

I re-ran the analysis of my ski speeds discussed in an earlier post. The model looks like this:

lm(formula = mph ~ season_days + temp, data = ski)

     Min       1Q   Median       3Q      Max
-1.76466 -0.20838  0.02245  0.15600  0.90117

            Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.414677   0.199258  22.156  < 2e-16 ***
season_days 0.008510   0.001723   4.938 5.66e-06 ***
temp        0.027334   0.003571   7.655 1.10e-10 ***
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.428 on 66 degrees of freedom
Multiple R-squared: 0.5321, Adjusted R-squared: 0.5179
F-statistic: 37.52 on 2 and 66 DF,  p-value: 1.307e-11

What this is saying is that about half the variation in my ski speeds can be explained by the temperature when I start skiing and how far along in the season we are (season_days). Temperature certainly makes sense—I was reminded of how little glide you get at cold temperatures skiing to work this week at -25°F. And it’s gratifying that my speeds are increasing as the season goes on. It’s not my imagination that my legs are getting stronger and my technique better.

The following figure shows the relationship of each of these two variables (season_days and temp) to the average speed of the trip. I used the melt function from the reshape package to make the plot:

melted <- melt(data = ski,
               measure.vars = c('season_days', 'temp'),
               id.vars = 'mph')
q <- ggplot(data = melted, aes(x = value, y = mph))
q + geom_point()
  + facet_wrap(~ variable, scales = 'free_x')
  + stat_smooth(method = 'lm')
  + theme_bw()
Model plots

Last week I replaced by eighteen-year-old ski boots with a new pair, and they’re hurting my ankles a little. Worse, the first four trips with my new boots were so slow and frustrating that I thought maybe I’d made a mistake in the pair I’d bought. My trip home on Friday afternoon was another frustrating ski until I stopped and applied warmer kick wax and had a much more enjoyable mile and a half home. There are a lot of other unmeasured factors including the sort of snow on the ground (fresh snow vs. smooth trail vs. a trail ripped up by snowmachines), whether I applied the proper kick wax or not, whether my boots are hurting me, how many times I stopped to let dog teams by, and many other things I can’t think of. Explaining half of the variation in speed is pretty impressive.

tags: skiing  R  statistics 
sun, 04-mar-2012, 10:51
Nika, The Tiger’s Wife

Nika, The Tiger’s Wife

I finished the last of the sixteen Tournament of Books contestants (well, except that I couldn’t actually finish The Stranger’s Child). I haven’t commented on the last four, but I read and enjoyed The Last Brother, Salvage the Bones, The Cat’s Table, and The Tiger’s Wife.

Of the four, I enjoyed The Tiger’s Wife and The Cat’s Table the most. Both require some patience, and I didn’t get into them to the extent that I was thinking about them when I wasn’t reading them, but they are worth the effort. The Tiger’s Wife easily beats The Stranger’s Child in the first round, as does The Cat’s Table over Swamplandia! I enjoyed Swamplandia! but it feels like it has been years since I read it, and the story didn’t stick with me like a great book does.

The dog in the photo is our oldest, Nika, who turned fifteen last September. She is having trouble with her hind legs, and often has no appetite, but when we go for walks on the Creek or trails, she’s still as excited and animated as she was when she was a puppy. I’m listening to the A’s vs. Cubs game now, but I think I’ll take her out for a little walk later. The A’s introduced Cuban sensation Yoenis Cespedes earlier today, but he isn’t in the starting lineup. I will be very interested to see how he handles major league pitching, but that probably won’t happen for a few days.

sat, 03-mar-2012, 15:47
Recently read iBooks

Recently read iBooks

The Morning News Tournament of Books starts next week, and I’m about a third of the way through the only unread volume in this year’s contest, Téa Obreht’s The Tiger’s Wife. In preparation for my posts on the tournament, I wanted to generate a tournament bracket, filled with my choices. I could have fired up Inkscape or my favorite old drawing program, xfig, but drawing something that has such an obvious pattern built into it would be much easier using a programming language rather than moving a mouse pointer around over and over again.

I debated refreshing my Metapost skills, the tool I used to generate my best baseball scorecards, and even wrote a simple Pic (a language written in 1982 by Brian Kernighan, of K&R and awk fame) macro to do it. But I wanted something that would work on the web, and for figures on the Internet, SVG is really the best format (well, unless you’re stuck on Internet Explorer…). Metapost and Pic produce PostScript and PDF, and I wasn’t happy with the way the available PS to SVG image converters mangled the Pic PostScript.

I settled on Python (of course!) and the svgwrite library. Generating an SVG file programatically is pretty easy with svgwrite. You start the drawing with:

svg = svgwrite.Drawing(output_filename, size = ("700px", "650px"))

and then draw stuff onto the page with commands like those found in my draw_bracket function. The all-caps variables are global parameters set at the top of the code to control the size of various elements across the entire figure. I also created a Point class for handling x / y coordinates in the diagram. That’s what start is defined as below (and how I can access x and y via start.x and start.y.

def draw_bracket(svg, start, width, height, names):
    """ Draw a bracket from (start.x, start.y) right width, down height,
        to (start.x, start.y + height), placing the names above the
        horizonal lines. """

    lines = svg.add(svg.g(stroke_width = 2, stroke = "red"))
    lines.add(svg.line((start.x, start.y), (start.x + width, start.y)))
    lines.add(svg.line((start.x + width, start.y),
                       (start.x + width, start.y + height)))
    lines.add(svg.line((start.x + width, start.y + height),
                       (start.x, start.y + height)))
    texts = svg.add(svg.g(font_size = TEXT_SIZE))
                       (start.x + TEXT_RIGHT, start.y - TEXT_UP)))
                       (start.x + TEXT_RIGHT, start.y + height - TEXT_UP)))

With this function, all that’s left is to design the data structures that hold the data in each column of the diagram, and write the loops to draw the brackets. Here’s the first loop:

current_start = Point(MARGIN, MARGIN)
for bracket in first_brackets:
    draw_bracket(svg, current_start, INIT_BRACKET_WIDTH,
            FIRST_BRACKET_HEIGHT, bracket)
    current_start = current_start + \
                    Point(0, FIRST_BRACKET_HEIGHT + FIRST_BRACKET_SKIP)

first_brackets is a tuple of paired tuples, so each bracket above contains the two book titles that should appear on each leg of that bracket.

first_brackets = (
        ("Sense of an Ending", "The Devil All the Time"),
        ("Lightning Rods", "Salvage the Bones"),

The full code can be downloaded at The result:

2012 Tournament of Books

I’ll comment more on my picks after I’ve finished The Tiger’s Wife, and as the tournament starts next week. There were a lot of great books in the tournament, and I wouldn’t be disappointed if some of the later bracket winners in my diagram wound up winning. For me, the most interesting first round bracket is Wil Weaton’s tough choice between Ann Pachett’s State of Wonder and The Sisters Brothers by Patrick deWitt. I chose Sisters, but it was a tough choice, and even though it doesn’t make it past round one on my diagram, I’d be happy to see Wonder win it all.

One other note on the screenshot from my iPad at the top of the post. There are several excellent, non-Tournament books pictured. I highly recommend The Last Werewolf, by Glen Duncan, Neal Stephenson’s Reamde, 11/22/63 (Stephen King), and Eleanor Henderson’s Ten Thousand Saints. These four are easily better than the worst of this year’s Tournament (Hollinghurst, DeWitt and Zambreno).

Meta Photolog Archives