Folding Latex files in geany

It’s been a long hiatus, but since I’ve spent most of the morning working on this one, I thought I’d share.

To the horror of all of my colleague, I write latex documents (and even slides for presentations) by hand* , using geany. It annoys the heck out of me that geany doesn’t support folding in latex documents.

But inspired by the use of manual break-points somewhere else, I hacked together something that should do the same for latex.So, just add this function to LexOthers.cxx, add it and rebuild from source (I used geany Then adding %%{ and %%} sequences will define folding blocks in your document.

Caveat emptor, use at your own risk, your mileage may vary, keep out of direct sunlight

*not like this :Image

Flaming lasers

ResearchBlogging.orgHere’s a really cool paper from two groups in South Africa. It involves shooting a laser through fire! How awesome can you get. And the tests that they came up with to demonstrate that it was working are also really cool and a bit funny. Read on!

The principle of the experiment is that a a flame can focus light passing through it — this is long known, and is because of the varying density of gas through the flame causes the laser to refract, just like the different thickness of glass in a regular lens causes the light to focus.
A great thing about using gases and flames as lenses is that they can’t be damaged by intense lasers in the same way that glass or other materials might be.
However, up to now, most flame lenses couldn’t produce a nice, sharply focused dot.

The idea implemented by the groups at the University of KwaZulu–Natal and the National Laser Centre in South Africa, was to combine two lens elements – a cylindrical lens that acts mostly on the outermost portion of the laser light, and a spiral lens (in which the flame from an oxy-acetelyene torch is forced around in a spiral — how cool is that?) to focus the inner rays.

The images of the flame lens elements reproduced from the Nature Comms paper

If the flames themselves weren’t awesome enough, the diagnostics are even better. The first compares shooting a laser onto a piece of plastic with the lens on and off. In the authors’ words:

“With the flame turned off, the laser beam makes a barely perceptible sound as each unfocused pulse illuminates the plastic. The moment the flame is ignited loud ‘cracks’ are audible and a bright plasma plume appears.”


Another diagnostic is where they make a map of Africa with LEDs — this starts out blurry, but once the flames are ignited, a much shaper image is produced.

A map of Africa made using LEDS — the map on the right is produced when the focusing flame lens is turned on.

What a great and entertaining paper! Must have been lots of fun to work in this lab!

Max M. Michaelis, Cosmas Mafusire, Jan-Hendrik Grobler, Andrew Forbes (2013). Focusing light with a flame lens Nature Communications DOI: 10.1038/ncomms2894

Cool physics experiment — just like watching paint dry

Some of the most patient physicists ever have seen what no-one before has ever seen — A drop of pitch — a very sticky, viscous substance that flows very slowly — falling. Back in the 1940s, pitch was but in a glass funnel, melted, let to set, and then put in a cupboard in the Physics Department in Trinity College, Dublin. The pitch forms a drop about once every ten years, and on July 11, a webcam set up to watch the experiment 24/7 caught a drop falling. See the excitement here: 

There’s another experiment in Queensland, Australia, has been running for even longer, but a glitch in their webcam meant that they missed the last drop falling. Dang!

How not to do science — the E-Cat
A recent paper from the Arxiv made its way into my browser this week —

It’s a description of some ‘tests’ that the authors did on the ‘E-Cat’ (for Energy Catalyser) device, something Italian inventor Andrea Rossi has cooked up that is claimed to produce energy ”one order of magnitude greater than conventional energy sources”. The conclusion that we’re expected to jump to is that E-Cat is producing energy through nuclear fusion.

If this were true, it would be spectacular — fusion at low energies (‘cold fusion’) would be an incredible benefit to mankind, producing copious energy with nothing (or very little) in the way of harmful by-products — no smoke, no CO2, no radioactivity. And it works from a 33 cm x 10 cm cylinder plugged into the wall. So why aren’t there one of these in all of our homes?

Probably, because it doesn’t work. If you read the arxiv paper, you’ll see that the tests done were essentially limited to looking at the device through an infrared camera — that allows you to measure the temperature of the surface. Then, if you calculate how much power the device is radiating (and convecting) to the environment — the outer surface becomes hotter than 500 deg C, so the authors calculate around 2000W, and subtract how much power it’s drawing from the mains, you get how much power it’s generating.But wait, you say. If it’s generating power, why does it need to be connected to the mains? Good question, I say. The inventors say that the device needs to be heated, by a series of resistive coils inside the device for it to function. The authors used a current clamp to measure the power delivered from the mains, through a control box, to the device — they got 360W. So the device is generating over 1600 W of energy.

That’s a lot more than you cold get from burning things — even ultra-high energy density liquid hydrogen (used in the Space Shuttle), especially given that the test lasted several days.

. The inventors claim that they have nickel, hydrogen and some ‘special additives’ in side the E-Cat. In principle, nickel and hydrogen could fuse to form copper (one element higher on the periodic table). So testing the spent fuel for copper would be a nice tests of fusion. The inventors didn’t allow the team to do this because it may spoil the ‘trade secret’ of the special additive — or more likely, expose that this is not what is really going on.

Fusion would also be accompanied by some high energy radiation — X-Ray and gamma photons, and probably some neutrons. The authors placed some radiation detectors around the E-Cat during their test, but failed to see any thing. This is touted as the device passing a safety test, but really, it’s just it failing a credibility test.

So what’s really going on. If you ask me, the E-Cat is probably just a regular heater, converting electricity from the wall socket to heat. That the testers weren’t allowed to look inside the control box, or un-plug the box from the wall is really telling. The current clamps were probably by-passed in some way — see, for example, the scheme on, or perhaps with an added DC component (clamp ammeters are only sensitive to the AC commponent that usually comes from the mains supply). There is some handwaving analysis about the characteristic heating and cooling curves measured, but I don’t believe it, since all you have to do is to modulate your current in an appropriate way.

The tests in the arxiv paper are an example of science at it’s worst. It’s covered in the trappings of science, but is really a sham. Every part of the test was controlled by the inventors of the E-Cat, and the testers weren’t allowed any freedom to devise their own tests. So while, as a good scientist, I’m always open to my mind being changed, for the two options — that Rossi and co have made a really astonishing breakthrough that defies our understanding of physics, or that they have concocted a scam for some reason best known to themselves, I’m going to go with the more reasonable one. Extraordinary claims require extraordinary proof.

By the way, if the inventors ever read this (and I doubt it, I only get visitors to my downloading Windows from Ubuntu post ;) ), I’m open to being proved wrong — let me do some tests of my own choosing on an E-Cat and I will gladly eat my hat.

