Skip to content

Commit

Permalink
fixed loadmeanwaveforms.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gviejo committed Feb 7, 2022
1 parent 9958fe1 commit ed6ceaa
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions pynapple/io/neurosuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# @Author: gviejo
# @Date: 2022-02-02 20:45:09
# @Last Modified by: gviejo
# @Last Modified time: 2022-02-07 00:13:35
# @Last Modified time: 2022-02-07 18:54:30

"""
Class and functions for loading data processed with the Neurosuite (Klusters, Neuroscope, NDmanager)
Expand Down Expand Up @@ -404,30 +404,33 @@ def write_neuroscope_intervals(self, extension, isets, name):

return

def load_mean_waveforms(self, epoch = None, waveform_window = nap.IntervalSet(start = -0.5, end = 1, time_units = 'ms'), spike_count = 1000):
def load_mean_waveforms(self, epoch=None, waveform_window=None, spike_count=1000):
"""
Load the mean waveforms from a dat file.
Parameters
----------
epoch : IntervalSet
default = None
Restrict spikes to an epoch.
waveform_window : IntervalSet
default = start = -0.0005, end = 0.001, time_units = 'ms'
default interval nap.IntervalSet(start = -0.0005, end = 0.001, time_units = 'ms')
Limit waveform extraction before and after spike time
spike_count : int
default = 1000
Number of spikes used per neuron for the calculation of waveforms
Returns
----------
-------
dictionary
the waveforms for all neurons
pandas.Series
the channel with the maximum waveform for each neuron
"""
if not isinstance(waveform_window, nap.IntervalSet):
waveform_window = nap.IntervalSet(start = -0.5, end = 1, time_units = 'ms')

spikes = self.spikes
if not os.path.exists(self.path): #check if path exists
print("The path "+self.path+" doesn't exist; Exiting ...")
Expand Down

0 comments on commit ed6ceaa

Please sign in to comment.