Git Product home page Git Product logo

case-studies-python's Introduction

Case-Studies-Python

This repository is a companion to the textbook Case Studies in Neural Data Analysis, by Mark Kramer and Uri Eden. That textbook uses MATLAB to analyze examples of neuronal data. The material here is similar, except that we use Python.

The intended audience is the practicing neuroscientist - e.g., the students, researchers, and clinicians collecting neuronal data in the hospital or lab. The material can get pretty math-heavy, but we've tried to outline the main concepts as directly as possible, with hands-on implementations of all concepts. We focus on only two main types of data: spike trains and electric fields (such as the local field potential [LFP], or electroencephalogram [EEG]). If you're interested in other data (e.g., calcium imaging, or BOLD), you may still find the examples indirectly useful (for example, demonstrations of how to compute and interpret a power spectrum of a signal).

This repository was created by Emily Schlafly and Mark Kramer, with important contributions from Dr. Anthea Cheung.

Thank you to:


Quick start to learning Python for neural data analysis:


Slow start to learning Python for neural data analysis:

There are multiple ways to interact with these notebooks.

  • Simple: Visit the web-formatted version of the notebooks.

  • Intermediate: Open a notebook in Binder and interact with the notebooks through a JupyterHub server. Binder provides an easy interface to interact with this material; read about it in eLife.

  • Advanced: Download the notebooks and run them locally (i.e. on your own computer) in Jupyter. You'll then be able to read, edit and execute the Python code directly in your browser and you can save any changes you make or notes that you want to record. You will need to install Python and we recommend that you configure a Python environment as well.


Install Python

We assume you have installed Python and can get it running on your computer. Some useful references to do so include,

If this is your first time working with Python, using Anaconda is probably a good choice. It provides a simple, graphical interface to start Jupyter.


Configure Python

If you have never used the terminal before, consider using Anaconda Navigator, Anaconda's desktop graphical user interface (GUI).

Once you have installed Anaconda or Miniconda, we recommend setting up an environment to run the notebooks. If you downloaded the repository from Github, then you can run the commands below in your terminal to configure your local environment to match the Binder environment. If you have never used the terminal before, consider using Anaconda Navigator, Anaconda's desktop graphical user interface (GUI). The environment file we use on Binder is located in the binder folder.

# create environment <case-studies>
conda env create --file environment.yml
conda activate case-studies  # activate environment <case-studies>
make config  # configure jupyter in environment

This will ensure that you have all the packages needed to run the notebooks. Note that you can use make clean to remove the changes made during make config.

Finally, whenever you are ready to work with the notebooks, activate your environment and start Jupyter:

conda activate case-studies  # activate python environment
jupyter notebook  # start jupyter in the current location

If you prefer, you can use jupyter lab instead of jupyter notebook.


Contributions

We very much appreciate your contributions to this material. Contribitions may include:

  • Error corrections
  • Suggestions
  • New material to include (please start from this template).

There are two ways to suggest a contribution:

case-studies-python's People

Contributors

eschlaf2 avatar mark-kramer avatar ahccheung avatar anthonytec2 avatar kwcooper avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.