Open alejoe91 opened 5 years ago
something like this https://github.com/SpikeInterface/spikeextractors/pull/196 would fix the MdaSortingExtractor. In general I think that it's always good to have the sampling frequency information for sorting extractors
I agree it is always good to have sampling freq info in the sorting extractors. However, it is too late to build it into the firings.mda format. Instead we should explicitly pass samplerate=.... into the constructor of the MdaSortingExtractor. The info can be obtained from the accompanying recording extractor.
Also, I don't like the following in SortingExtractor.py:
def get_sampling_frequency(self):
return self._sampling_frequency
The mechanism for a sorting extractor to specify the sampling frequency should not be to set a private variable. Rather it should be to call a set_sampling_frequency(...) --- or to overload the default behavior.
Ok! I will fix that and apply the changes to spikesorters so that when the output is returned it loads the sampling frequency.
We have a set_sampling_frequency
, and that it's the mechanism that the user should use to load sampling frequency info. Internally set_sampling_frequency
changes the self._sampling_frequency
Okay makes sense. We should just make sure that nothing else sets ._sampling_frequency (always use the set_sampling_frequency method).
On Mon, Jul 1, 2019 at 9:14 AM Alessio Buccino notifications@github.com wrote:
Ok! I will fix that and apply the changes to spikesorters so that when the output is returned it loads the sampling frequency.
We have a set_sampling_frequency, and that it's the mechanism that the user should use to load sampling frequency info. Internally set_sampling_frequency changes the self._sampling_frequency
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/spikeforest/issues/66?email_source=notifications&email_token=AA4CIQFR4DQDURWVE7DBFOTP5H7KDA5CNFSM4H4MO572YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6CSMY#issuecomment-507259187, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4CIQB5IL5LAVOQZWJZRSTP5H7KDANCNFSM4H4MO57Q .
With this ST update (https://github.com/SpikeInterface/spiketoolkit/pull/177) the comparison functions take a
delta_time
rather thandelta_frames
.This requires the
SortingExtractor
to have aself._samapling_frequency
which is returned by theget_sampling_frequency
functions. All of the updated extractors implement this automatically.The only issue is the MdaSortingExtractor, because it doesn't save the sampling frequency.
@magland @jamesjun maybe we could add this info to the .mda header?