Closed DradeAW closed 4 years ago
Hi. It's not clear what the issue is, phy2 was released recently and we've had issues in the past generating data that could be safely loaded. I will post this error on the phy forum and see what Cyrille says.
Hi, this issue was fixed in master branch (the template shape had been changed). Please let us know if you have any other issues running phy2 on YASS output.
Hi,
I have an error in my dataset and in the samples dataset.
I'm running yass and generating the phy files, and it works fine. Then, in phy/params.py I change the dat_path and add an additional '.' (since the data file is in the parent folder).
Then I try running 'phy template-gui params.py' (or 'phy template-gui phy/params.py', I tried both), and get the following error:
15:08:28.578 [W] model:397 There are 52572/59609 spikes after the end of the recording. 15:08:28.654 [E] init:62 An error has occurred (AssertionError): Traceback (most recent call last): File "/home/aurelien/dev/miniconda3/envs/phy2/bin/phy", line 11, in
load_entry_point('phy', 'console_scripts', 'phy')()
File "/home/aurelien/dev/miniconda3/envs/phy2/lib/python3.7/site-packages/click/core.py", line 829, in call
return self.main(args, kwargs)
File "/home/aurelien/dev/miniconda3/envs/phy2/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/aurelien/dev/miniconda3/envs/phy2/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/aurelien/dev/miniconda3/envs/phy2/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/home/aurelien/dev/miniconda3/envs/phy2/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(args, kwargs)
File "/home/aurelien/dev/miniconda3/envs/phy2/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), args, kwargs)
File "/home/aurelien/dev/phy/phy/apps/init.py", line 159, in cli_template_gui
template_gui(params_path, kwargs)
File "/home/aurelien/dev/phy/phy/apps/template/gui.py", line 199, in template_gui
gui = controller.create_gui()
File "/home/aurelien/dev/phy/phy/apps/base.py", line 1638, in create_gui
self.supervisor.attach(gui)
File "/home/aurelien/dev/phy/phy/cluster/supervisor.py", line 942, in attach
gui=gui, sort=gui.state.get('ClusterView', {}).get('current_sort', None))
File "/home/aurelien/dev/phy/phy/cluster/supervisor.py", line 760, in _create_views
gui, data=self.cluster_info, columns=self.columns, sort=sort)
File "/home/aurelien/dev/phy/phy/cluster/supervisor.py", line 916, in cluster_info
return [self.get_cluster_info(cluster_id) for cluster_id in self.clustering.cluster_ids]
File "/home/aurelien/dev/phy/phy/cluster/supervisor.py", line 916, in
return [self.get_cluster_info(cluster_id) for cluster_id in self.clustering.cluster_ids]
File "/home/aurelien/dev/phy/phy/cluster/supervisor.py", line 745, in get_cluster_info
out[key] = func(cluster_id)
File "/home/aurelien/dev/phy/phy/apps/base.py", line 1150, in get_best_channel_label
return self._get_channel_labels([self.get_best_channel(cluster_id)])[0]
File "/home/aurelien/dev/phy/phy/utils/context.py", line 154, in memcached
out = f( args, kwargs)
File "/home/aurelien/dev/phy/phy/apps/base.py", line 1144, in get_best_channel
channel_ids = self.get_best_channels(cluster_id)
File "/home/aurelien/dev/phy/phy/utils/context.py", line 154, in memcached
out = f(*args, **kwargs)
File "/home/aurelien/dev/phy/phy/apps/template/gui.py", line 149, in get_best_channels
template = self.model.get_template(template_id)
File "/home/aurelien/dev/miniconda3/envs/phy2/lib/python3.7/site-packages/phylib/io/model.py", line 855, in get_template
return self._get_template_dense(template_id, channel_ids=channel_ids)
File "/home/aurelien/dev/miniconda3/envs/phy2/lib/python3.7/site-packages/phylib/io/model.py", line 796, in _get_template_dense
template = self._unwhiten(template_w).astype(np.float32)
File "/home/aurelien/dev/miniconda3/envs/phy2/lib/python3.7/site-packages/phylib/io/model.py", line 688, in _unwhiten
assert x.shape[1] == mat.shape[0]
AssertionError
This error is the one gotten with the samples data set provided by yass. The error is similar with my dataset. I'm using the newest version of phy2 (re-installed this morning) using the git clone method and pip install -e .