function [spikepos]=spike_pos(table,ns,neuron, thresh_std) %%return position whose spike data crosses threshold
      ot = ns(:,neuron);
      ot_mean = mean(ot);
      ot_std = std(ot);
      thresh = ot_mean + thresh_std*ot_std;
      %thresh=thresh_spike*max(ns(:,neuron));
      rows_logical = find(ns(:,neuron)>thresh);
      
      rows_pos = table(rows_logical,:);
      
      
     
      spikepos=rows_pos;
end