A picture of me.

Tom Hodson

Maker, Baker Programmer Reformed Physicist RSE@ECMWF


Blog

Date Posted

An image of the text ‘Py<T>' with the T in orange.
</T>

Bind, Borrow, Deref

Safely sharing objects between Python and Rust using PyO3

A photo of the main circuit board in this 3D printer. The board is red and there are a lot of wires everywhere some of which have clearly been added after market.

RARA Elegoo Printer Notes

Notes for the 3D printer at my co-working space.

A photograph of a square of dark wood about 4cm by 4cm, in the center is a roughly 3cm diameter circle of orange acrylic behind which there is an lcd screen displaying some faked numbers “5.2v, 20w, 2.1A” in a vaguely sci-fi type font (it’s called Gunship and was also used in the movie Walle). To the left there is a circular half filled bar intended to complete the sci-fi UI look.

USB-C PSU Monitor Board Bringup

Finally testing boards I got back manufactured last year.

A map centered on London with a colourful overlay showing weather data.

ECMWF WMS Maps

A fun little web map data source.

A screenshot of a tree diagram created using unicode bar characters. It starts at ‘root’ and then fans out to ‘class=od’ and ‘class=rd’ which themselves fan out to ‘expver=0001’ and ‘expver=0002’ and finally ‘param=1’ and ‘param=2’.

Executable code snippets in docs and HTML object representations

It just looks so nice.

A volumetric render of a CT scan of my jaw. It looks like a kind of translucent human skull except the teeth are dark black because they’re denser to x-rays, the bone is more greyish.

Volume Rendering

A had this old CT scan lying around from when I had my wisdom teeth removed so I thought I’d try rendering it.

An image of my face, half is a normal colour photograph and half is a depth map in black and white.

Unexpected Depths

Did you know iPhone portrait mode HEIC files have a depth map in them?

An image of Mixtela’s latest project, a pendant with a fluid simulation running on a LED matrix.

Replacing an image colour with transparency

What happens if you convert an RGB image to RGBA by pretending it was sitting on a white background?

A sketch of a vector V with arrows coming off both the top and bottom labelled u(x) and u(x+v) that is used in the post to show how a vector gets transported in a fluid.

A tricky index proof

An ‘exercise for the reader’ has been bugging me all week.

