-
Notifications
You must be signed in to change notification settings - Fork 266
Description
In the base class the docstring of the rescale_spike_timestamp function claims that it should rescale timestamps to seconds:
python-neo/neo/rawio/baserawio.py
Lines 646 to 650 in 4d4eb85
| def rescale_spike_timestamp(self, spike_timestamps, dtype='float64'): | |
| """ | |
| Rescale spike timestamps to seconds. | |
| """ | |
| return self._rescale_spike_timestamp(spike_timestamps, dtype) |
However, looking at Plexon it seems that the private method is in fact returning frames?
python-neo/neo/rawio/plexonrawio.py
Lines 352 to 355 in 4d4eb85
| def _rescale_spike_timestamp(self, spike_timestamps, dtype): | |
| spike_times = spike_timestamps.astype(dtype) | |
| spike_times /= self._global_ssampling_rate | |
| return spike_times |
This is very confusing, because in SpikeInterface we are using the self._global_ssampling_rate as the sampling frequency of the sorting extractor so something does not square. Is there something I am missing
All the other sorting extractors look reasonable even if I don't know everything about them:
Neuralynx:
python-neo/neo/rawio/neuralynxrawio/neuralynxrawio.py
Lines 645 to 649 in 4d4eb85
| def _rescale_spike_timestamp(self, spike_timestamps, dtype): | |
| spike_times = spike_timestamps.astype(dtype) | |
| spike_times /= 1e6 | |
| spike_times -= self.global_t_start | |
| return spike_times |
Are the spiketimes of neuralynx naturally in microseconds?
Blacrock:
python-neo/neo/rawio/blackrockrawio.py
Lines 661 to 664 in 4d4eb85
| def _rescale_spike_timestamp(self, spike_timestamps, dtype): | |
| spike_times = spike_timestamps.astype(dtype) | |
| spike_times /= self.__nev_basic_header['timestamp_resolution'] | |
| return spike_times |
I am kind of surpirsed this is not done inside the _get_spike_timestamps in blackrock as it seems that _get_spike_timestamps naturally does not return timestamps?
Anyway, concerning Plexon, am I misunderstanding?
You have been working on this recently @JuliaSprenger so maybe you have this fresh?