def __read_unit_list_timestamped(self):
"""
A list of a list of Units.
This is the same as __read_unit_list, except that it also has a
timestamp. This is added ad an annotation to all Units.
-----------------------------------------------
Returns a list of Units modified in the method.
The returned objects are already added to the Block.
ID: 29119
"""
# double -- time zero (number of days since dec 30th 1899)
timestamp = np.fromfile(self._fsrc, dtype=np.double, count=1)[0]
# convert to to days since UNIX epoc time:
timestamp = self._convert_timestamp(timestamp)
# sorter -- this is based off a sorter
units = self.__read_unit_list()
for unit in units:
unit.annotations['timestamp'].append(timestamp)
return units
评论列表
文章目录