Codethink partnered with York Instruments on a project to develop a new Magnetoencephalogram (MEG) scanner to replace their existing apparatus. This is a neuroimaging device which maps brain activity by recording magnetic fields which are produced by naturally occurring electrical currents in the brain.
The problem at the time was that the capture-and-compute brain of the original scanner was difficult to repair or replace if there was a failure. This was due to the unavailability of the original equipment manufacturer (OEM), resulting in a lack of available parts.
Within the main apparatus of an MEG, superconducting quantum interference devices (SQUIDs), are used to measure very subtle changes in magnetic fields influenced by brain activity. These SQUIDs require super-cooling, commonly with liquid helium, which means that the apparatus to store them needs to be substantial. Liquid helium is also very dangerous to humans so a high level of due diligence is required for the safety of anyone interacting with the scanner. In their new MEG system, York Instruments replaced the SQUIDs used with Hybrid Quantum Interference Devices (HyQUIDs), which are able to operate at higher temperatures than SQUIDs and can operate more accurately. This has positive implications for the safety and cost of the MEG, as less coolant is required.
In this project, Codethink worked on both hardware and software, in a range of different areas including upgrading the Linux kernel used, assisting with updating U-boot, working on the in FPGA and CPLD firmware, working on the core data transfer protocols, the sample data multiplexer, and real-time-displays as well as further software assistance and consulting.
Codethink engineers worked on the full low-level command and control system for synchronising and monitoring a distributed network of data capturing systems. Throughout our time working with York Instruments, Codethink engineers ensured a high standard of code and documentation was maintained.
The development of York Instrument’s main data acquisition pipeline and a variety of GUIs was done in tandem with the hardware design in order to closely integrate the two. One of the most challenging aspects of the work involved developing a system that ensures hundreds of sensors, that were all connected to different computers, actually took measurements within microseconds of each other. Engineers managed this by means of a pair of counter rotating, fibre-optic loops, with a precise calibration algorithm.
The sensors send thousands of samples of data per second over the network to a single system. This system is required to rapidly match up each incoming sample so that all sample numbers are grouped together. Due to the volume of data that the system is required to match together and the minimal amount of time available to do it in, the multiplexer needs to be very efficient. Once the data has been gathered and grouped, it saves samples to HDF5 format and also multicasts to a LAN for real-time data consumers to present or process captured data in real time.
“The real time display we wrote implemented a noise cancellation system. The sizes of the magnetic field fluctuations caused by brain activity is tiny compared to electromagnetic noise created by external sources, such as a passing car. The noise cancellation system worked by having some extra sensors in the magnetically shielded room which were far enough from the head of the patient that they would not pick up the brain activity, only the noise. And then the readings for these were used with the some weightings to subtract the noise from the sensors around the brain.” - Michael Drake
Codethink’s engineers enjoyed working on a medical product, contributing to something that would, in turn, help others.