Repository containing modified cortex-lab/phy clone and additional scripts
- Download https://github.com/mswallac/phytools/blob/master/phytools.zip
- Extract this file to a stable directory (this is where your installation of phy will 'live')
- Download Anaconda here: https://docs.conda.io/en/latest/miniconda.html
- Launch the executable and follow the installation process
- Launch Anaconda Prompt
- conda create -n phy2 python=3.7 pip numpy matplotlib scipy scikit-learn h5py pyqt cython pillow -y
- conda activate phy2
- cd path/to/phytools/phy
- pip install -e .
- cd ../phylib
- pip install -e .
Done!
Next, you'll want to navigate to your data directory (containing params.py), and run: phy template-gui params.py
- Make sure the IPythonView is open in phy!
- Hit 'A' at least once for splitter to work.
- Shortcut key bindings in phy are as follows:
- Outlier rejection plugin (single cluster only)
- Splitter plugin (single cluster only)
- Place event_view.py in C:/Users/(Your Username)/.phy/plugins.
- Edit C:/Users/(Your Username)/.phy/phy_config.py and add 'EventPlugin' to c.TemplateGUI.plugins like so: c.TemplateGUI.plugins = ['EventPlugin'] or c.TemplateGUI.plugins = ['EventPlugin','CCPlugin'] for multiple plugins
For more details on using plugins: https://github.com/cortex-lab/phy/blob/dev/docs/plugins.md
To generate a data directory to use with phy one may use:
- Kilosort output
- JRClust export
Either of these options should produce a bunch of .npy files (x16). You could also add events.csv to enable eventView. params.py should also have been generated using either option. phy.txt is a log file and may also be there.
First, launch the Anaconda prompt.
Next, enter the following commands in the Anaconda prompt:
- cd C:/path/to/params.py
- conda activate phy2 (or whatever the environment name is)
- phy template-gui params.py
dat_path = [r'D:\dl59\20181207\dl59_g0_t100.imec.ap.bin_concat.bin']
n_channels_dat = 385
dtype = 'int16'
offset = 0
sample_rate = 30000.
hp_filtered = False