Setup a closed-loop experiment

Maximize the efficiency of your research by using closed-loop experiments to detect and respond to changes in real-time.

USE-CASE

1/9/20233 min read

Closed-loop experiments are a powerful tool for testing hypotheses in real-time by manipulating variables based on the detection of certain patterns. For example, in neuroscience research, an experiment might involve inhibiting neurons in the hippocampus when a specific brain wave (called a ripple) is detected to assess the impact on an animal's memory task performance.

Falcon logo ( a falcon trying to catch a ripple instead of a mouse)
Falcon logo ( a falcon trying to catch a ripple instead of a mouse)

Open-Ephys is a widely used software platform for conducting closed-loop experiments due to its user-friendly graphical user interface (GUI), a large community of users, and a strong team of developers in the background providing good documentation and a range of useful plug-ins. However, it has some limitations, as it is based on an audio processing framework which limits the streaming flow to be linear (not loopback) and to two types of elements: series (time x amplitudes x channels) or TTL events.

Falcon is another option for conducting closed-loop experiments, offering maximal flexibility by allowing for any possible graph construction. The software is also built to optimize low latency computation by having each processing node in its own threads exchanging data asynchronously through a ring buffer. However, it lacks built-in, ready-to-use GUI options and is only available for Linux systems.

In addition to using existing software platforms, another option to consider when setting up a closed-loop experiment is to create a dedicated software for the processing pipeline. While this may require more initial work, it allows you to work with exactly what you need without the drawbacks that can come with using a more generalized platform. This can be especially useful if you have specific requirements or if you want to avoid the challenges that come with trying to fit your needs into a pre-existing framework.

As a software developer with experience in both platforms, I can help you navigate these complexities and identify the best tools and techniques to use in your closed-loop experiments. Whether you need help with building custom processing chains, developing missing plugins, or simply setting up a new experiment, I can provide the support you need to start your experiment as soon as possible.

References:

There are several software platforms available for conducting closed-loop experiments, each with its own advantages and disadvantages. These platforms typically have a core component with a set of plug-ins that allow users to customize their processing chains and even add their own custom processing nodes as external plug-ins. However, maintaining software with a large number of plug-ins can be more complex and costly, as it requires porting all plug-ins when there are breaking changes to the core and managing an official versus unofficial set of plug-ins. This can also make it difficult for new users to navigate the platform, as they may be overwhelmed by the number of options available.

As the main maintainer of Falcon for the past three years, I have extensive experience with the platform and have worked closely with researchers to enhance its capabilities. Additionally, I have used open-ephys to read and preprocess data from neuropixels probes and have developed my own plugin to stream the data into Falcon. Through this experience, I have gained a thorough understanding of the strengths and limitations of both softwares. I am well-equipped to provide guidance on how to effectively use these tools and how to combine their strengths to achieve the best results.