Menu

Pynapse – Python Behavioral Control

Used in 4 published studies →

Design event-based behavior paradigms and track training sequences

  • Event-driven behavioral states
  • Integrated control of the training sequence with behavioral trials and blocks
  • Blocked-trials to speed up animal training and better organize experimental paradigms
  • Built-in metrics to track animal parameters
    (e.g. number of lever presses, rewards, nose pokes, and punishments)

 

top panel of trial metrics screen shot

Pynapse simplifies the design of behavioral control sequences — just right-click to autocomplete states and methods for defined parameters (such as rewards, lever presses, and nose pokes), then select what happens.

Control event parameters (such as duration of nose poke or number of lever presses) that trigger the next state. The built-in metrics track these parameters to deliver a reward (like a pellet or sucrose) or end a trial with no reward or a punishment. Use our online metric analysis to track the animal’s learning.

Utilize behavioral trials and blocks

Behavioral trials and blocks allow for complete control over the training sequence. Simply select the number of trials to train the animal and then a block of trials to run over a few hours or days to build up reinforcement of the training paradigm.

All metrics associated with the training trial, such as percent success and learning curve, are saved during the experiment. Use these metrics in the next session to define a new level of success or failure.

gif of iCon iH10 module screenshot

iCon Integration with Pynapse

Pynapse was designed to integrate seamlessly with the iCon – TDT’s behavioral control interface.

Information from the iCon (inputs, outputs, timers, etc.) is extracted into the Pynapse coding environment. Encoded states will then change based on subject inputs via the iCon, other event outcomes, or timers.

Integrated API with a Python coding environment

Pynapse is an event-based Python programming environment. When coding in Pynapse, there is a built-in autocomplete which provides easy access to all state and method calls and minimizes the need for detailed knowledge of Python coding. Complete the code with a few if-then statements and some math, and that’s all you need.

Direct access to Synapse inputs and outputs, such as triggers or Gizmo parameters, allows for closed-loop control on the order of tens of milliseconds. Use Pynapse to take slow events (such as averaging evoked responses or processing neural firing patterns) and trigger a new stimulus, whether it be visual, auditory, or electrical.

Pynapse accesses Synapse data, such as an evoked response, and generates a running average of the acquisition for real-time visualization of visual or electrically evoked potentials. Users can access neural firing patterns, run cross correlations, and then change on-the-fly stimulation patterns for the next trial.

Synapse-Pynapse-ephys_Go-NoGo-Spikes

Back to Top  |  Contact Sales

Published research using the Pynapse

Read all 4 papers →
eLife · 2026

The nucleus accumbens shell regulates hedonic feeding via a rostral hotspot

Alina-Măriuca Marinescu, Eshita Kamal, Peter Leary, … Marie A Labouesse

The medial nucleus accumbens shell (medNAcSh) is a key regulator of hedonic feeding, controlling reward consumption through its projections to downstream structures. Recent studies showed that the primary cellular mediators of these effects are dopamine 1 receptor-positive striatal projection neurons (D1-SPNs). Specifically, D1-SPN activity gets inhibited during reward consumption, and such inhibition is necessary and sufficient to authorize consumption, independent of metabolic need. Anatomically, the medNAcSh spans 1–1.5 mm along the rostro-caudal axis in mice, and previous studies have reported functional gradients along this axis. For instance, pharmacological studies have suggested that rostral rather than caudal medNAcSh regulates appetitive behavior. However, the mechanisms underlying this topographical gradient remain unknown. Here, we hypothesized that D1-SPNs contribute to this gradient by regulating hedonic feeding via a specific hotspot in the rostral medNAcSh. Using calcium monitoring with fiber photometry in mice, we show that rostral medNAcSh D1-SPNs demonstrate inhibitory responses during reward consumption, while caudal D1-SPNs do not. Consistently, optogenetic stimulation of rostral D1-SPNs inhibits consumption, while stimulation of caudal D1-SPNs had minimal effects, confirming the existence of a functional rostro-caudal gradient. Importantly, we observed no differences between rostral and caudal D1-SPNs in their responses to aversive stimuli, suggesting that the D1-SPN gradient is specific to appetitive contexts. To investigate potential molecular correlates of this functional gradient, we leveraged open-source anatomy datasets and performed fluorescent in situ hybridization, identifying Stard5 and Peg10 as markers enriched in the rostral and caudal medNAcSh, respectively. Finally, we developed a novel Stard5-Flp driver line to selectively target the rostral hotspot and demonstrated that Stard5+ neurons recapitulate rostral D1-SPN activity patterns. Together, these findings establish a spatially confined rostral medNAcSh subregion as a critical regulator of reward consumption and introduce Stard5 as a molecular tool for its manipulation, offering new opportunities for intervention in dysregulated eating.

