original_docstring: 
          N total spikes becomes a (N,2) matrix for rendering at the (x,y) position
          self._pos is this (N,2) matrix, where the first column is spike time and second column is transformed spike id for rendering
          self._pos is rendered as a 2d scatter object
          It is ordered (N) first by #neuron, then by #spike 
          input _selected_id is the 1D index of the order 
  
          This function
          convert the _selected_id, which is ordered first by #neuron, then by #spike (for fast rendering)
          to      the spike_dict, which is (K,2) (K selected spikes: spike time, spike id) matrix ordered by spike time
          
docstring: N total spikes becomes a (N,2) matrix for rendering at the (x,y) position
  self._pos is this (N,2) matrix, where the first column is spike time and second column is transformed spike id for rendering
  self._pos is rendered as a 2d scatter object
  It is ordered (N) first by #neuron, then by #spike
  input _selected_id is the 1D index of the order
  
  This function
  convert the _selected_id, which is ordered first by #neuron, then by #spike (for fast rendering)
  to      the spike_dict, which is (K,2) (K selected spikes: spike time, spike id) matrix ordered by spike time
docstring_tokens: N total spikes becomes a ( N 2 ) matrix for rendering at the ( x y ) position self . _pos is this ( N 2 ) matrix where the first column is spike time and second column is transformed spike id for rendering self . _pos is rendered as a 2d scatter object It is ordered ( N ) first by #neuron then by #spike input _selected_id is the 1D index of the order This function convert the _selected_id which is ordered first by #neuron then by #spike ( for fast rendering ) to the spike_dict which is ( K 2 ) ( K selected spikes : spike time spike id ) matrix ordered by spike time
code: def _to_spike_dict(self, _selected_id):
          '''
          N total spikes becomes a (N,2) matrix for rendering at the (x,y) position
          self._pos is this (N,2) matrix, where the first column is spike time and second column is transformed spike id for rendering
          self._pos is rendered as a 2d scatter object
          It is ordered (N) first by #neuron, then by #spike 
          input _selected_id is the 1D index of the order 
  
          This function
          convert the _selected_id, which is ordered first by #neuron, then by #spike (for fast rendering)
          to      the spike_dict, which is (K,2) (K selected spikes: spike time, spike id) matrix ordered by spike time
          '''
          _spike_id   = np.unique(self._spike_id)[np.searchsorted(np.unique(self._pos[:,1]), self._pos[_selected_id][:,1])]
          _spike_time = self._pos[_selected_id][:,0]  # spike time is in the first column
  
          _spike_matrix = np.vstack((_spike_time, _spike_id)).T
          _spike_matrix = _spike_matrix[np.argsort(_spike_time)]  # ordered by spike time 
          return _spike_matrix
code_tokens: def _to_spike_dict ( self , _selected_id ) : _spike_id = np . unique ( self . _spike_id ) [ np . searchsorted ( np . unique ( self . _pos [ : , 1 ] ) , self . _pos [ _selected_id ] [ : , 1 ] ) ] _spike_time = self . _pos [ _selected_id ] [ : , 0 ] _spike_matrix = np . vstack ( ( _spike_time , _spike_id ) ) . T _spike_matrix = _spike_matrix [ np . argsort ( _spike_time ) ] return _spike_matrix
short_docstring: N total spikes becomes a (N,2) matrix for rendering at the (x,y) position
  self._pos is this (N,2) matrix, where the first column is spike time and second column is transformed spike id for rendering
  self._pos is rendered as a 2d scatter object
  It is ordered (N) first by #neuron, then by #spike
  input _selected_id is the 1D index of the order
short_docstring_tokens: N total spikes becomes a ( N 2 ) matrix for rendering at the ( x y ) position self . _pos is this ( N 2 ) matrix where the first column is spike time and second column is transformed spike id for rendering self . _pos is rendered as a 2d scatter object It is ordered ( N ) first by #neuron then by #spike input _selected_id is the 1D index of the order
comment: '''
          N total spikes becomes a (N,2) matrix for rendering at the (x,y) position
          self._pos is this (N,2) matrix, where the first column is spike time and second column is transformed spike id for rendering
          self._pos is rendered as a 2d scatter object
          It is ordered (N) first by #neuron, then by #spike 
          input _selected_id is the 1D index of the order 
  
          This function
          convert the _selected_id, which is ordered first by #neuron, then by #spike (for fast rendering)
          to      the spike_dict, which is (K,2) (K selected spikes: spike time, spike id) matrix ordered by spike time
          '''$SEP$# spike time is in the first column
  $SEP$# ordered by spike time 
  