Skip to content


Switch branches/tags
This branch is 411 commits ahead, 80 commits behind hongquanli:master.

Latest commit


Git stats


Failed to load latest commit information.

Scale-free Vertical Tracking Microscopy (aka Gravity Machine)


Gravity Machine is a new paradigm in tracking microscopy invented by Krishnamurthy et al. that uses a "hydrodynamic treadmill for single cells" to track microscale organisms like marine plankton over theoretically infinite scales in the vertical direction while maintaining microscale resolution. In this repo we share the software (Python) and firmware (C++) for running Gravity Machine. This is jointly developed with other open-microscopy platforms, specifically Octopi and Squid (Li et al.; generic repo: link, tracking repo: link) at the Prakash lab, Stanford. The repo documents both legacy and current versions of the code-base. As we move towards an initial release, kindly watch this space for updates!

Below we briefly discuss the scientific challenges and puzzles that motivated this tool!

The challenge

"How to track a single cell at microscale resolution while allowing free vertical movement over ecological-scales?"

For the last 300 years of history of microscopy, majority of subjects of the microscopic world have been stuck under a cover slip in the X-Y plane (horizontal plane). But many phenomena occur far from such confinements, for instance, plankton swimming and sinking particles suspended in the ocean where gravity is the one constant. So how can we observe microscopic life and physical processes that can traverse ecological length scales?

The Idea

To address this challenge we invented the nearest thing we could imagine to an "endless" water-column using a simple insight "A circle has no beginning (or end)": The result is a microscope stage which functions as a "hydrodynamic treadmill for single-cells". This stage becomes the basis for a 3D tracking microscope which allows theoretically infinite movement along the vertical direction, and also free movement (compared to the organism size) in the two horizontal directions. We describe the tool, and results based on the new measurement paradigm it opens up, in the following papers Nature Methods, Biorxiv.

What can you do with Gravity Machine?

Gravity Machine allows you to capture dynamics of processes that can span multiple length and time-scales, for instance, marine microscale plankton swimming many meters along the vertical axis, allowing direct measurement of their free-swimming behavior. Using Gravity Machine we have, for the first time, observed the multi-scale behavior of marine inventrebrate larve, observed diel vertical migrations at the scale of single cells and organisms, measured flow-fields around freely swimming plankton, as well as observed multiscale processes associated with sedimenting particles and "marine snow". In short it opens up a new measurement paradigm in fields such as ocean biophysics, marine ecology, marine biology and fluid mechanics, among others.

To explore more visit the Gravity Machine website and our associated data-gallery of the first-ever multi-scale plankton tracks.


Gravity machine can be used to track free-swimming single cells and organisms over long length and time-scales. Shown above is a tracking demonstration of a single algal colony (Volvox sp. ~250um in size) tracked for ~ 1 hour as it swims up by 2.5 meters (10000 body lengths)!

Getting Started

The tracking microscope is run using software (Python) that runs on standard PC, and handles the real-time image-processing and GUI interaction with the user, along with firmware (C++) that runs on a microcontroller (Arduino Due). The code for each of those can be found within the software and firmware folders, respectively. Start by installing the software dependencies by following


5 Dec 2020 We are currently working towards a release of the latest software and firmware versions. Please watch this space for updates!

Selected Publications

  1. Krishnamurthy, Deepak, Hongquan Li, François Benoit du Rey, Pierre Cambournac, Adam G. Larson, Ethan Li, and Manu Prakash. "Scale-free vertical tracking microscopy." Nature Methods (2020): 1-12. Weblink
  2. Krishnamurthy, Deepak, Hongquan Li, François Benoit du Rey, Pierre Cambournac, Adam Larson, and Manu Prakash. "Scale-free Vertical Tracking Microscopy: Towards Bridging Scales in Biological Oceanography." bioRxiv (2019): 610246. Weblink

To cite this tool

  title={Scale-free vertical tracking microscopy},
  author={Krishnamurthy, Deepak and Li, Hongquan and du Rey, Fran{\c{c}}ois Benoit and Cambournac, Pierre and Larson, Adam G and Li, Ethan and Prakash, Manu},
  journal={Nature Methods},
  publisher={Nature Publishing Group}


No packages published


  • Python 90.0%
  • C++ 9.9%
  • Other 0.1%