File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed 
element_array_ephys/readers Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ def get_best_channel(self, unit):
129129
130130    def  extract_spike_depths (self ):
131131        """ Reimplemented from https://github.com/cortex-lab/spikes/blob/master/analysis/ksDriftmap.m """ 
132+         
132133        if  'pc_features'  in  self .data :
133134            ycoords  =  self .data ['channel_positions' ][:, 1 ]
134135            pc_features  =  self .data ['pc_features' ][:, 0 , :]  # 1st PC only 
@@ -143,8 +144,9 @@ def extract_spike_depths(self):
143144            # center of mass is sum(coords.*features)/sum(features) 
144145            self ._data ['spike_depths' ] =  (np .sum (spk_feature_ycoord  *  pc_features ** 2 , axis = 1 )
145146                                        /  np .sum (pc_features ** 2 , axis = 1 ))
146- else :
147-     self ._data ['spike_depths' ] =  None 
147+         else :
148+             self ._data ['spike_depths' ] =  None 
149+ 
148150        # ---- extract spike sites ---- 
149151        max_site_ind  =  np .argmax (np .abs (self .data ['templates' ]).max (axis = 1 ), axis = 1 )
150152        spike_site_ind  =  max_site_ind [self .data ['spike_templates' ]]
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments