Skip to content

Commit a704411

Browse files
Merge branch 'main' of https://www.github.com/mouseland/rastermap into main
2 parents 09731da + 95d6051 commit a704411

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[![GitHub forks](https://img.shields.io/github/forks/MouseLand/rastermap?style=social)](https://github.com/MouseLand/rastermap/)
1414

1515

16-
Rastermap is a discovery algorithm for neural data. The algorithm was written by Carsen Stringer and Marius Pachitariu. For support, please open an [issue](https://github.com/MouseLand/rastermap/issues). Please see install instructions [below](README.md/#Installation). If you use Rastermap in your work, please cite the [paper](https://www.biorxiv.org/content/10.1101/2023.07.25.550571v1):
16+
Rastermap is a discovery algorithm for neural data. The algorithm was written by Carsen Stringer and Marius Pachitariu. For support, please open an [issue](https://github.com/MouseLand/rastermap/issues). Please see install instructions [below](README.md/#Installation). If you use Rastermap or analysis code in this repo in your work, please cite the [paper](https://www.biorxiv.org/content/10.1101/2023.07.25.550571v1):
1717

1818
Stringer C., Zhong L., Syeda A., Du F., Kesa M., & Pachitariu M. (2023). Rastermap: a discovery method for neural population recordings. *bioRxiv* 2023.07.25.550571; doi: https://doi.org/10.1101/2023.07.25.550571
1919

@@ -25,7 +25,7 @@ Rastermap runs in python 3.8+ and has a graphical user interface (GUI) for runni
2525
* [rastermap_interactive.ipynb](notebooks/rastermap_interactive.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/rastermap/blob/main/notebooks/rastermap_interactive.ipynb) allows running Rastermap in an interactive way without a local installation
2626
* [tutorial.ipynb](notebooks/tutorial.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/rastermap/blob/main/notebooks/tutorial.ipynb) is a guided tutorial for integrating rastermap and facemap to visualize behavioral representations. See the student/teacher versions [here](https://github.com/MouseLand/course-materials/tree/main/behavior_encoding).
2727

28-
All demo data available [here](https://osf.io/xn4cm/).
28+
Also all notebooks to analyze the data and create the figures in the paper are [here](paper/). All data available [here](https://osf.io/xn4cm/).
2929

3030
Here is what the output looks like for a segment of a mesoscope recording in a mouse during spontaneous activity (3.2Hz sampling rate), compared to random neural sorting:
3131

@@ -45,7 +45,7 @@ Linux, Windows and Mac OS are supported for running the code. For running the gr
4545

4646
### Instructions
4747

48-
Recommended to install an [Anaconda](https://www.anaconda.com/download/) distribution of Python -- Choose **Python 3.x** and your operating system. Note you might need to use an anaconda prompt (windows) if you did not add anaconda to the path. Open an anaconda prompt / command prompt with **python 3** in the path, then:
48+
We recommend to install a [miniforge](https://github.com/conda-forge/miniforge) (conda-based) distribution of Python. Note you might need to use an anaconda prompt (windows) if you did not add anaconda to the path. Open an anaconda prompt / command prompt with **python 3** in the path, then:
4949

5050
~~~sh
5151
pip install rastermap
@@ -59,13 +59,12 @@ pip install rastermap[gui]
5959
Rastermap has only a few dependencies so you may not need to make a special environment for it
6060
(e.g. it should work in a `suite2p` or `facemap` environment), but if the pip install above does not work,
6161
please follow these instructions:
62-
63-
1. Open an anaconda prompt / command prompt with `conda` for **python 3** in the path.
64-
2. Create a new environment with `conda create --name rastermap python=3.8`. Python 3.9 and 3.10 will likely work fine as well.
62+
63+
1. Open an anaconda prompt / command prompt which has `conda` for **python 3** in the path
64+
3. Create a new environment with `conda create --name rastermap python=3.9`. We recommend python 3.9, but python 3.8, 3.9 and 3.11 will also work.
6565
4. To activate this new environment, run `conda activate rastermap`
66-
5. To install the minimal version of rastermap, run `pip install rastermap`.
67-
6. To install rastermap and the GUI, run `pip install rastermap[gui]`. If you're on a zsh server, you may need to use ' ' around the rastermap[gui] call: `pip install 'rastermap[gui]'`.
68-
66+
5. (option 1) To install rastermap with the GUI, run `python -m pip install rastermap[gui]`. If you're on a zsh server, you may need to use ' ': `python -m pip install 'rastermap[gui]'`.
67+
6. (option 2) To install rastermap without the GUI, run `python -m pip install rastermap`.
6968
To upgrade rastermap (package [here](https://pypi.org/project/rastermap/)), run the following in the environment:
7069

7170
~~~sh
@@ -127,16 +126,14 @@ Short example code snippet for running rastermap:
127126
```
128127
import numpy as np
129128
import matplotlib.pyplot as plt
130-
from rastermap import Rastermap, utils
131-
from scipy.stats import zscore
129+
from rastermap import Rastermap
132130
133131
# spks is neurons by time
134132
spks = np.load("spks.npy").astype("float32")
135-
spks = zscore(spks, axis=1)
136133
137134
# fit rastermap
138135
model = Rastermap(n_PCs=200, n_clusters=100,
139-
locality=0.75, time_lag_window=5).fit(spks, compute_X_embedding=True)
136+
locality=0.75, time_lag_window=5).fit(spks)
140137
y = model.embedding # neurons x 1
141138
isort = model.isort
142139

0 commit comments

Comments
 (0)