Posts

An IBM Spectrum Protect / HFS Backup / TSM client size limiting script

In my university we have hte ability to use IBM Spectrum Protect aka HFS Backup aka Tivoli Storage Manager for backing up large amounts of experimental data. Unfortunately, due to local rules this fails if the amount of data to be sent is more than 200 GiB and we have to email the central team and ask them to let us back it up again. The below script (just about) automatically stops the process if it’s going to bust a pre-determined size limit.

NMR Variable Temperature Control, the Bruker BVT3000, and Eurotherm 902/904 series temperature control

A common problem in spectroscopy experiments is variable temperature control. One of the giant companies in the field, Bruker, has made a device that blows hot or cold air at samples to regulate their temperature. The device that blows air and runs the show has gone through several iterations over the years, but one variant is called the Bruker BVT3000 variable temperature controller. It has a little microcontroller, and talks to a commercially available (at the time) PID controller called the Eurotherm 902 series.

A simple keep-alive script for OpenVPN

su echo 1 > /proc/sys/net/ipv4/ip_forward #Enable NAT iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE #Set up DNAT iptables -A FORWARD -i eth1 -o tap0 -m state –state RELATED,ESTABLISHED,NEW -j ACCEPT #Enable connections from the private subnet S1 out iptables -A FORWARD -i tap0 -o eth1 -j ACCEPT #Enable connections from the tunnel to the the private subnet, i.e. from S2 to S1 #Bring up the tunnel: ifconfig tap0 up #Configure the tunnel as you like: ifconfig tap0 192.

Vector-Based Table of the Nuclides

The NZ Plot The N-Z plot, also known as the Plot of the Nuclides, is a standard plot in which one shows $N$, the number of nucleons in an isotope, against $Z$, its proton number. For low $A=N+Z$, this is approximately a straight line along which stable nuclei exist. As an medical physicist, I perpetually find myself wishing to refer to the NZ plot occasionally, in order to find out if a given nuclide is either (a) NMR visible (that is, $I\neq0$), (b) radioactive with a decent activitiy, or occasionally both.

How to effectively use SSH as a port-forwarding tunnel

The problem: You have an expensive piece of bespoke hardware box, $A$, on a private subnet $S_1$. Your computer of interest, $C$, is sat on a different subnet, $S_2$. There is a linux router between the two, $B$, running sshd. You wish $C$ (or a virtual machine thereon) to talk to $A$, but don’t want the rest of $S_1$ to be accessible to all of $S_2$ or vice-versa. In short, you want something on $C$ to use a specific (virtual) network interface to go $C\rightarrow B\rightarrow A$.

do_Overlay -- a simple matlab script for image overlay

Matlab, for all of its (many, various, myriad) evils is unfortunately the language of choice in MR. Overlaying two black and white images in colour is often a bit of a PITA. This script aims to ameliorate the pain just a little. I should point out that you still have to do the boring linear algebra of making sure that the orientations of the things you want to overlay are correct, however.

Magon. Res. Med. Unofficial LaTeX Template

Journals quite often have somewhat asinine typography requirements. In my field, I quite often want to use $\LaTeX$ when unfortunately it is not always terribly welcome. Magnetic Resonance in Medicine (MRM) is a journal that I have published in quite a lot that accepts $\LaTeX$ submissions, has a stringent set of slightly odd typographical requirements for submission, but does not provide either a class or example article. As a brief sketch, here’s my template that I’ve used to submit several papers successfully to the journal.