The Too-wide Web

For some reason, computer monitors have been getting wider and wider for years. This puzzles me, since like most people, when I'm working, I tend to use tall narrow documents, both to read and to edit. Sometimes I can arrange things so that I have two panels on the screen, which restores them to a more sensible shape, but the Web is a problem. Web pages seem to have begun adapting to wide monitors by adding wider and wider margins, often filled with ads and/or navigation materials. For me, these margins are often too wide for me to use a two-panel setup (it's just a laptop) but often they leave so much width when used full-screen that the text is tiresomely long. Typesetters have a rule of thumb that you shouldn't put more than about twelve words on a line because it's hard to read. Fortunately, I found a Chrome hack that lets me solve the problem.
The RepRap wiki is too wide.



Full post

USB Stick

My sister Margaret has a pretty awesome job: in the summers, she works for Fish and Game in Alaska, studying salmon, and (being a government job in Alaska) they pay well enough that she can spend the rest of the year repairing and sailing her boat. There seems to be a great deal of repairing, but one dictionary I had as a kid defined a boat as "a hole in the water into which you pour money". In any case, Margaret has been sailing around the Caribbean; she delivered beans to Haiti in the wake of the earthquake, and she hosted a skill-sharing conference for sailors this last winter. It's an awesome life, and I'm totally envious, but it's a little hard on consumer electronics. Just last year she lost a camera full of pictures (which I totally wanted to see!). So I thought I'd try to make her an indestructible USB stick. I think it worked out pretty well.

Broken centerboard from her dinghy, Scout


Full post

Recipe/Remedy


I'm fighting off the tail end of a cold, that stage where you're all congested and just can't seem to clear your lungs. So I figured I'd whip up a home remedy that is also dinner. Simple, easy, and effective. Black beans and corn.


Full post

NuSTAR about to launch

NASA is getting ready to launch a new X-ray satellite, NuSTAR. This satellite will observe harder X-rays than we are currently able to. More specifically, this satellite is able to produce high-resolution images of the hard X-rays that come from the decay of isotopes produced in supernovae; the ability to observe hard X-rays with high spectral resolution should also let us probe neutron star formation. Plus it may help us pin down that hard X-ray emission from anomalous X-ray pulsars that nobody understands.

If all this sounds hopelessly technical, sorry. It's still impressive to me that they're going to take this hundred million dollar spaceship, fill it with what amounts to high explosives, strap it underneath a discontinued Lockheed airplane, fly it up into the air near Kwajalein, then drop it and light the fuse. The rocket will then burn for a few hundred seconds, dropping several stages and winding up in low Earth orbit. Once there, the mast holding the mirrors will extend from its one-meter storage canister to its full ten-meter length, the satellite will extend its solar arrays, and scientists will begin debugging and calibrating the instruments. That's if everything goes well; no Pegasus launcher (which this is) has ever actually exploded, though one pair of satellites failed to exit its fairing. So there are some people chewing fingernails, and there's some real drama here. You can watch it online.

Sorry for the hurried nature of the post; I'm planning to watch it live and report on the results as soon as we know.

Edited to add: Success! At least so far. The satellite is in orbit and the solar panels work. The last big worry-point is the extension of the boom; the ten-meter beam that holds the mirrors in position relative to the cameras is currently folded into a one-meter canister. Supposedly, the scientists were reassured that "we can't give you any details, but we know how" to build such a boom, but it won't extend for another week. That'll be followed by a few weeks worth of testing and calibration. But so far so good.

Full post

Error 451: Unavailable for legal reasons

Proposed new HTTP error code (like the well-known 404): 451 (Unavailable for legal reasons). Contains the usual hacker humour, including a thank-you to Ray Bradbury (may he rest in peace) and the following example:

HTTP/1.1 451 Unavailable For Legal Reasons
Content-Type: text/html

<html>
<head>
<title>Unavailable For Legal Reasons</title>
</head>
<body>
<h1>Unavailable For Legal Reasons</h1>
<p>This request may not be serviced in the Roman Province of
Judea due to Lex3515, the Legem Ne Subversionem Act of AUC755,
which disallows access to resources hosted on servers deemed
to be operated by the Judean Liberation Front.</p>
</body>
</html>
Of course, this particular error might have been the result of hacking by the People's Front for Judea.

Full post

French word of the day: bidouilleurs

A brief comment about background: I was born in Montreal, which is supposedly the third-largest French-speaking city in the world after Paris and Kinshasa, but as a result of family history and linguistic segregation (which has some nasty history) I grew up speaking English. These days I work in English, like most scientists, but I speak a lot of French socially. So from time to time I come across a neat French word. I think it might be good for my general education to post little comments on them here.

There's going to be a mini Maker faire here in Montreal at the end of the summer. Neat! But what caught my eye was that it seems the French word for "maker" is "bidouilleur". So what? you ask. The French word "bidule" is a kadigan roughly equivalent in meaning and seriousness to the English "thingamajig", so a bidouilleur (or bidouilleuse!) is someone who operates on thingamajigs. Which is pretty accurate, really. 