A screenshot of some python code showing the line “rgb_array = np.array(…” and then multiple that say “rgb_array = …”. To be honest this is kinda lazy but I wanted to have some kind of image for each blog post. You, oh reader of the alt text, are getting more out of me than someone who just looked at the picture.

Manipulate image pixels in Python

I had a black and white image but I wanted a black image with the white bits transparent.

An image of an index the expression for $\epsilon_{ijk}\partial_j u_k$ which in words would be the curl of u

Einstein summation is really nice.

Good mathematical notation is like a really good font.

The numbers 2024 but rearranged to make a kind of smiley face. The two 2s make two eyes, the 4 makes a nose and the 0 becomes an open mouth.

2024 Roundup

Wherein I look back at what I got up to in 2024, mostly for my own benefit.

A 240x240 pixel (so low res) image of a slightly sci-fiesque looking circular display showing so linear and curved bars, 24.4 volts, in bigger font 213w and 8.7A.

MicroPython Simulator

A simulator for my USB C Power supply project using Micropython running in websassembly.

A screenshot of some PCB traces from the PCB design program KiCAD. The traces are in red with white labels like “GND” and “5v”. Some of the traces are for power and are very wide while others are just for signals and are very narrow.

Kicad Notes

A collection of Kicad related links and notes.

A crudely edited version of XKCD 353, the one about python (the programming language), but in this thumbnail you can only see the character saying ‘you can fly, how?’.

MicroPython

Embedded Programming is fun again!

The emf2024 logo which has a circle with a wavy line (AC current?) on the middle. An angular computery tree grows out the top and an organic natural looking tree grows out the bottom.

Sensor.Community Workshop at EMFcamp

Instructions for a workshop I’m running/ran at Electromagnetic Field 2024

A render of a 3D spherical earth.

ThreeJS Earth

A small earth renderer made using ThreeJS

A render of a small bookshelf made of flat panels with some CAD books on it.

Weekend builds: Bookshelf

We needed something to lift our books a little off the surface of the windowsill…

The site favicon, built from a series of overlapping circles forming a diamond shape.

Notes on building this site

Mostly a note to self so that I can check this when I forget late how it works.

A black and white image of a web map.

Interactive web maps from a static file

PMTiles is a cool new technology to serve interactive vector maps from a static file.

A scatter graph of run time vs run distance for all my runs on strava. There are lots of points between 5-15km, a couple around 21km and one single point way out at 42km.

My First Full Marathon!

I ran the Amsterdam marathon! My first official race and the longest distance I’ve run in one go!

A photograph at an angle of a laser etched map on some plywood. The Thames is quite visible as a thick black line in the bottom right.

Maps Maps Maps: Part 2

In which I make my first laser etched map!

An image of a hexagonal stool made out of 6mm thick laser cut plywood.

Weekend builds: Lasercut stool

This little plant pot stand was a nice weekend project.

Small 10cm x 10cm test lasercut maps, one is a bit too light.

Maps Maps Maps: Part 1

I want to make some really big laser etched maps.

A scatter graph of run time vs run distance for all my runs on strava. It shows that I mainly run between 5 and 6 min per kilometer, regardless of distance

My First Half Marathon!

I ran my first half marathon! Let’s look at the data.

A lazy screenshot of the miniflux homepage with the title and ‘Unread(52)’

Selfhosting: Miniflux and RSSHub

Notes to self on selfhosting an RSS reader.

A render of a 3D printed shelf sitting above a shaver outlet, it spins slowly.

Toothbrush Shelf

It can be hard to find genuine everyday uses of 3D printing, but after a while you do find some.

A screenshot of a small javascript widget that lets you evaluate python code. It’s showing some numpy code and its evaluated output.

A little REPL in every blog post

A JS library to run python snippets in the browser.

A screenshot of some python code showing a PEG grammar definition.

Parsing is fun!

I came across something I wanted to quickly parse that was too niche to find a ready made parser for. Join me on a quick whip tour of writing a grammar for a PEG parser.

An image of a nice animated progress bar in a jupyter notebook output cell.

Progress bars and log output in Jupyter notebooks

How to get an updatable message printing a tqdm progress bar.

A 3D render of a simple PCB.

My first PCB!

I’ve always wanted to get a PCB manufactured but only recently found a something that I actually needed and was simple enough for a first attempt.

The orange, abstract, Jupyter logo and the Mamba logo which is a cute black snake.

Jupyter and Conda setup

These are my notes to myself about how to setup jupyter+conda/mamba environments.

A 3D render of some shelves fitting into a triangular space under a ladder.

Fantasy Ikea Shelves

We needed some shelves to fit an odd space under a ladder…

A spinning image of the earth but distorted as if it were a black hole.

Rendering General Relativity

Let’s do some raytracing through curved spacetime!

A rendered image of a breadboard with an LED and resistor wired up in series to an arduino.

Using emscripten to simulate an arduino project

A nifty little web simulation technique to test out embedded code before putting it on real hardware.

A simple vector image of a classic casio watch.

Sensor Watch

I finally got my Sensor Watch! It’s a replacement logic board for those classic Casio watches you see everywhere.

A diagram showing showing circles with arrows in them linked by lines that represents a simple physical model of electron spins interacting.

How to Animate Inkscape SVGs with d3

In which a simple thing turns out to be surprisingly in-depth!

A screenshot of a slide deck with computer code on it.

Command Line Slides

I made a set of interactive slides for a course on the command line, complete with command line playback!

A screenshot of a web app that visualises dependencies between courses by linking them with lines.

Learning Paths

A small tool to visualise dependencies of courses.

My Jupyter and Conda Mamba setup

I really like working in Jupyterlab but getting it to work nicely is always a bit challenging, these are my notes for roughly how I have it set up.

Building Overleaf projects locally

I wanted to work on an overleaf project while on the train without reliable internet.

An image of a TS100 soldering iron showing a custom bootscreen that says ‘solder boy’.

Making a custom bootscreen for your TS100 Soldering Iron

It’s a right of passage to add a custom bootscreen to your TS100 soldering iron but it took me a while to figure out how to generate a 1bit per pixel bitmap image.