Skip to content

scientisst/lab-guides-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction to Biosignal Acquisition

ScientISST

Hi! Before attending this workshop, we would like to make sure you have Anaconda (python) installed in your computer with the required software up and running. Please, don't forget to bring your laptop on the 1st of April.

First, check if you have Anaconda Navigator (windows) or Anaconda (mac). If not, go to part 1 below. Otherwise, open Anaconda Prompt (windows) or the terminal (mac) and type:

python --version

If you get:

Python 3.X.X

Skip to part 2

1. Anaconda Installation

  1. Go to https://www.anaconda.com/products/individual and download the Individual (open source) package for your OS system (windows, Mac or Linux)

  2. Select your installation folder, hit next and for Advanced Options select Register Anaconda3 as my default Python 3.X

Anaconda options

2. Create a Conda Environment

  1. First things first, you need to create or choose an existing folder where you'll store the software. I chose this one:
C:\Users\ScientISST\SBE
  1. Then, open Anaconda Prompt (windows) or the terminal (mac) and create a virtual environment:
conda create --name scientisst-sbe-env

(don't close the terminal yet)

3. Installing ScientISST Sense API and Biosppy

  1. Activate your conda environment by running:
conda activate scientisst-sbe-env
  1. To download the required packages, you need to install pip by running:
conda install pip

Note: from now on, when installing the packages, if the following appears:

Procced ([y]/n)?

Just type "y" and hit enter to continue.

  1. To download our respository, you need to install Git:
conda install git
  1. Now we can add the python packages that we'll need:
conda install numpy==1.16.5
conda install pandas
pip install pyserial
pip install biosppy
pip install pylsl
conda install pyqtograph
  1. Remember that folder we created before? We need it to install the ScientISST Sense API. Run:
git clone https://github.com/scientisst/scientisst-sense-api-python.git <path to your folder>

So, in my case I run:

git clone https://github.com/scientisst/scientisst-sense-api-python.git "C:\Users\ScientISST\SBE"

If you're using mac and want to know your folder's path, you can open a new terminal and drag the folder over it. The output string on the terminal is your path.

4. Opening the jupyter notebook

  1. Close the Anaconda Prompt (windows) or terminal (mac) and Anaconda.

  2. Reopen Anaconda and, on the top bar, select your environment:



Anaconda environment

  1. Once inside the environment, scroll to the Jupyter Notebook, install it and launch it!

4. Checking the setup

Let's check if everything's working!

In the Jupyter Notebook (web browser), navigate to your folder and add a new python file inside. Run the following:

from biosppy import storage
from biosppy.signals import ecg

signal, mdata = storage.load_txt('./examples/ecg.txt')

This should output the error:

- FileNotFoundError: [Errno 2] No such file or directory: (...)

Now run the following:

%run sense.py

This should say:

- error: No paired device found

Don't worry, it just means we have no files and devices nearby right now. That's all. See you in the workshop!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published