Full post

Fabric triangulations

D dress from Continuum Design
What with cheap and easy 3D scanning and laser cutting, I see very interesting possibilities for bespoke clothing. But I think there are some technological issues to resolve, and in particular, there's a particular mathematical problem I'm not quite sure anyone has studied. Or at least, I'm not sure how to find the work on it (suggestions welcome!).


Full post

Old-school UNIX nerdery

I've never owned a Windows machine, or a Mac. It's not that I'm particularly hardcore about open source, it's just that I got used to a command line back in the old VIC-20/DOS/DesqView days and never really got away from it. Our undergrad computer network was very convenient, but made up of about four flavours of UNIX, and in fact they had a load-distributing program at login that meant your initial login was not just to a random machine but to a random UNIX flavour. Somehow the IT folks made this work tolerably well. After a few years of that, when I finally got a home computer, I chose to run Linux on it.


Full post

I for one welcome our new robot overlords

Fantastic Adventures 1941 Jan cover A common theme in science fiction is the idea that robots will take over our world. This doesn't seem very likely, but suppose it were to happen. What would the first steps look like? How would we first begin to notice that it was happening?


Full post

Police violence and crowd control

In the last few weeks, we've seen a number of events where large crowds of unruly people have gathered. Police response to these crowds has varied substantially, and I think it's instructive to think about what these responses say about us, as a society.


Full post

Getting health care

Like many universities, McGill offers a student health clinic. Unfortunately, it's almost impossible to actually access the services, even when the support staff aren't on strike. To actually get help, you have two options:
  • If it's not urgent: there is one day a month, usually but not always the 15th, on which you can make appointments for the following month. Any other time, tough luck.
  • If it's urgent: you can show up at 7 AM, stand outdoors until 8 AM, and hope you were early enough to get one of the very limited number of drop-in slips. This gets you in to see a randomly-assigned doctor, fora few hurried minutes. If it's for a prescription renewal, the chances are slim that they will know anything about you or your condition. Just cross your fingers and hope they're one of the competent ones.
If neither of those options suit you, well, go somewhere else. At least this is free, unless you want dentistry or vaccination or medication.



Full post

Lucky imaging

We have a telescope on the roof of the physics building. It's a fairly nice fourteen-inch Schmidt-Cassegrain telescope, though in fairly rough shape. Unfortunately, the physics building (and necessarily the telescope) is in the middle of downtown Montreal, which is a terrible place to look at the sky: bright lights, clouds, urban heat island, et cetera. So we have a telescope that collects lots of light but doesn't produce very sharp images. My attempt to work around this is described below.


Full post

Breaking out of iTunes

Since I got my "new" hand-me-down smart phone, I've been listening to a lot of podcasts. The phone is smart enough to use only my home wifi to update and download episodes, and the player keeps track of which ones I've read. This is so useful, in contrast to the music player, that I found it works better to keep my audiobooks on my home server and write a quick hack to serve them up as podcast feeds. But mostly I use podcasts like radio programs. Unfortunately, some podcasts are available only through iTunes. This makes sense if they cost money, but, for example, the NASA Lunar Science Institute has a free podcast which is only available through iTunes.

Fortunately it seems that the way these places get the data to iTunes is by serving up a standard RSS feed, which iTunes then wraps up in its proprietary glop. But Michael Sitarzewski helpfully put together a script that can extract the location of the original RSS from iTunes. So, for instance, you can subscribe to the NLSI podcast here. Very nice.


Full post

El Radar

I had the opportunity to visit the great radio telescope at Arecibo ("El Radar") last year. It's an astonishing machine, built more like a stadium than a telescope. Sadly, my digital camera died on that trip, so I don't have much in the way of pictures, but I came across this neat youtube clip (above). It's a segment from a BBC program, talking about dark matter and the role of Arecibo in understanding it. I thought it made a nice view of the telescope. I especially like that in some of the audio you can hear the coquì, little tree frogs that provide a constant chorus. (Of course the telescope is also in Contact and some James Bond film — surprisingly the latter provides a better view of the actual telescope.)

I'll talk a bit about the telescope and my own visit, with a few photos, below the jump.


Full post

The People's Microphone

I went down to Occupy Montreal the other day. It was pretty impressive, really; the modest park, surrounded by banks, was filled with tents and people making art. Particularly amusing was the statue of Queen Victoria wearing a Guy Fawkes mask (pictured on the right). But what got me thinking was the People's Microphone.


Full post

ssh shenanigans

I use ssh all the time, from simple terminal connections to VNC sessions controlling telescopes to rsyncing terabytes of data to serving my music and video library. Most of the time, the machine I actually want to connect to is not visible from the open internet, and in some cases there are two layers of machines to go through to get to the one I want. I have used various ad-hoc combinations of ssh connections, but I just found a brilliant library that solves several of my problems: paramiko.

