|
@@ -363,7 +363,6 @@ class ReachGraspIO(BlackrockIO):
|
|
|
if ccf_override is not None:
|
|
|
warnings.warn('`ccf_override is deprecated.')
|
|
|
|
|
|
-
|
|
|
# Remember choice whether to print diagnostic messages or not
|
|
|
self._verbose = verbose
|
|
|
|
|
@@ -392,7 +391,7 @@ class ReachGraspIO(BlackrockIO):
|
|
|
# Initialize file
|
|
|
BlackrockIO.__init__(
|
|
|
self, filename, nsx_to_load=nsx_to_load, nsx_override=nsx_override,
|
|
|
- nev_override=sorting_version, verbose=verbose)
|
|
|
+ nev_override=sorting_version, verbose=verbose)
|
|
|
|
|
|
# if no odML directory is specified, use same directory as main files
|
|
|
if not odml_directory:
|
|
@@ -422,7 +421,7 @@ class ReachGraspIO(BlackrockIO):
|
|
|
# odML, then make sure the detected sorting version matches the odML
|
|
|
if self.odmldoc:
|
|
|
if sorting_postfix not in self.odmldoc.sections['PreProcessing'].sections[
|
|
|
- 'OfflineSpikeSorting'].properties['Sortings'].values:
|
|
|
+ 'OfflineSpikeSorting'].properties['Sortings'].values:
|
|
|
self._print_verbose(
|
|
|
"Attempting to utilize the most recent "
|
|
|
"sorting version in file %s, but the sorting version "
|
|
@@ -809,7 +808,7 @@ class ReachGraspIO(BlackrockIO):
|
|
|
for chidx, chid in enumerate(anasig.array_annotations['channel_ids']):
|
|
|
if chid not in view_dict:
|
|
|
view = neo.ChannelView(anasig, [chidx],
|
|
|
- name='Channel {} of {}'.format(chid,anasig.name),
|
|
|
+ name='Channel {} of {}'.format(chid, anasig.name),
|
|
|
channel_id=chid)
|
|
|
view_dict[chid] = view
|
|
|
|
|
@@ -893,7 +892,7 @@ class ReachGraspIO(BlackrockIO):
|
|
|
props['LowPassFreq'].unit))
|
|
|
hi_pass_order = np.zeros_like(hi_pass_freq)
|
|
|
lo_pass_order = np.zeros_like(lo_pass_freq)
|
|
|
- filter_type= np.empty((nchan), np.str)
|
|
|
+ filter_type = np.empty((nchan), np.str)
|
|
|
for chidx in range(nchan):
|
|
|
filter = 'Filter_ns%i' % asig.array_annotations['nsx'][chidx]
|
|
|
sec = self.odmldoc['Cerebus']['NeuralSignalProcessor']['NeuralSignals'][filter]
|
|
@@ -983,14 +982,15 @@ class ReachGraspIO(BlackrockIO):
|
|
|
project_subtype=sec.properties['Subtype'].values)
|
|
|
|
|
|
sec = self.odmldoc['Project']['TaskDesigns']
|
|
|
- bl.annotate( taskdesigns=[v for v in sec.properties['UsedDesign'].values])
|
|
|
+ bl.annotate(taskdesigns=[v for v in sec.properties['UsedDesign'].values])
|
|
|
|
|
|
sec = self.odmldoc['Subject']
|
|
|
bl.annotate(
|
|
|
subject_name=sec.properties['GivenName'].values,
|
|
|
subject_gender=sec.properties['Gender'].values,
|
|
|
subject_activehand=sec.properties['ActiveHand'].values,
|
|
|
- subject_birthday=str(sec.properties['Birthday'].values)) # datetime is not a valid annotation dtype
|
|
|
+ subject_birthday=str(
|
|
|
+ sec.properties['Birthday'].values)) # datetime is not a valid annotation dtype
|
|
|
|
|
|
sec = self.odmldoc['Setup']
|
|
|
bl.annotate(setup_location=sec.properties['Location'].values)
|
|
@@ -1027,7 +1027,7 @@ class ReachGraspIO(BlackrockIO):
|
|
|
''.format(asig.array_annotations['nsx']))
|
|
|
|
|
|
# Get and correct for shifts
|
|
|
- filter_name = 'Filter_ns%i' % asig.array_annotations['nsx'][0] # use nsx of 1st signal
|
|
|
+ filter_name = 'Filter_ns%i' % asig.array_annotations['nsx'][0] # use nsx of 1st signal
|
|
|
sec = self.odmldoc['Cerebus']['NeuralSignalProcessor']['NeuralSignals'][filter_name]
|
|
|
shift = pq.Quantity(
|
|
|
sec.properties['EstimatedShift'].values[0],
|