Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

pyClamp

A live graphical user interface (client) for the real-time dyClamp (host) controller

DOI

pyClamp is a feature-complete graphical user interface written in Python to demonstrate the flexibility of the novel dynamic clamp implementation: The current user interface focuses on data consistency (between the interface and the dynamic clamp system) and data transparency (with the option of monitoring any values live). Furthermore, a lab journal will keep track of new experiments and record all relevant settings with corresponding timestamps.

Video demonstration 🎥 (6.5 MiB, H.264/MPEG-4 AVC) of dyClamp and pyClamp producing and monitoring a current command for the Axopatch 200B amplifier.

Cross-reference: dyClamp is a further development of the dynamic_clamp sketch with a focus on a robust serial communication between the Teensy and its controlling host computer.

Screenshot

Data consistency

When uploading conductance values or calibration parameters to the Teensy, the user interface checks the status of the transmissions with the Teensy's command echos. If a transmission failure is detected, an error message will be displayed in the status field and the current values will be downloaded from the Teensy. A green background indicator then highlights all up-to-date values. In addition, all values that have exclusively been changed in the user interface - but have not yet been uploaded - are indicated by a white background. Furthermore, incorrect entries (with letters or invalid characters) are highlighted in red, while all transmission buttons are temporarily disabled.

Data transparency

The live reports feature allows users to monitor any values on the Teensy live. To demonstrate this feature, the latest values of the membrane potential, the injected current, and the cycle time are visualized every 20 ms. When implementing new current models or defining new trigger events, the live reports will help with debugging and understanding the dynamic clamp setup.

Lab journal

Every time an experiment is started or modified (Start button), a new lab journal entry is created. The new entry contains the start time, the present conductance values, and the calibration parameters. Once the experiment is stopped (Stop button), the entry is finalized with a corresponding timestamp.

Example:

Experiment started:	Sat May 29 11:49:26 2021
G_Shunt	[nS]    	     0.00
G_H 	[nS]       	     0.00
G_Na	[nS]       	     0.00
OU1_m	[nS]      	     0.00
OU1_D	[nS^2/ms] 	     0.00
OU2_m	[nS]      	     0.00
OU2_D	[nS^2/ms] 	     0.00
G_EPSC	[nS]     	     0.00
AMP_i	[mV/mV]   	    50.00
AMP_o	[pA/V]    	   400.00
ADC_m	[mV/1]    	     5.50
ADC_n	[mV]      	-11500.00
DAC_m	[1/pA]    	   750.00
DAC_n	[0-4095]  	  2000.00
VLT_d	[mV]      	     0.00
Experiment started:	Sat May 29 12:00:54 2021
G_Shunt	[nS]    	     2.00
G_H 	[nS]       	     0.00
G_Na	[nS]       	     0.00
OU1_m	[nS]      	     0.00
OU1_D	[nS^2/ms] 	     0.00
OU2_m	[nS]      	     0.00
OU2_D	[nS^2/ms] 	     0.00
G_EPSC	[nS]     	     0.00
AMP_i	[mV/mV]   	    50.00
AMP_o	[pA/V]    	   400.00
ADC_m	[mV/1]    	     5.50
ADC_n	[mV]      	-11500.00
DAC_m	[1/pA]    	   750.00
DAC_n	[0-4095]  	  2000.00
VLT_d	[mV]      	     0.00
Experiment stopped:	Sat May 29 12:04:29 2021

Software requirements

If you want to use pyClamp in your dynamic clamp setup, you can either download the bundled versions for Windows from the releases page or run it directly from the source script. In the latter case, you'll need recent versions of Python, NumPy, Matplotlib, and PySerial. However, the latest Windows versions of all of these extension packages can be downloaded from Christoph Gohlke's repository. These are my version recommendations:

  • Python (>= 3.7.3)
  • NumPy (>= 1.16.2)
  • Matplotlib (>= 3.0.3)
  • PySerial (>= 3.4.0)

Acknowledgements

I would like to thank Cathy Proenza, Alexander Polster, and Andrew Scallon for providing resources and valuable feedback during the development process.

Development & Bug reports

If you would like to participate in the development, please fork this repository to your GitHub account. In order to report a problem, please create a new issue in this repository.

Your feedback is welcome! Please contact me at GitHub or via e-mail.