Giuseppe Levi, Evelyn Foschi, Torbjörn Hartman, Bo Höistad, Roland Pettersson, Lars Tegnér, & Hanno Essén (2013). Indication of anomalous heat energy production in a reactor device Arxiv arXiv: 1305.3913v2

Highlights of March

Uff, that month was a tough one. I wrote my first grant, killed my first mouse, got my third cold of the season, said goodbye to the love of my life for two months, and been so busy that I haven’t been able to keep up with the posts.

In an attempt to get back to regular blogging, I’m going to start a monthly ‘highlights’. It’ll be heavily biased towards my own interests, so no calling foul on things I don’t include.

There were results from the Planck experiment, that measures the cosmic microwave background, which is essentially photons from the early universe that have done nothing since then but travel towards your detector. They get an amazing map of the CMBR [papers] [synopsis].

IceCube, which is a detector made out of ice in Antarctica, also published new data, further reducing the limits for the cross-section of dark-matter candidates WIMPs (Weakly Interacting Massive Particles, because sometimes physicists like naming things). [paper] [synopsis] [preprint]

ATRAP, an antiproton experiment measured the magnetic moment of the antiproton to three orders of magnitude more precision. It’s still consistent with the proton, which is reassuring for the Charge-Parity-Time theorem. [paper] [synopsis]

Nature had interesting sections on both the future of research publishing, and women in science.
For publishing, I’m a big advocate of open-access publishing. I want my research to be available to anyone that can understand it. I’ll write a blog expounding more on this in the future.
I like to think of myself as blind to gender, race, background whatever in my colleagues. But I’m smart enough to know that my subconscious probably isn’t. Particularly hard-hitting for me (being another white boy) was this recent post by MarkCC on Scientopia, where you can have the best of intentions, but still do it wrong. We all have to take care to make sure we’re giving everyone an equal chance.

A weird one is the removal of the paper describing the oldest human fossil from the Journal of Human Evolution, without much in the way of explanation. There are some rumblings that it’s a dispute over something that didn’t get cited, but I’m surprised that that gets a removal. Retraction Watch is following the story.

Timeline of a discovery

The ATLAS and CMS experiments at the LHC have produced an animated GIF showing how their signal for the Higgs boson built up as they gathered data.

There are a couple of different ones, for different decay modes — basically, the signal that they use to identify the Higgs

Find them here:
ATLAS: Higgs -> Two photons:
ATLAS: Higgs -> Four Leptons
ATLAS: Higgs -> Two WW:

CMS: Higgs -> Four Leptons

They’re nice to look at no? I’ll explain what they’re showing in a later post

Discovered at Tommaso Dorigo’s blog