Exemple #1
0
def describe(kwik_path, clustering=None):
    from phy.io.kwik import KwikModel

    if not op.exists(kwik_path):
        print("The file `{}` doesn't exist.".format(kwik_path))
        return

    model = KwikModel(kwik_path, clustering=clustering)
    model.describe()
    model.close()
Exemple #2
0
def describe(args):
    from phy.io.kwik import KwikModel
    path = _get_kwik_path(args)
    model = KwikModel(path, clustering=args.clustering)
    return 'model.describe()', dict(model=model)
                    m = np.vstack((masks[self._n],
                                   self.template_masks[cluster][None, ...]))
                    w.set_data(waveforms=wav,
                               masks=m,
                               spike_clusters=[0, 1],
                               )
        run()


c = Converter(basename, filename, N_t,
              n_channels=n_channels,
              n_total_channels=n_total_channels,
              offset=offset,
              prb_file=prb_file,
              sample_rate=sample_rate,
              dtype=dtype,
              gain=gain
              )

# Uncomment to have a look at the templates or waveforms.
#c.template_explorer('waveforms')  # 'waveforms' or 'templates'
#exit()

if not os.path.exists(basename + '.kwik'):
    # Conversion.
    c.create_kwik()

# Try to open the kwik file after the conversion.
model = KwikModel(c.kwik_path)
model.describe()