Contraceptive underwear update

I did a little more looking for information on the use of special underwear as a form of male contraception. In particular I went and found the 1994 Mieusset and Bujan paper. Unfortunately for some reason McGill's subscription does not cover online access to the International Journal of Andrology, so I had to go down into the literally dusty bowels of the library. To give you some idea what I was dealing with, I picked this no-doubt fascinating book off the shelves at random:



Don't worry, the actual paper is rather less ancient, though it was in an obscure enough journal to be in the rolling stacks — gear handles and all. But find it I did, and while they sadly don't have a photo of the contraceptive underwear, they do have a diagram. Since it is conceivably NSFW, I'll put it below the jump.


Full post

ipython notebooks: second impressions

I've kept working with ipython's notebook mode; it really is very well suited to my python-as-a-scratchpad style of figuring certain things out. So I've come up with a few more comments:
  • SVG plots work fine and look better, at least for modestly-sized output (thousands of points on a plot, megapixel images). They're also bigger on the screen, for some reason.
  • Be careful with commands that generate a lot of output; they can make your browser grind to a halt while it tries to render the output of that debugging print statement in that inner loop. During this time you also can't save your document. It might be nice if ipython noticed giant output and collapsed it.
  • It would sometimes be nice to be able to collapse blocks down to a little plus sign. For example, the first block normally needs to be the imports and maybe some ipython boilerplate (setting SVG mode, for example). It'd be nice to be able to hide it while working on the rest of the document.
  • It'd be nice to be able to break up class definitions into multiple blocks (for example to be able to have rendered math explanations for each method).
  • In PNG mode, the images are included using data URIs. This doesn't work on the very old web browser I have at work.
  • If you start pushing the memory limits of your machine it can be very hard to interact with the browser enough to kill the kernel.
For me, the most important of these is embedding the output in a blog post. It already sort of works: SVG is embedded in the output HTML, and PNG is encoded in a data: URI, so it's almost enough to strip out all the contents of the body tag and paste them into an HTML editor. Of course proper display depends on CSS, but I've added all the CSS that seemed relevant into the "custom CSS" field of my blog. The output still has some weird spacing issues; in particular, input blocks are all the same height for some reason.

Edited to add: notebooks have improved a lot since this review. I'm going to write another soon.

Full post

Digital in the Facebook age

Some time ago I posted about a lovely retrocomputing-style ren'ai game called "Digital: a Love Story". The same author has pubished a sequel, titled "don't take it personally, babe, it just ain't your story". It too is lovely, and has something interesting to say about privacy. If you haven't played ren'ai, be aware that it does have some genre conventions that take some getting used to, but it is a medium in which clever writing can produce a fascinating immersive story. In this case with dollops of facebook and 4chan.


Full post

Faster-than-light neutrinos: keeping time

There's been a recent announcement of evidence that muon neutrinos may travel faster than light. That would be really weird - in particular it would pose serious problems for Einstein's theories of relativity. But even the discoverers aren't ready to claim that; they just describe their results and say they're puzzling. Personally I think it's unlikely they're right, but figuring out why not may be very interesting.


Faster than Light? par CNRS

Fortunately for us, they have posted a preprint of their paper on arxiv.org. All images below are from that paper.

I can't say much about the particle physics, or the details of instrument calibration, but I can address one possible way people have suggested the result may be wrong: inaccuracies in the time standards at the two endpoints.


Full post

A captcha problem

Hmm. Think it would cope with \( M_2(\mathbb{Z})\tilde m \)? Or $M_2(\mathbb{Z})\tilde m$? Or just plain M_2(\mathbb{Z})\tilde m? In principle it might, since recaptcha is crowd-sourced; if I came up with the same LaTeX representation all previous recaptcha users had, all would be fine...

Full post

Male contraception

The Pill — hormonal contraception for women — is sometimes credited with making possible the sexual revolution. There is as yet no hormonal contraception for men. My feeling is that this is for real biological reasons — the female reproductive system is more complicated and easier to interfere with. And of course in the era of HIV/AIDS and other STIs, condoms have a unique role. Other methods of contraception remain important. There's a new supposedly-reversible one for men and there's always vasectomy. But there's another method for men that I'd never heard of, but find amusing: testicular heating.
[update — pictures! sort of]


Full post

Source Code

No, I mean the movie. It's science fiction, of the Twilight Zone flavour: soft, set here and now, and with a little pointed topical relevance. Jake Gyllenhaal plays a soldier who gets sent into the "Source Code", eight minutes before a terrorist attack, and told that he must do whatever he can to figure out who the bomber is. He can retry it as many times as he likes. It's very like the brilliant interactive fiction Varicella (described below the jump).


