Installation¶
Create a virtual environment¶
spike2py works with Python 3.9 or above. It is recommended you create a dedicated Python environment before you install spike2py. In your project directory, run the following commands:
python -m venv env
Then activate your new virtual environment.
On macOS and Linux:
source env/bin/activate
On Windows:
.\env\Scripts\activate
Install spike2py and its dependencies¶
With your virtual environment activated, run the following command:
pip install spike2py
Testing your spike2py installation¶
With your virtual environment activated, start Python and type the following:
>>> import spike2py
>>> spike2py.demo.test_install()
Figure 1: sample.Flow.plot()
Figure 2: sample.Flow.lowpass(cutoff=4, order=8).plot()
Figure 3: sample.Volume.plot()
Figure 4: sample.Volume.remove_mean().linear_detrend().plot()
Figure 5: sample.plot()
You should see a series of five figures.