(Also, the name is from Esperanto, and the releases are named after gashlycrumb tinies. This is some serious nerdery, here.)


Full post

Local Maxima and social annealing

Dan's Data has a new post/magazine article up, about local maxima. Frustratingly, there's no comment section, but I've been reading some interesting things that seem relevant, so I'll post them here. (TL;DR of Dan's post: socially we seem to get stuck in local maxima instead of finding the real best way to do things.)


Full post

Rest in peace, Dennis Ritchie

Dennis Ritchie, who created the C language, has died. It would be difficult to overstate the importance of his work — C is imperfect and limited, but it serves as a near-universal tool for programming everything from tiny ATTiny8s to Blue Gene supercomputers. It does exactly what it was designed to do — provide a portable abstraction that is nevertheless close enough to the underlying machine to be efficient, and comfortable enough to write substantial programs in. These days, I (and many other programmers) prefer to write in Python or another high-level language, but most interpreted languages are still implemented in C, and when performance is critical, C is generally the way to go. Dennis Ritchie's impact on the world of computers was tremendous, and he will be sorely missed.
From: Dennis Ritchie 
Newsgroups: comp.std.c
Subject: Re: Computing sizeof() during compilation
Organization: Bell Labs, Lucent Technologies

> You are right.  It was nice back in the days when things like
> 
> #if (sizeof(int) == 8)
> 
> actually worked (on some compilers).

Must have been before my time.

 Dennis

Full post

Curve fitting part 5: PyMC

I previously talked about fitting a curve to data — specifically, a sinusoid-plus-constant to a distribution of photon arrival times. I wrote some special-purpose Bayesian code to evaluate the relevant integrals directly so that I could work out the posterior distribution of fitted parameters. As a bonus I was also able to test the hypothesis that the photons were pulsed. Unfortunately, the method I used really doesn't generalize to more complicated situations. Fortunately, there is a toolkit that does: PyMC.
PyMC provides tools to implement Markov Chain Monte Carlo algorithms. These evaluate probability integrals numerically by generating samples from the distribution. They do this fairly efficiently by "jumping" semi-randomly from point to point in the space, but jumping preferentially towards points that are more likely. The algorithm is carefully arranged so that, after a certain number of steps, the initial guess is forgotten and the points are correctly distributed. They are correlated, but the correlations can be reduced or eliminated by subsampling the sequence. It's complex, finicky code. Fortunately I don't need to write it, because the algorithm is sufficiently generic that with PyMC all I have to do is specify the model I'm trying to fit. And, sure enough, it works. Code and results below the jump. The short version is: PyMC is easy to use and well-documented.
The second half of my previous post, model selection, turns out to be a little trickier to implement with Markov Chain Monte Carlo; I'll address that in a later post.

Full post

Testing whether a signal is broad-band

Radio pulsars are generally broad-band sources — you can hear them over a very wide range of radio frequencies, from about a hundred megahertz up to, in a few cases, tens of gigahertz. Their emission does change with frequency, decreasing as a power law, but over reasonable bandwidths we expect to see their signal in all frequency channels.


Radio-frequency interference ("RFI"), on the other hand, is very frequently narrow-band, appearing in just one, or a few frequency channels. In fact, one way we try to manage RFI is by using really wide bandwidths, so that there's so much power from the pulsar signal that narrow-band RFI is drowned out. Unfortunately, all too often the RFI is so strong that even a narrow-band signal can dominate the total power. And since it's narrow-band, dedispersion doesn't smear it out like it would a broad-band interference spike. So narrow-band RFI is one of the kinds of interference that is particularly hard to sift out from pulsar candidates.

Just recently, on the arxiv, a paper came out that attempts to address the problem of testing whether a candidate is broad-band:
Multimoment Radio Transient Detection
Laura Spitler, Jim Cordes, Shami Chatterjee, Julia Stone
We present a multimoment technique for signal classification and apply it to the detection of fast radio transients in incoherently dedispersed data. Specifically, we define a spectral modulation index in terms of the fractional variation in intensity across a spectrum. A signal whose intensity is distributed evenly across the entire band has a much lower modulation index than a spectrum with the same intensity localized in a single channel. We are interested in broadband pulses and use the modulation index to excise narrowband radio frequency interference (RFI) by applying a modulation index threshold above which candidate events are removed. The technique is tested both with simulations and using data from sources of known radio pulses (RRAT J1928+15 and giant pulses from the Crab pulsar). We find that our technique is effective at eliminating not only narrowband RFI but also spurious signals from bright, real pulses that are dedispersed at incorrect dispersion measures. The method is generalized to coherent dedispersion, image cubes, and astrophysical narrowband signals that are steady in time. We suggest that the modulation index, along with other statistics using higher-order moments, should be incorporated into signal detection pipelines to characterize and classify signals.
This looks very promising, but there's some testing I wish they'd done. More on the subject below the jump.



Full post