Full post

The Core

I've worked with data from X-ray satellites before, and among the many messy things one has to deal with in real data were blocks of time marked SAA. I knew this stood for "South Atlantic Anomaly", but I had only the vague idea that it was a part of the sky that was geomagnetically inconvenient, so that I had to trim it out of my data. The other day I came across a fascinating BBC documentary, titled "The Core":

This documentary talks about the Earth's core and how we're studying it, from seismology to diamond anvils to huge liquid-sodium dynamo experiments. It makes very interesting watching, but I particularly liked that they used the South Atlantic Anomaly as a hook: it caused problems with certain instruments on Hubble, and the documentary is framed as an investigation into why. (More below the jump if you're not worried about spoilers.)


Full post

Mathjax

When looking at the ipython notebook interface, I came across a neat tool: mathjax. It's designed to allow embedding math in web documents. Now, MathML was supposed to do this, but support for MathML is still very spotty, and it's also really nasty trying to write MathML manually. So mathjax allows you to simply enter TeX format math and have it look okay in supposedly all browsers: both inline as \(e^{i\pi}=-1\) and displayed as $$\int_{-\infty}^{\infty}f(t)e^{2\pi i f t}dt. $$

The way that it does this is kind of amazing to me: it's essentially a TeX renderer written in javascript and running in your browser. I'm used to thinking of TeX as a batch-mode compiler that takes an appreciable time to run, but TeX has become the de facto standard way to write mathematics, and there are now several reimplementations of its renderer. Matplotlib has one, for example, though it can also call out to real TeX if you ask it to. But javascript!

Anyway, as you can see above, I've added it to the template for this blog, so I'll be a little freer with math from now on. Though I'm willing to bet it doesn't work in the RSS feed. Let me know if you have any problems with it.

Full post

Review: ipython notebooks

The development version of ipython recently added a "notebook" interface mode. This resembles the interface of MAPLE or Mathematica, in which you can intermingle blocks of formatted text, blocks of code and output, and plots. My feeling, after working with it for a bit, is that it is very well suited to the kind of work I do when (for example) writing blog posts demonstrating some algorithm. For developing actual reusable software, not so much.

In order to give it a proper test, I applied it to a problem that a friend asked me about. It's about the card game Set: how often do you run into a tableau with no sets? The game quotes a figure of one time in 25, but that's for tableaux dealt from scratch. As you play the game, you remove and replace sets, and it often seems as if no-set tableaux arise more often when the cards are not freshly-dealt. The game's rules are a lovely minimalist mathematical exercise, but once you start removing and replacing cards an analytical solution becomes impractical. Simulation to the rescue! And this seemed like a nice test problem for ipython.

You can see the results here (PDF). For my comments on ipython, read on.

Edited to add: notebooks have improved a lot since this review, or the later one.

Full post

Least squares and timing noise, part 2

Simulated time series
In my previous post I described a new paper about fitting pulsar parameters in the presence of timing noise using a general least-squares method. It seems like a good approach, but I'd like to look at it in more detail. So: python to the rescue!


Full post

The Mechanical Microbiologist

Laboratory automation has been growing more and more elaborate - multiwell tools for "parallel processing", and benchtop robot arms, for example, that will handle repetitive tasks. But flow cytometry offers some startling possibilities.


Full post

Least-squares and timing noise

Figure 4 from the paper: residuals and spectrum
Working with long-term pulsar timing data sets is a nuisance because of so-called "timing noise". Not only is this noise above and beyond the usual observational uncertainties, perhaps because it is torque noise, it tends to be strongest at low frequencies (it is very "red"). Often so much so that leakage from the very lowest frequencies dominates at all analysis frequencies. Various people, myself included, have tried various approaches for dealing with this noise, but a recent arxiv paper shows real promise:

Pulsar timing analysis in the presence of correlated noise
Pulsar timing observations are usually analysed with least-square-fitting procedures under the assumption that the timing residuals are uncorrelated (statistically "white"). Pulsar observers are well aware that this assumption often breaks down and causes severe errors in estimating the parameters of the timing model and their uncertainties. Ad hoc methods for minimizing these errors have been developed, but we show that they are far from optimal. Compensation for temporal correlation can be done optimally if the covariance matrix of the residuals is known using a linear transformation that whitens both the residuals and the timing model. We adopt a transformation based on the Cholesky decomposition of the covariance matrix, but the transformation is not unique. We show how to estimate the covariance matrix with sufficient accuracy to optimize the pulsar timing analysis. We also show how to apply this procedure to estimate the spectrum of any time series with a steep red power-law spectrum, including those with irregular sampling and variable error bars, which are otherwise very difficult to analyse.
I'd like to look at it in more detail and try some of the techniques on test data.


Full post

Radio vortices



Quantum mechanics, no one will be surprised to hear, is weird. In particular, photons can carry angular momentum - circularly polarized light can set objects spinning. But it turns out that light can carry orbital angular momentum as well. It's really not very clear to me quite what this means in terms of photons. In terms of classical waves, it's weird but I think I get it: if you look at the spatial distribution of the light in a beam, you may find that the phase is constant across the whole beam. But you might also find that the phase varies. Now, it has to be continuous, but you can imagine that as you make a circle around the beam center, you find the phase increases by an integer multiple of two pi. This gives you a continuous phase in a way that is topologically different from the constant-phase situation. As I understand it, this is what is called wrapping number.

Now this would just be another weirdness from the world of (classical!) waves except that there seem to be applications for it. In particular there's a paper on the arxiv about using this for communications purposes.


Full post

Science fiction has no imagination, part 1

Every so often I come across something that makes me think that the supposedly imaginative field of science fiction can't hold a candle to reality for weirdness. Today's installment is an arxiv paper in which the authors are seriously discussing quantum teleportation as a way to combine signals from telescopes to form an interferometer:


Longer-Baseline Telescopes Using Quantum Repeaters

Daniel Gottesman, Thomas Jennewein, Sarah Croke

We present an approach to building interferometric telescopes using ideas of quantum information. Current optical interferometers have limited baseline lengths, and thus limited resolution, because of noise and loss of signal due to the transmission of photons between the telescopes. The technology of quantum repeaters has the potential to eliminate this limit, allowing in principle interferometers with arbitrarily long baselines.

Full post

A little SF vignette



Canada has these laws that require a certain fraction of the music that is broadcast to be Canadian. This caused a certain amount of screaming from radio stations, but I have this feeling that it actually works, that Canada as a result produces disproportionally more music, and more original music. I don't know about that (how would you quantify it?), but this band — You Say Party — is Canadian.

Full post

arXiv gleanings

I try to keep an eye on arxiv.org because interesting new pulsar papers generally appear there first. But there are often abstracts that catch my eye, whether because they have neat ideas, because they talk about neat object, or because they just seem peculiar. This week's batch had a few of each.

Full post

How tempo2 does its fitting

Pulsars can be difficult objects to study: for example, their radio pulses can randomly change in brightness, turn off, turn on, change shape, and we really don't know why. Nevertheless there has been some excellent science done by studying those very radio pulses. The trick has mostly been to simply not care how bright they are or what shape they have and focus on when they arrive. Since this comes from the rotation of the pulsar, this tends to be very regular. After all, for a ball 10 km across, with more mass than the sun, smoothed to within a millimeter by its own gravity, it takes an awful lot to change how fast it's spinning. What's more, time is the quantity we can make the best measurements of - world time standards drift by something like microseconds over decades, which is something like one part in ten to the fourteen. So pulsar timing is a powerful technique, that can measure pulsar positions and distances, spin-down rates and braking indices, and binary orbits. The standard software has been tempo, which is written in FORTRAN and has certain limitations. A new tool has recently appeared, tempo2, written in C++ and boasting good handling of timing effects down to the nanosecond level. Unfortunately the documentation on this tool is so far somewhat limited, so I've been figuring out how it works. I'd like to describe it, as best I understand it, here. This particular post will talk about how a timing solution is fit to a set of pulse arrival times.


Full post

Millisecond pulsar X-rays

Neutron stars are so tiny and so dense that the natural temperature scale for them has them glowing in the X-rays. What's more, they serve as powerful accelerators of electrons, which then naturally produce X-rays. So it turns out that X-ray telescopes provide a very interesting view of pulsars. In light of this, when we discovered my pet source, J1023, we took an X-ray observation of it. It's taken us considerable time to analyze the results and put together a paper describing them, but I think the result will be a valuable contribution to the literature. (More importantly for me, it should make a chapter of my PhD thesis.) The result is the cumbersomely-named "X-ray Variability and Evidence for Pulsations from the Unique Radio Pulsar/X-ray Binary Transition Object FIRST J102347.6+003841".

Much of the paper is devoted to details of data analysis, which I will spare you. But I think the gist is interesting, and not too hard to summarize. 

Full post

Ignition!

Recently, via Derek Lowe's In The Pipeline, I came across the book Ignition!, by John D. Clark. It's the story of the development of liquid rocket fuels, told by a man who was head of one of the programs. Even if you don't know much chemistry — I don't — the book makes a fascinating read. The image on the left is the first page you see when you open the book, and the image below is the second.



Full post