Skip to content

Commit

Permalink
deploy: bc9f6b0
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Mar 24, 2024
1 parent 69ad75c commit df70890
Show file tree
Hide file tree
Showing 110 changed files with 334 additions and 322 deletions.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/examples/bio_custom/bio_custom.doctree
Binary file not shown.
Binary file modified .doctrees/examples/bio_eventrelated/bio_eventrelated.doctree
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/examples/ecg_heartbeats/ecg_heartbeats.doctree
Binary file not shown.
Binary file modified .doctrees/examples/eda_peaks/eda_peaks.doctree
Binary file not shown.
Binary file modified .doctrees/examples/eeg_complexity/eeg_complexity.doctree
Binary file not shown.
Binary file modified .doctrees/examples/eeg_microstates/eeg_microstates.doctree
Binary file not shown.
Binary file modified .doctrees/examples/eeg_power/eeg_power.doctree
Binary file not shown.
Binary file modified .doctrees/examples/eog_analyze/eog_analyze.doctree
Binary file not shown.
Binary file modified .doctrees/examples/misc_fit_function/misc_fit_function.doctree
Binary file not shown.
Binary file modified .doctrees/examples/signal_simulation/signal_simulation.doctree
Binary file not shown.
Binary file modified .doctrees/functions/benchmark.doctree
Binary file not shown.
Binary file modified .doctrees/functions/bio.doctree
Binary file not shown.
Binary file modified .doctrees/functions/complexity.doctree
Binary file not shown.
Binary file modified .doctrees/functions/ecg.doctree
Binary file not shown.
Binary file modified .doctrees/functions/eda.doctree
Binary file not shown.
Binary file modified .doctrees/functions/emg.doctree
Binary file not shown.
Binary file modified .doctrees/functions/markov.doctree
Binary file not shown.
Binary file modified .doctrees/functions/misc.doctree
Binary file not shown.
Binary file modified .doctrees/functions/ppg.doctree
Binary file not shown.
Binary file modified .doctrees/functions/rsp.doctree
Binary file not shown.
Binary file modified .doctrees/functions/signal.doctree
Binary file not shown.
Binary file modified .doctrees/functions/stats.doctree
Binary file not shown.
Binary file modified .doctrees/studies/complexity_eeg.doctree
Binary file not shown.
Binary file modified .doctrees/studies/ecg_benchmark.doctree
Binary file not shown.
Binary file modified .doctrees/studies/eog_blinktemplate.doctree
Binary file not shown.
Binary file modified .doctrees/studies/erp_gam.doctree
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
31 changes: 19 additions & 12 deletions _modules/neurokit2/data/read_acqknowledge.html
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ <h1>Source code for neurokit2.data.read_acqknowledge</h1><div class="highlight">
<span></span><span class="c1"># -*- coding: utf-8 -*-</span>
<span class="kn">import</span> <span class="nn">os</span>

<span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">Counter</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>

Expand All @@ -386,9 +388,7 @@ <h1>Source code for neurokit2.data.read_acqknowledge</h1><div class="highlight">

<div class="viewcode-block" id="read_acqknowledge">
<a class="viewcode-back" href="../../../functions/data.html#neurokit2.data.read_acqknowledge">[docs]</a>
<span class="k">def</span> <span class="nf">read_acqknowledge</span><span class="p">(</span>
<span class="n">filename</span><span class="p">,</span> <span class="n">sampling_rate</span><span class="o">=</span><span class="s2">&quot;max&quot;</span><span class="p">,</span> <span class="n">resample_method</span><span class="o">=</span><span class="s2">&quot;interpolation&quot;</span><span class="p">,</span> <span class="n">impute_missing</span><span class="o">=</span><span class="kc">True</span>
<span class="p">):</span>
<span class="k">def</span> <span class="nf">read_acqknowledge</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">sampling_rate</span><span class="o">=</span><span class="s2">&quot;max&quot;</span><span class="p">,</span> <span class="n">resample_method</span><span class="o">=</span><span class="s2">&quot;interpolation&quot;</span><span class="p">,</span> <span class="n">impute_missing</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;**Read and format a BIOPAC&#39;s AcqKnowledge file into a pandas&#39; dataframe**</span>

