Multi-scale Design Laboratory (MDL) is a UBC lab that develops new analytical technologies for medicine and biological research at the single cell scale. Their work is enabled by advances in fabrication, measurement, and computation across a wide range of domains and length scales. I had the chance to work with them during my final year of studies.
A large project I worked on was calibrating a laser-equipped-microscope for use in new cell analysis technology. How the system works:
My task was to design calibration software that "closes the loop" on laser position so that we can command the laser to exact locations in the camera field of view. This will allow us to abstract the laser control hardware and scan trajectories based on uploaded images.
We designed a calibration sequence that closes the gap between input voltage and laser position. I wrote Python / C# code to automate the following:
The photo below plots the actual laser position (red) for the evenly spaced voltage commands on top of an ideal square grid (white). The strange warping of laser position is evident and sensitive to any disturbances to the microscope.
To validate the calibration:
Another project I worked on was optimizing trajectories for scanning with the laser. The labs previous implementation involved creating a raster scan from a bitmap file. The laser would scan over every pixel in the camera FOV and turn on/off according to the bitmap. This is somewhat inefficient for cases where the laser is off most of the time since it will scan over every pixel anyways.
I created a new trajectory generation protocol that uses a vector based approach:
For the scan shown in figure 4 above, the optimized trajectory takes 86% less time than it would with the pure raster approach. This saves the lab large amounts of time while testing since scans sometimes take on the order of 30 minutes to complete.
Within each contour, a mini-raster is computed to ensure that the whole well is scanned over. The interpolated trajectory is visualized in figure 6 to show the non-linear nature of the voltage-pixel relationship: