Blog

A blog of Python-related topics and code.

Manufacturing Cobalt-60

Lecture 12 of the MIT course 22.01: Introduction to Nuclear Engineering and Ionizing Radiation covers the manufacture of $\mathrm{^{60}Co}$ by neutron irradiation of $\mathrm{^{59}Co}$ in a research reactor. The thermal neutron absorption cross section of $\mathrm{^{59}Co}$ is $\sigma_0 \approx 20 \; \mathrm{barn}$, so for a neutron flux $\Phi$, the rate of change of the number of $\mathrm{^{59}Co}$ nuclei, $N_0$, may be written $$ \frac{\mathrm{d}N_0}{\mathrm{d}t} = -\sigma_0 \Phi N_0 \quad\Rightarrow N_0(t) = N_0(0)\mathrm{e}^{-\sigma_0\Phi t} $$

Changing the palette of an image

A short script to reduce the palette of an image and replace it with random colours, using the image mona_lisa_400.jpg.

Floyd-Steinberg Dithering

Floyd-Steinberg dithering is a technique for reducing the colour palette of an image (for example, to reduce its file size) whilst keeping as much of the perceived detail as possible. For each pixel in the original image, the nearest colour to that pixel is chosen from a restricted palette and any "error" (difference in pixel colour value, original - new) is distributed across the neighbouring pixels as follows:

Mass Parabolas

An atomic nucleus consists of protons and neutrons (collectively referred to as nucleons) bound together through the strong nuclear force. Models for the nuclear binding energy were introduced in a couple of previous posts on this blog.

The Dottie number

The Dottie number is the (real) root of the equation $\cos x = x$. As the only fixed point of the cosine function, it is the number that is converged to by the iterated function sequence $$ x, \cos(x), \cos(\cos(x)), \cos(\cos(\cos(x))), \ldots, $$ i.e. it is the number returned if you mash the COS button on your calculator enough (apparently the French professor after whom it is named did just this). Its value is about 0.7390851 and it is transcendental.