Skip to content

Inconsistent rescale_spike_timestamp behavior for spikes in Plexon? #1304

@h-mayorquin

Description

@h-mayorquin

In the base class the docstring of the rescale_spike_timestamp function claims that it should rescale timestamps to seconds:

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?

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:

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:

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions