1. Chris Lee-Messer
  2. python-axonbinaryfile

Commits

ch...@lee-messer.net  committed 2acf184

add get_waveform to Abf class to access stimulus waveform

  • Participants
  • Parent commits dd38122
  • Branches default

Comments (0)

Files changed (1)

File axonbinaryfile/__init__.py

View file
  • Ignore whitespace
                 
                        
 
-    #def get_waveform(self):
+    def get_waveform(self, episode, dac_channel):
+        """
+        easy way to get the stimulus waveform for a run
+        note per python way, episode count starts at 0
+
+        don't yet check if parameters are in range
+        returns at float32 1dim numpy array
+        """
+        return _abf.get_cmdwaveform(self.filename, episode+1, dac_channel)