def __read_spiketrain_timestamped(self):
"""
Read a SpikeTrain
This SpikeTrain contains a time stamp for when it was recorded
The timestamp is stored as an annotation in the SpikeTrain.
-------------------------------------------------
Returns a SpikeTrain object with multiple spikes.
The returned object must be added to the Block.
ID: 29110
"""
# float64 -- timeStamp (number of days since dec 30th 1899)
timestamp = np.fromfile(self._fsrc, dtype=np.double, count=1)[0]
# convert to datetime object
timestamp = self._convert_timestamp(timestamp)
# seq_list -- spike list
# combine the spikes into a single SpikeTrain
spiketrain = self._combine_spiketrains(self.__read_list())
# add the timestamp
spiketrain.annotations['timestamp'] = timestamp
return spiketrain
评论列表
文章目录