Ejemplo n.º 1
0
    def __init__(self, file_path, delimiter=','):
        SortingExtractor.__init__(self)

        if os.path.isfile(file_path):
            self._spike_clusters = sbio.SpikeClusters()
            self._spike_clusters.fromCSV(file_path, None, delimiter=delimiter)
        else:
            raise FileNotFoundError(
                'the ground truth file "{}" could not be found'.format(
                    file_path))
Ejemplo n.º 2
0
    def __init__(self, file_path, delimiter=','):
        assert HAVE_SBEX, self.installation_mesg
        SortingExtractor.__init__(self)

        if os.path.isfile(file_path):
            self._spike_clusters = sbio.SpikeClusters()
            self._spike_clusters.fromCSV(file_path, None, delimiter=delimiter)
        else:
            raise FileNotFoundError('the ground truth file "{}" could not be found'.format(file_path))
        self._kwargs = {'file_path': str(Path(file_path).absolute()), 'delimiter': delimiter}
Ejemplo n.º 3
0
    def __init__(self, file_path, sampling_frequency, delimiter=','):
        assert self.installed, self.installation_mesg
        assert Path(file_path
                    ).suffix == ".csv", "The 'file_path' should be a csv file!"

        if Path(file_path).is_file():
            spike_clusters = sbio.SpikeClusters()
            spike_clusters.fromCSV(str(file_path), None, delimiter=delimiter)
        else:
            raise FileNotFoundError(
                f'The ground truth file {file_path} could not be found')

        BaseSorting.__init__(self,
                             unit_ids=spike_clusters.keys(),
                             sampling_frequency=sampling_frequency)

        sorting_segment = SHYBRIDSortingSegment(spike_clusters)
        self.add_sorting_segment(sorting_segment)

        self._kwargs = {
            'file_path': str(Path(file_path).absolute()),
            'sampling_frequency': sampling_frequency,
            'delimiter': delimiter
        }