Skip to content

Commit

Permalink
doc updates [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Circle Ci committed Jul 31, 2024
1 parent 33c1480 commit 7904cf3
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 109 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
87 changes: 11 additions & 76 deletions dev/_modules/hnn_core/cell_response.html

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dev/_modules/hnn_core/viz.html
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,10 @@ <h1>Source code for hnn_core.viz</h1><div class="highlight"><pre>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">color</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
<span class="n">color_cycle</span> <span class="o">=</span> <span class="n">cycle</span><span class="p">(</span><span class="n">color</span><span class="p">)</span>

<span class="n">bins</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linspace</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">spike_times</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="mi">50</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">cell_response</span><span class="o">.</span><span class="n">times</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">bins</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linspace</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">cell_response</span><span class="o">.</span><span class="n">times</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="mi">50</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">bins</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linspace</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">spike_times</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="mi">50</span><span class="p">)</span>

<span class="c1"># Create dictionary to aggregate spike times that have the same spike_label</span>
<span class="n">spike_type_times</span> <span class="o">=</span> <span class="p">{</span><span class="n">spike_label</span><span class="p">:</span> <span class="nb">list</span><span class="p">()</span> <span class="k">for</span>
Expand Down
3 changes: 3 additions & 0 deletions dev/_sources/whats_new.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ Changelog
and interpolation method to smoothen CSD plot,
by `Katharina Duecker`_ in :gh:`815`

- Cleaned up internal logic in :class:`~hnn_core.CellResponse`,
by `Nick Tolley`_ in :gh:`647`.

Bug
~~~
- Fix inconsistent connection mapping from drive gids to cell gids, by
Expand Down
37 changes: 8 additions & 29 deletions dev/generated/hnn_core.CellResponse.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
aria-labelledby="dLabelLocalToc"><ul>
<li><a class="reference internal" href="#">hnn_core.CellResponse</a><ul>
<li><a class="reference internal" href="#hnn_core.CellResponse"><code class="docutils literal notranslate"><span class="pre">CellResponse</span></code></a><ul>
<li><a class="reference internal" href="#hnn_core.CellResponse.__getitem__"><code class="docutils literal notranslate"><span class="pre">CellResponse.__getitem__()</span></code></a></li>
<li><a class="reference internal" href="#hnn_core.CellResponse.__repr__"><code class="docutils literal notranslate"><span class="pre">CellResponse.__repr__()</span></code></a></li>
<li><a class="reference internal" href="#hnn_core.CellResponse.mean_rates"><code class="docutils literal notranslate"><span class="pre">CellResponse.mean_rates()</span></code></a></li>
<li><a class="reference internal" href="#hnn_core.CellResponse.plot_spikes_hist"><code class="docutils literal notranslate"><span class="pre">CellResponse.plot_spikes_hist()</span></code></a></li>
Expand Down Expand Up @@ -161,14 +160,14 @@ <h1>hnn_core.CellResponse<a class="headerlink" href="#hnn-core-cellresponse" tit
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>spike_times</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float, shape | None</span></dt><dd><p>Each element of the outer list is a trial.
<dt><strong>spike_times</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float | None</span></dt><dd><p>Each element of the outer list is a trial.
The inner list contains the time stamps of spikes.</p>
</dd>
<dt><strong>spike_gids</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float, shape | None</span></dt><dd><p>Each element of the outer list is a trial.
<dt><strong>spike_gids</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float | None</span></dt><dd><p>Each element of the outer list is a trial.
The inner list contains the cell IDs of neurons that
spiked.</p>
</dd>
<dt><strong>spike_types</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float, shape | None</span></dt><dd><p>Each element of the outer list is a trial.
<dt><strong>spike_types</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float | None</span></dt><dd><p>Each element of the outer list is a trial.
The inner list contains the type of spike (e.g., evprox1
or L2_pyramidal) that occurred at the corresponding time stamp.
Each gid corresponds to a type via Network().gid_ranges.</p>
Expand All @@ -183,22 +182,22 @@ <h1>hnn_core.CellResponse<a class="headerlink" href="#hnn-core-cellresponse" tit
</dd>
<dt class="field-even">Attributes<span class="colon">:</span></dt>
<dd class="field-even"><dl class="simple">
<dt><strong>spike_times</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float, shape</span></dt><dd><p>Each element of the outer list is a trial.
<dt><strong>spike_times</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float</span></dt><dd><p>Each element of the outer list is a trial.
The inner list contains the time stamps of spikes.</p>
</dd>
<dt><strong>spike_gids</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float, shape</span></dt><dd><p>Each element of the outer list is a trial.
<dt><strong>spike_gids</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float</span></dt><dd><p>Each element of the outer list is a trial.
The inner list contains the cell IDs of neurons that
spiked.</p>
</dd>
<dt><strong>spike_types</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float, shape</span></dt><dd><p>Each element of the outer list is a trial.
<dt><strong>spike_types</strong><span class="classifier">list (n_trials,) of list (n_spikes,) of float</span></dt><dd><p>Each element of the outer list is a trial.
The inner list contains the type of spike (e.g., evprox1
or L2_pyramidal) that occurred at the corresponding time stamp.
Each gid corresponds to a type via Network::gid_ranges.</p>
</dd>
<dt><strong>vsec</strong><span class="classifier">list (n_trials,) of dict, shape</span></dt><dd><p>Each element of the outer list is a trial.
<dt><strong>vsec</strong><span class="classifier">list (n_trials,) of dict</span></dt><dd><p>Each element of the outer list is a trial.
Dictionary indexed by gids containing voltages for cell sections.</p>
</dd>
<dt><strong>isec</strong><span class="classifier">list (n_trials,) of dict, shape</span></dt><dd><p>Each element of the outer list is a trial.
<dt><strong>isec</strong><span class="classifier">list (n_trials,) of dict</span></dt><dd><p>Each element of the outer list is a trial.
Dictionary indexed by gids containing currents for cell sections.</p>
</dd>
<dt><strong>ca</strong><span class="classifier">list (n_trials,) of dict, shape</span></dt><dd><p>Each element of the outer list is a trial.
Expand Down Expand Up @@ -231,26 +230,6 @@ <h1>hnn_core.CellResponse<a class="headerlink" href="#hnn-core-cellresponse" tit
</tr>
</tbody>
</table>
<dl class="py method">
<dt class="sig sig-object py" id="hnn_core.CellResponse.__getitem__">
<span class="sig-name descname"><span class="pre">__getitem__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">gid_item</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/hnn_core/cell_response.html#CellResponse.__getitem__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#hnn_core.CellResponse.__getitem__" title="Permalink to this definition"></a></dt>
<dd><p>Returns a CellResponse object with a copied subset filtered by gid.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>gid_item</strong><span class="classifier">int | slice</span></dt><dd><p>Subset of gids .</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><dl class="simple">
<dt><strong>cell_response</strong><span class="classifier">instance of CellResponse</span></dt><dd><p>See below for use cases.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="hnn_core.CellResponse.__repr__">
<span class="sig-name descname"><span class="pre">__repr__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/hnn_core/cell_response.html#CellResponse.__repr__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#hnn_core.CellResponse.__repr__" title="Permalink to this definition"></a></dt>
Expand Down
2 changes: 0 additions & 2 deletions dev/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ <h1 id="index">Index</h1>
<h2 id="_">_</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="generated/hnn_core.CellResponse.html#hnn_core.CellResponse.__getitem__">__getitem__() (hnn_core.CellResponse method)</a>
</li>
<li><a href="generated/hnn_core.Cell.html#hnn_core.Cell.__repr__">__repr__() (hnn_core.Cell method)</a>

<ul>
Expand Down
Binary file modified dev/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion dev/searchindex.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dev/whats_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ <h3>Changelog<a class="headerlink" href="#changelog" title="Permalink to this he
<li><p>Added features to <code class="xref py py-func docutils literal notranslate"><span class="pre">plot_csd()</span></code>: to set color of sinks and sources, range of the colormap,
and interpolation method to smoothen CSD plot,
by <a class="reference external" href="https://github.com/katduecker">Katharina Duecker</a> in <a class="reference external" href="https://github.com/jonescompneurolab/hnn-core/issues/815">#815</a></p></li>
<li><p>Cleaned up internal logic in <a class="reference internal" href="generated/hnn_core.CellResponse.html#hnn_core.CellResponse" title="hnn_core.CellResponse"><code class="xref py py-class docutils literal notranslate"><span class="pre">CellResponse</span></code></a>,
by <a class="reference external" href="https://github.com/ntolley">Nick Tolley</a> in <a class="reference external" href="https://github.com/jonescompneurolab/hnn-core/issues/647">#647</a>.</p></li>
</ul>
</section>
<section id="bug">
Expand Down

0 comments on commit 7904cf3

Please sign in to comment.