TDT products used:RZ10XSynapseiConPynapseiM10iH
Read the paper → (The nucleus accumbens shell regulates hedonic feeding via a rostral hotspot, opens in a new tab)
bioRxiv* · 2025

Categorical rhythmic priors in macaques

Castillo-Almazán A, Prado L, Jacoby N, Merchant H

Rhythmic ability is a universal aspect of human cultures and sets the basis for musical rhythm perception and synchronization. While humans can synchronize movements to complex rhythms, it is unclear whether this capability extends to our primate ancestors. In this study, we explore whether primates can synchronize to complex rhythms and acquire rhythmic representations with generalizability akin to humans. Using controlled behavioral experiments, we provide evidence that monkeys not only can synchronize to short-long or long-short rhythms but also learn representations that generalize across a wide range of rhythm ratios and total durations. These results indicate ability to flexibly represent ratios within a relative timing framework is not exclusive to humans, but it is also present in monkeys. In addition, the produced intervals show a bias towards rhythmic categories. Notably, in an iterative tapping task, macaques and humans showed large priors for isochrony and integer ratios (2:1, 3:1). These results demonstrate a common biological foundation for rhythm synchronization in primates, extending our understanding of the shared cognitive mechanisms between primates and humans, and highlight the enormous potential of using monkeys to study the neurophysiological basis of complex rhythm perception.

TDT products used:RZ2Pynapse
Read the paper → (Categorical rhythmic priors in macaques, opens in a new tab)
Journal of Neurophysiology · 2025

Flexible tapping synchronization in macaques: dynamic switching of timing strategies within rhythmic sequences

Castillo-Almazán A, Pérez O, Prado L, … Merchant H

The ability to synchronize bodily movements with regular auditory rhythm across a broad range of tempos underlies humans' capacity for playing music and dancing. This capability is prevalent across human cultures but relatively uncommon among nonhuman species. Recent research indicates that monkeys can predictively synchronize to regular, isochronous metronomes, exhibiting a preference for visual rather than auditory sequences. In this study, we trained macaques to perform a visual synchronization tapping task, testing their synchronization abilities over a wide tempo range and characterizing their precision and accuracy in timing intervals throughout rhythmic sequences. In addition, we investigated whether the macaques used priors or error correction strategies to maintain synchrony with the metronome. Our findings demonstrate that, following sufficient training, macaques exhibit a remarkable capability to synchronize across diverse tempos. Through an inference model analysis, we identified two distinct timing control strategies used by the macaques: an initial strong regression-to-the-mean effect transitioning dynamically into a more precise error correction approach at their preferred tempo. These results provide compelling evidence that primates possess sophisticated rhythmic timing mechanisms, effectively leveraging internal and external cues to regulate their tapping behavior according to task demands.NEW & NOTEWORTHY We trained macaques in a visual synchronization tapping task and using an inference model, we found that they are highly precise and accurate in their rhythmic performance. The model also captured a dynamic switch in behavior. At the beginning of the task, the monkeys used their prior knowledge about the interval statistics and then switched to an error correction mechanism to generate intervals depending on the previously produced duration.

TDT products used:RZ2Pynapse
Read the paper → (Flexible tapping synchronization in macaques: dynamic switching of timing strategies within rhythmic sequences, opens in a new tab)

* Preprint: not yet peer reviewed.

How to cite the Pynapse Python Behavioral Control

Name the model in your Methods so readers can find the equipment you used, for example:

Pynapse Python Behavioral Control (Tucker-Davis Technologies, Alachua, FL, USA)