Metropolis-Hastings, and Northern Lapwings

I just chose the title because it rhymed. That being said, MH does play in strongly with the 2D Ising Model, which has been coded up here for if you want to run it yourself. The code allows for arbitrary square lattices, and has various features to allow for production for neat animations as seen here and here. There’s a few optimizations for running in parallel, and it’ll produce various graphs. Anyhow, I just thought it pretty cool! I also learned to use Numba to make the code faster.

It also supports Kawasaki Dynamics, as you can see. “Kawasaki Spin-exchange Dynamics” is what you might see it called elsewhere. “Glauber Dynamics” indicates the standard single-random-flip definition you see tossed around in the literature referencing Metropolis-Hastings for this usage case. In any case, I digress.

As a personal side-project, I modified the code to also run the XY Model- It does work as intended (thankfully) so I’ll call that a win-win. The code has first-order divergence colourmaps for the plots, alongside phase colourmaps, and also quiver plots. I also coded up the Wolff Algorithm (cluster MCMC) for both the Glauber 2D Ising and XY Models. See videos below.

Anyhow, on to the lapwings! I’ve gotten my 150-600 Tamron G2 back, after a long year of waiting for a repair part to be available and dealing with the folk who sold it to me (gray-market- I got my repair paid for by them, don’t worry.)

Vanellus vanellus here in Musselburgh, with a before/after to illustrate the editing process. The “before” is a straight un-edited raw, which in photography terms is an unsaturated undetailed glob: every edited image has some colour and sharpening pumped in after-the-fact, either by the camera, or if you’re using a raw, when you’re editing it (as is here.)

I have to admit, I cheated a bit with editing this one. I used something called Topaz Gigapixel AI. I’m starting to pull this software into my editing pipeline due to how well it helps milk out detail from crops of images. Consider the original uncropped version of this image below…

This is the original image: can you spot what I cropped?

Now, if I were to crop that Lapwing without using Gigapixel AI, the image would not be usable. Gigapixel AI simultaneously removed the noise in the image, sharpened the image, and scaled up the pixels from a paltry 1000^2 to a usable 2000^2 (and it can go much higher, though I wouldn’t recommend more than doubling.) Previously unusable crops are perfectly viable with this tool, and I wholeheartedly welcome that.

Anyhow, on to a few other images! This concludes the post, so if you read it, thanks! If you just came for the code, hopefully it proved useful.

Male Bullfinch Pyrrhula pyrrhula from near the lagoons on the same day.
Troglodytes troglodytes, the Eurasian Wren. You’ll note a lot of editing went into this one: low-light shot with a lot occluding elements? I smoothed them all out with the pen brush tool (don’t zoom in and it looks great, though!)
Long Tailed Tit Aegithalos caudatus. Not all too proud of this one: it was straight above me in the tree, backlit by the sky, and it was windy as hell (40+ mph.) I’m not strong: aiming 3 KG of camera and lens up into the sky trying to aim at 600 mm? Not easy for me at all.