cortex-lab / phy

phy: interactive visualization and manual spike sorting of large-scale ephys data
BSD 3-Clause "New" or "Revised" License
304 stars 155 forks source link

Unable to start template-gui #1252

Closed HoykenM closed 5 months ago

HoykenM commented 5 months ago

Dear,

I used SpikeInterface to spikesort BlackRock data with MountainSort5 and wanted to load the autosorted data in Phy to do further curation. Phy is installed through Pip install. Im doing this on MacOS. I created a phy_folder using the command:

import spikeinterface.exporters as sexp sexp.export_to_phy(wfs, 'phy_folder', verbose=True)

Than, I tried opening the waveforms using the command within the folder containing the params.py file: NAME@MacBook-Pro-van-NAME ~ % cd Documents NAME@MacBook-Pro-van-NAME Documents % cd phy_folder NAME@MacBook-Pro-van-NAME phy_folder % phy template-gui params.py

and also tried NAME@MacBook-Pro-van-NAME phy_folder % phy template-gui /Users/NAME/Documents/phy_folder/params.py

After doing this, I keep on getting the following errors:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/bin/phy", line 5, in from phy.utils.cli import phy File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/phy/init.py", line 17, in from .io.datasets import download_file, download_sample_data File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/phy/io/init.py", line 6, in from .context import Context File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/phy/io/context.py", line 17, in from phy.utils import (_save_json, _load_json, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/phy/utils/init.py", line 6, in from ._misc import _load_json, _save_json, _fullname File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/phy/utils/_misc.py", line 20, in from ._types import _is_integer File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/phy/utils/_types.py", line 18, in _ACCEPTED_ARRAY_DTYPES = (np.float, np.float32, np.float64, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/init.py", line 305, in getattr raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'float'. np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'?

This is the information in params.py: dat_path = r'/Users/NAME/Documents/phy_folder/recording.dat' n_channels_dat = 96 dtype = 'float32' offset = 0 sample_rate = 30000.0 hp_filtered = True

Normal I program in MATLAB and I don't seem to properly understand why Phy is not working as intended. Could anyone help troubleshooting?

Thanks in advance Michael