<span class="sd"> The function outputs both the dataframe and the sampling rate (retrieved from the</span>
Expand Down Expand Up @@ -448,10 +448,7 @@ <h1>Source code for neurokit2.data.read_acqknowledge</h1><div class="highlight">
<span class="n">filename</span> <span class="o">+=</span> <span class="s2">&quot;.acq&quot;</span>

<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">False</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
<span class="s2">&quot;NeuroKit error: read_acqknowledge(): couldn&#39;t&quot;</span>
<span class="s2">&quot; find the following file: &quot;</span> <span class="o">+</span> <span class="n">filename</span>
<span class="p">)</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;NeuroKit error: read_acqknowledge(): couldn&#39;t&quot;</span> <span class="s2">&quot; find the following file: &quot;</span> <span class="o">+</span> <span class="n">filename</span><span class="p">)</span>

<span class="c1"># Read file</span>
<span class="n">file</span> <span class="o">=</span> <span class="n">bioread</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
Expand All @@ -463,24 +460,34 @@ <h1>Source code for neurokit2.data.read_acqknowledge</h1><div class="highlight">
<span class="n">freq_list</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">file</span><span class="o">.</span><span class="n">named_channels</span><span class="p">[</span><span class="n">channel</span><span class="p">]</span><span class="o">.</span><span class="n">samples_per_second</span><span class="p">)</span>
<span class="n">sampling_rate</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">max</span><span class="p">(</span><span class="n">freq_list</span><span class="p">)</span>

<span class="c1"># Counter for checking duplicate channel names</span>
<span class="n">channel_counter</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">()</span>

<span class="c1"># Loop through channels</span>
<span class="n">data</span> <span class="o">=</span> <span class="p">{}</span>
<span class="k">for</span> <span class="n">channel</span> <span class="ow">in</span> <span class="n">file</span><span class="o">.</span><span class="n">named_channels</span><span class="p">:</span>
<span class="n">signal</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">file</span><span class="o">.</span><span class="n">named_channels</span><span class="p">[</span><span class="n">channel</span><span class="p">]</span><span class="o">.</span><span class="n">data</span><span class="p">)</span>
<span class="k">for</span> <span class="n">channel_num</span><span class="p">,</span> <span class="n">channel</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">file</span><span class="o">.</span><span class="n">channels</span><span class="p">):</span>
<span class="n">signal</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">file</span><span class="o">.</span><span class="n">channels</span><span class="p">[</span><span class="n">channel_num</span><span class="p">]</span><span class="o">.</span><span class="n">data</span><span class="p">)</span>

<span class="c1"># Fill signal interruptions</span>
<span class="k">if</span> <span class="n">impute_missing</span> <span class="ow">is</span> <span class="kc">True</span> <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">isnan</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">signal</span><span class="p">)):</span>
<span class="n">signal</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">signal</span><span class="p">)</span><span class="o">.</span><span class="n">fillna</span><span class="p">(</span><span class="n">method</span><span class="o">=</span><span class="s2">&quot;pad&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">values</span>

