-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·183 lines (179 loc) · 10.5 KB
/
Copy pathindex.html
File metadata and controls
executable file
·183 lines (179 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Extra meta tags -->
<meta property="og:image" content="static/icon.png"/>
<meta name="description" content="visualize how the psth of three neurons produces population activity">
<meta name="author" content="mobeets">
<link rel="icon" href="static/favicon.ico">
<title>Visualizing neural population activity</title>
<!-- CSS -->
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<link href="static/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<link rel="stylesheet" href="static/css/styles.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Javascript -->
<script src="static/js/jquery.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/plotly.min.js"></script>
<script src="static/js/main.js"></script>
<link href='https://fonts.googleapis.com/css?family=Raleway:400,700,700italic,400italic' rel='stylesheet' type='text/css'>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="https://mobeets.github.io">mobeets</a>
<p class="navbar-text">Visualizing neural population activity</p>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/mobeets/psth-to-population"><i class="fa fa-github" aria-hidden="true"></i> View on Github</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container">
<div class="main-container">
<h1>Visualizing neural population activity</h1>
<div class="row">
<div class="col-md-4"></div>
<p class="lead col-md-4">View the time-varying activity of three neurons in population space</p>
</div>
<div class="row">
<h3>From neuron to population</h3>
<p style="text-align: left;">
Traditionally, when we want to assess how a single neuron responds to a stimulus, we can plot its PSTH, or its average firing rate over time. However, neurons don't act in isolation, so it's important to think about how these PSTHs look across a population of multiple neurons. One way to view this so-called "population activity" is to plot the firing rate of each neuron on its own axis. (If you have more than three neurons, you could first apply a dimensionality reduction technique like PCA and plot the activity of the first three prinicipal components.)
</p>
<p style="text-align: left;">
Visualizing population activity can reveal interesting geometries that aren't obvious just from the PSTHs of individual neurons. You can play around with the parameters of three neurons' PSTHs below and see how the resulting population picture changes. Click the buttons for presets to make the activity look like a <span class="snowflake psth-preset">snowflake</span>, a <span class="spider psth-preset">spider</span>, a <span class="gramophone psth-preset">gramophone</span>, or a <span class="head-massager psth-preset">head massager</span>. Click and drag the 3D plot to change the perspective. An explanation of the parameters is at the bottom of the page.
</p>
</div>
<!-- r(t, \theta) &= \max\left[0, r_{spont} + r_{evoked}(t, \theta) \right]\\
r_{evoked}(t, \theta) &= g_{\tau_1}(t)*r_{generic} + g_{\tau_2}(t)*r_{stim}*\cos(\theta - \theta_{pref}) -->
<!-- 1. Make presets into buttons -->
<!-- 2. Add parameter values to controls -->
<!-- 3. Organize parameters better (especially with wide screen) -->
<!-- 4. Add actual neural data example images below -->
<div class="container">
<div class="row">
<!-- <div id="graph"></div> -->
<!-- <div id="psths"></div> -->
</div>
<div class="row">
<div class="col-md-6"><div id="graph"></div></div>
<div class="col-md-6"><div id="psths"></div></div>
</div>
<div class="row btn-metagroup">
<!-- <div class="col-md-2"></div> -->
<div class="col-md-12">
<div class="btn-group mr-2 btn-slider" role="group" aria-label="Second group">
<div class="slider-container">
Neuron 1<br>θ_pref: <span id="value-thetapref-1"></span><input type="range" min="0" max="7" value="0" class="slider" id="slider-thetapref-1">
</div>
</div>
<div class="btn-group mr-2 btn-slider" role="group" aria-label="Second group">
<div class="slider-container">
Neuron 2<br>θ_pref: <span id="value-thetapref-2"></span><input type="range" min="0" max="7" value="0" class="slider" id="slider-thetapref-2">
</div>
</div>
<div class="btn-group mr-2 btn-slider" role="group" aria-label="Second group">
<div class="slider-container">
Neuron 3<br>θ_pref: <span id="value-thetapref-3"></span><input type="range" min="0" max="7" value="0" class="slider" id="slider-thetapref-3">
</div>
</div>
<div class="btn-group mr-2 btn-slider" role="group" aria-label="Second group">
<div class="slider-container">
Spontaneous rate<br>(r_spont): <span id="value-r-spont"></span><input type="range" min="0" max="9" value="0" class="slider" id="slider-a">
</div>
</div>
<div class="btn-group mr-2 btn-slider" role="group" aria-label="Second group">
<div class="slider-container">
Generic evoked rate<br>(r_generic): <span id="value-r-generic"></span><input type="range" min="0" max="9" value="0" class="slider" id="slider-ci">
</div>
</div>
<div class="btn-group mr-2 btn-slider" role="group" aria-label="Second group">
<div class="slider-container">
Generic time const.<br>(τ_1): <span id="value-tau-generic"></span><input type="range" min="1" max="12" value="1" class="slider" id="slider-ci-tau">
</div>
</div>
<div class="btn-group mr-2 btn-slider" role="group" aria-label="Second group">
<div class="slider-container">
Stimulus gain<br>(r_stim): <span id="value-r-stim"></span><input type="range" min="0" max="9" value="0" class="slider" id="slider-b">
</div>
</div>
<div class="btn-group mr-2 btn-slider" role="group" aria-label="Second group">
<div class="slider-container">
Stimulus time const.<br>(τ_2): <span id="value-tau-stim"></span><input type="range" min="1" max="12" value="1" class="slider" id="slider-tau">
</div>
</div>
<div class="btn-group mr-2 btn-slider" role="group" aria-label="Second group">
<div class="slider-container">
Viewing PSTH<br>for: <span id="value-stim-index"></span><input type="range" min="0" max="7" value="0" class="slider" id="slider-stim-index">
</div>
</div>
<div class="btn-group mr-2" role="group" aria-label="Third group">
<button type="button" class="btn btn-preset btn-outline-secondary snowflake">Snowflake</button>
</div>
<div class="btn-group mr-2" role="group" aria-label="Third group">
<button type="button" class="btn btn-preset btn-outline-secondary spider">Spider</button>
</div>
<div class="btn-group mr-2" role="group" aria-label="Third group">
<button type="button" class="btn btn-preset btn-outline-secondary gramophone">Gramophone</button>
</div>
<div class="btn-group mr-2" role="group" aria-label="Third group">
<button type="button" class="btn btn-preset btn-outline-secondary head-massager">Head massager</button>
</div>
</div>
</div>
<br>
<div class="row btn-metagroup">
</div>
<div class="row">
<!-- <div id="graph"></div> -->
<!-- <div id="psths"></div> -->
</div>
<div class="row">
<h3>Modeling assumptions</h3>
<p style="text-align: left;">
Above, each neuron's time-varying firing rate (or PSTH) in response to a stimulus θ is modeled as:
</p>
<p style="text-align: left;">
<img src="static/eqns2.png" height="50"/>
</p>
<p style="text-align: left;">
The idea is that when a stimulus (θ) is shown, a neuron's firing rate gradually increases from spontaneous firing (r_spont) to evoked firing (r_evoked). The evoked firing has two components: a generic, untuned response (r_generic), and a cosine-tuned response (r_stim). Above, g_τ1(t) and g_τ1(t) are gain terms that ramp up from 0 to 1, so that τ_1 and τ_2 control how quickly the firing rate responds to the stimulus.
</p>
<p style="text-align: left;">
Each neuron has its own preferred stimulus (θ_pref): <span id="stimpref1">45</span>º, <span id="stimpref2">135</span>º, and <span id="stimpref3">180</span>º, respectively. You can change these preferred stimuli as well as the other PSTH parameters with the controls above.
</p>
</div>
<div class="row">
<h3>Actual neural data</h3>
<p style="text-align: left;">
Coming soon.
</p>
</div>
<br>
<hr>
</div>
</div>
</body>
</html>