Guest User

Untitled

a guest
Jul 13th, 2020
1,146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. '''
  2. Press A to toggle acquisition
  3. Press spacebar to drop a marker
  4. '''
  5. import sys
  6.  
  7. import biopacndt
  8.  
  9. import viz
  10. import vizact
  11. import vizinfo
  12.  
  13. # Connect to the AcqKnowledge server
  14. try:
  15.     acqServer = biopacndt.AcqNdtQuickConnect()
  16. except biopacndt.ACQException:
  17.     viz.log(viz.LOG_ERROR, 'Exiting application, no AcqKnowledge servers found')
  18.     sys.exit()
  19.  
  20. viz.go()
  21. vizinfo.InfoPanel()
  22. viz.clearcolor(viz.SLATE)
  23.  
  24. #You can change the label “stimulus” to whatever you want the event to be labeled as
  25. def insert_marker():
  26.     acqServer.insertGlobalEvent('stimulus', '', '')
  27.  
  28. vizact.onkeydown(' ', insert_marker)
  29. vizact.onkeydown('a', acqServer.toggleAcquisition)
Add Comment
Please, Sign In to add comment