Category Archives: Uncategorized

Anti-Proton Decelerator quick tour


IMG_5399I recently wrote a project page about re-purposing a flip-dot bus display for the Anti-proton Decelerator control-room. It maybe interesting to show you with pictures how this synchrotron looks like.

The Anti-proton Decelerator (AD) is a 182 meter long synchrotron. Its aim is to lower the energy of anti-protons. In contrary of the majority of the existing synchrotrons, the AD is used as a decelerator, producing low energy anti-proton and send them to different experiments. For the details, have a look on the official web page.

The AD stands inside a concrete tunnel build inside a large hall:


Before accessing the synchrotron ring, we can make a quick stop by the AD control-room (ACR):


The hall with the concrete shielding is conveniently visible from the ACR:


Down in the hall, we can find the access system for the machine tunnel:


This special door will control your personal dosimeter and your identity with an iris scanner:


Once in the ring tunnel, you’ll meet the AD itself. Here we are facing two of the main dipole magnets (in blue):


And right after we can see the vacuum pipe going through quadrupole magnets (focusing elements, in red):


On the next picture you will see on the right where the anti-protons come from. Behind the wall is the target and horn area. On the left starts the injection region where we can see the vacuum pipe literally going through the blue dipole yoke:


In the next strait section we will meet the electron cooler, one of the rare device able to reduce the size of a charged particles beam:


Right after, these two big silver colored blocks are radio-frequency (RF) cavities. In general RF cavities are used in synchrotron to change (increase or decrease) the particle beam energy. These two ones are used in the AD to change the shape of the beam:


Continuing along the ring you’ll meet a lot of magnets to steer and focus the beam:


The stochastic cooling system is another remarquable element of the AD, it is a beam size reduction system:


Without entering into the details it consists of beam sensors and fast kicker elements (electro-static). The sensors signal is amplified and transmitted to the kicker elements that are installed at the opposite side of the ring. The transmission is faster than the particles take to make half a turn of the synchrotron.

If we exit the ring tunnel, we can pass by the stochastic cooling amplifiers:


And the powering system for the injection element, able to deliver a controlled pulse of hundreds of kilo-volts. Most noticeably are the cable coils (Pulse Forming Network):


I hope you enjoy this little tour, and thank you for reading.




Image dithering


I had to convert images to black or white points. This post is a summary of my tests and learning. My main source is the nice ‘Dither’ Wikipedia page. The major issue I had to face is when converting an image with an undefined length coming from a scanning process.



To print pictures on thermal paper with reasonably good rendering, they should be converted according the printer limitations. It’s quite simple, it can be printed only black pixels (and whites as the paper is usually white).

The first step consists to get a gray-scale image. There is plenty well known method, from the simplest averaging of the Red/Green/Blue channels to advanced ones where the pixel intensity is scaled to a color wavelength to simulate a particular response (such as black & white films).

michelangelo27s_david_-_bayermichelangelo27s_david_-_floyd-steinbergThe second step could be achieved by several algorithms. To convert gray-scale pixels to only black or white, a rather easy method is the Ordered Dithering. But it there is noticeable patterns on the resulting image. Another common method is the error diffusion, and in particular the Floyd-Steinberg dithering algorithm. It is this last one that I choose to study as I found the resulting image interesting.


The codes we can find over Internet usually rely on a buffer to store and propagate the errors of each converted pixel. This buffer have the same size of the image and is completed during the iteration over all the image lines.

As receipt thermal printer use paper roll, there is virtually no image length limit. If we want to convert on the fly the image and strait print it, we cannot rely on a fixe full image sized buffer. That’s why I experimenting conversion algorithm based on Floyd-Steinberg, but with only a small rotating buffer. The size of this ‘line’ buffer could be as small as a line size plus one.

Other than the code itself, I try to explain the principle with this Gif :


And the Java code use to generate it :

Very good readings about dithering :