Esempio n. 1
0
    def __init__(self, file_path):
        # load params file related to the given shybrid recording
        params = sbio.get_params(file_path)['data']

        # create a shybrid probe object
        probe = sbprb.Probe(params['probe'])
        nb_channels = probe.total_nb_channels

        # translate the byte ordering
        # TODO still ambiguous, shybrid should assume time_axis=1, since spike interface makes an assumption on the byte ordering
        byte_order = params['order']
        if byte_order == 'C':
            time_axis = 1
        elif byte_order == 'F':
            time_axis = 0

        # piggyback on binary data recording extractor
        BinDatRecordingExtractor.__init__(self,
                                          file_path,
                                          params['fs'],
                                          nb_channels,
                                          params['dtype'],
                                          time_axis=time_axis)

        self = load_probe_file(self, params['probe'])
Esempio n. 2
0
    def __init__(self, file_path):
        # load params file related to the given shybrid recording
        assert self.installed, self.installation_mesg
        assert Path(file_path).suffix in [
            ".yml", ".yaml"
        ], "The 'file_path' should be a yaml file!"
        params = sbio.get_params(file_path)['data']
        file_path = Path(file_path)

        # create a shybrid probe object
        probe = sbprb.Probe(params['probe'])
        nb_channels = probe.total_nb_channels

        # translate the byte ordering
        byte_order = params['order']
        if byte_order == 'C':
            time_axis = 1
        elif byte_order == 'F':
            time_axis = 0

        bin_file = file_path.parent / f"{file_path.stem}.bin"

        # piggyback on binary data recording extractor
        BinaryRecordingExtractor.__init__(self,
                                          files_path=bin_file,
                                          sampling_frequency=float(
                                              params['fs']),
                                          num_chan=nb_channels,
                                          dtype=params['dtype'],
                                          time_axis=time_axis)

        # load probe file
        probegroup = read_prb(params['probe'])
        self.set_probegroup(probegroup, in_place=True)
        self._kwargs = {'file_path': str(Path(file_path).absolute())}
Esempio n. 3
0
    def __init__(self, file_path):
        # load params file related to the given shybrid recording
        assert HAVE_SBEX, "To use the SHYBRID extractors, install shybrid: \n\n pip install shybrid\n\n"
        params = sbio.get_params(file_path)['data']

        # create a shybrid probe object
        probe = sbprb.Probe(params['probe'])
        nb_channels = probe.total_nb_channels

        # translate the byte ordering
        # TODO still ambiguous, shybrid should assume time_axis=1, since spike interface makes an assumption on the byte ordering
        byte_order = params['order']
        if byte_order == 'C':
            time_axis = 1
        elif byte_order == 'F':
            time_axis = 0

        # piggyback on binary data recording extractor
        BinDatRecordingExtractor.__init__(self,
                                          file_path,
                                          params['fs'],
                                          nb_channels,
                                          params['dtype'],
                                          time_axis=time_axis)
        self._kwargs = {'file_path': str(Path(file_path).absolute())}
        self = load_probe_file(self, params['probe'])