<span class="c1"># Resample if necessary</span>
<span class="k">if</span> <span class="n">file</span><span class="o">.</span><span class="n">named_channels</span><span class="p">[</span><span class="n">channel</span><span class="p">]</span><span class="o">.</span><span class="n">samples_per_second</span> <span class="o">!=</span> <span class="n">sampling_rate</span><span class="p">:</span>
<span class="k">if</span> <span class="n">file</span><span class="o">.</span><span class="n">channels</span><span class="p">[</span><span class="n">channel_num</span><span class="p">]</span><span class="o">.</span><span class="n">samples_per_second</span> <span class="o">!=</span> <span class="n">sampling_rate</span><span class="p">:</span>
<span class="n">signal</span> <span class="o">=</span> <span class="n">signal_resample</span><span class="p">(</span>
<span class="n">signal</span><span class="p">,</span>
<span class="n">sampling_rate</span><span class="o">=</span><span class="n">file</span><span class="o">.</span><span class="n">named_channels</span><span class="p">[</span><span class="n">channel</span><span class="p">]</span><span class="o">.</span><span class="n">samples_per_second</span><span class="p">,</span>
<span class="n">sampling_rate</span><span class="o">=</span><span class="n">file</span><span class="o">.</span><span class="n">channels</span><span class="p">[</span><span class="n">channel_num</span><span class="p">]</span><span class="o">.</span><span class="n">samples_per_second</span><span class="p">,</span>
<span class="n">desired_sampling_rate</span><span class="o">=</span><span class="n">sampling_rate</span><span class="p">,</span>
<span class="n">method</span><span class="o">=</span><span class="n">resample_method</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">data</span><span class="p">[</span><span class="n">channel</span><span class="p">]</span> <span class="o">=</span> <span class="n">signal</span>

<span class="c1"># If there is a duplicate channel name, append a number</span>
<span class="k">if</span> <span class="n">channel_counter</span><span class="p">[</span><span class="n">channel</span><span class="o">.</span><span class="n">name</span><span class="p">]</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">data</span><span class="p">[</span><span class="n">channel</span><span class="o">.</span><span class="n">name</span><span class="p">]</span> <span class="o">=</span> <span class="n">signal</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">data</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">channel</span><span class="o">.</span><span class="n">name</span><span class="si">}</span><span class="s2"> (</span><span class="si">{</span><span class="n">channel_counter</span><span class="p">[</span><span class="n">channel</span><span class="o">.</span><span class="n">name</span><span class="p">]</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">signal</span>

<span class="n">channel_counter</span><span class="p">[</span><span class="n">channel</span><span class="o">.</span><span class="n">name</span><span class="p">]</span> <span class="o">+=</span> <span class="mi">1</span>

<span class="c1"># Sanitize lengths</span>
<span class="n">lengths</span> <span class="o">=</span> <span class="p">[]</span>
Expand Down
11 changes: 8 additions & 3 deletions examples/bio_custom/bio_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,11 @@ <h1>Customize your Processing Pipeline<a class="headerlink" href="#customize-you
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Matplotlib is building the font cache; this may take a moment.
</pre></div>
</div>
</div>
</div>
<div class="cell tag_remove-input docutils container">
</div>
Expand All @@ -487,7 +492,7 @@ <h2>The Default NeuroKit processing pipeline<a class="headerlink" href="#the-def
</div>
</div>
<div class="cell_output docutils container">
<img alt="../../_images/6981a23e80822a84d85e1917eeea785c9455beb3220b527b3c74ae0ebb39da95.png" src="../../_images/6981a23e80822a84d85e1917eeea785c9455beb3220b527b3c74ae0ebb39da95.png" />
<img alt="../../_images/dc469ba48ff87380cb3ebf306a2a26772a99f14e1d812432750132b9e03d8144.png" src="../../_images/dc469ba48ff87380cb3ebf306a2a26772a99f14e1d812432750132b9e03d8144.png" />
</div>
</div>
</section>
Expand Down Expand Up @@ -535,7 +540,7 @@ <h2>Building your own <code class="docutils literal notranslate"><span class="pr
</div>
</div>
<div class="cell_output docutils container">
<img alt="../../_images/116ae1c7b99c1a4d2d2850898d8304bb90673ccf471701fa521fe34895db61dc.png" src="../../_images/116ae1c7b99c1a4d2d2850898d8304bb90673ccf471701fa521fe34895db61dc.png" />
<img alt="../../_images/1318a7ecac4573b3293cfc8afd2c32f7ce1f67a3b5c457e5bad2a2c7e635ef66.png" src="../../_images/1318a7ecac4573b3293cfc8afd2c32f7ce1f67a3b5c457e5bad2a2c7e635ef66.png" />
</div>
</div>
</section>
Expand Down Expand Up @@ -627,7 +632,7 @@ <h2>Customize even more!<a class="headerlink" href="#customize-even-more" title=
</div>
</div>
<div class="cell_output docutils container">
<img alt="../../_images/c3c0f87face04686ab23eab979ea9338f76197d59bb8b8ea7d65f18479f5431f.png" src="../../_images/c3c0f87face04686ab23eab979ea9338f76197d59bb8b8ea7d65f18479f5431f.png" />
<img alt="../../_images/269bc5f6c9c50e281340b2f6e22874b017a7fc5b7dcd81106689d911f017907e.png" src="../../_images/269bc5f6c9c50e281340b2f6e22874b017a7fc5b7dcd81106689d911f017907e.png" />
</div>
</div>
<p>This doesn’t look bad :) <strong>Can you do better?</strong></p>
Expand Down
8 changes: 4 additions & 4 deletions examples/bio_eventrelated/bio_eventrelated.html
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ <h2>Find Events<a class="headerlink" href="#find-events" title="Link to this hea
</div>
</div>
<div class="cell_output docutils container">
<img alt="../../_images/304768ca7c098318e5961c3db53c993bf59fc330501fbaf485041bb34e25352a.png" src="../../_images/304768ca7c098318e5961c3db53c993bf59fc330501fbaf485041bb34e25352a.png" />
<img alt="../../_images/7d9439d1b96f51b14941572097febcea255b0e23ac04101fac7f21d576f3b417.png" src="../../_images/7d9439d1b96f51b14941572097febcea255b0e23ac04101fac7f21d576f3b417.png" />
</div>
</div>
<p>The output of <a class="reference external" href="https://neuropsychology.github.io/NeuroKit/functions/functions_events.html#events-plot">events_plot()</a> shows the corresponding events in the signal, with the blue dashed line representing a Negative event and red dashed line representing a Neutral event.</p>
Expand Down Expand Up @@ -638,11 +638,11 @@ <h2>Manually Extract Event Related Features<a class="headerlink" href="#manually
</div>
</div>
<div class="cell_output docutils container">
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>C:\Users\runneradmin\AppData\Local\Temp\ipykernel_5580\4246861920.py:12: FutureWarning: The behavior of obj[i:j] with a float-dtype index is deprecated. In a future version, this will be treated as positional instead of label-based. For label-based slicing, use obj.loc[i:j] instead
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>C:\Users\runneradmin\AppData\Local\Temp\ipykernel_928\4246861920.py:12: FutureWarning: The behavior of obj[i:j] with a float-dtype index is deprecated. In a future version, this will be treated as positional instead of label-based. For label-based slicing, use obj.loc[i:j] instead
ecg_mean = epoch[&quot;ECG_Rate&quot;][0:4].mean() # Mean heart rate in the 0-4 seconds
C:\Users\runneradmin\AppData\Local\Temp\ipykernel_5580\4246861920.py:18: FutureWarning: The behavior of obj[i:j] with a float-dtype index is deprecated. In a future version, this will be treated as positional instead of label-based. For label-based slicing, use obj.loc[i:j] instead
C:\Users\runneradmin\AppData\Local\Temp\ipykernel_928\4246861920.py:18: FutureWarning: The behavior of obj[i:j] with a float-dtype index is deprecated. In a future version, this will be treated as positional instead of label-based. For label-based slicing, use obj.loc[i:j] instead
rsp_rate = epoch[&quot;RSP_Rate&quot;][0:6].mean() # Longer window for RSP that has a slower dynamic
C:\Users\runneradmin\AppData\Local\Temp\ipykernel_5580\4246861920.py:24: FutureWarning: The behavior of obj[i:j] with a float-dtype index is deprecated. In a future version, this will be treated as positional instead of label-based. For label-based slicing, use obj.loc[i:j] instead
C:\Users\runneradmin\AppData\Local\Temp\ipykernel_928\4246861920.py:24: FutureWarning: The behavior of obj[i:j] with a float-dtype index is deprecated. In a future version, this will be treated as positional instead of label-based. For label-based slicing, use obj.loc[i:j] instead
scr_max = epoch[&quot;SCR_Amplitude&quot;][0:6].max() # Maximum SCR peak
</pre></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions examples/ecg_generate_12leads/ecg_generate_12leads.html
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ <h2>Normal Multi-lead ECG<a class="headerlink" href="#normal-multi-lead-ecg" tit
</div>
</div>
<div class="cell_output docutils container">
<img alt="../../_images/8e15013448c5dcb4063bc0ebbc7127ff0b409f44a5ea651888b7258e411c24aa.png" src="../../_images/8e15013448c5dcb4063bc0ebbc7127ff0b409f44a5ea651888b7258e411c24aa.png" />
<img alt="../../_images/0b915b2fd7b77910421a016b9327f196d8041a2c51d67ac309217d858f8598cc.png" src="../../_images/0b915b2fd7b77910421a016b9327f196d8041a2c51d67ac309217d858f8598cc.png" />
</div>
</div>
</section>
Expand Down Expand Up @@ -510,7 +510,7 @@ <h2>Abnormal Multi-lead ECG<a class="headerlink" href="#abnormal-multi-lead-ecg"
</div>
</div>
<div class="cell_output docutils container">
<img alt="../../_images/b9d5357557bca8eb76426cbabc6093d838d7e457b27036663ade8ca8c137c9dd.png" src="../../_images/b9d5357557bca8eb76426cbabc6093d838d7e457b27036663ade8ca8c137c9dd.png" />
<img alt="../../_images/bf10339b9e6df1812fadc30f613eaf1add40f674a655e2519385af06d7a09269.png" src="../../_images/bf10339b9e6df1812fadc30f613eaf1add40f674a655e2519385af06d7a09269.png" />
</div>
</div>
</section>
Expand Down
Loading

0 comments on commit df70890

Please sign in to comment.