Skip to content

Commit

Permalink
deploy: 32530d3
Browse files Browse the repository at this point in the history
  • Loading branch information
danibene committed May 21, 2024
1 parent 6118774 commit 464e806
Show file tree
Hide file tree
Showing 118 changed files with 1,147 additions and 324 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.
Binary file not shown.
Binary file not shown.
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.
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.
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.
Binary file not shown.
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.
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.
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.
1 change: 1 addition & 0 deletions _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ <h1>All modules for which code is available</h1>
<li><a href="neurokit2/ppg/ppg_peaks.html">neurokit2.ppg.ppg_peaks</a></li>
<li><a href="neurokit2/ppg/ppg_plot.html">neurokit2.ppg.ppg_plot</a></li>
<li><a href="neurokit2/ppg/ppg_process.html">neurokit2.ppg.ppg_process</a></li>
<li><a href="neurokit2/ppg/ppg_quality.html">neurokit2.ppg.ppg_quality</a></li>
<li><a href="neurokit2/ppg/ppg_segment.html">neurokit2.ppg.ppg_segment</a></li>
<li><a href="neurokit2/ppg/ppg_simulate.html">neurokit2.ppg.ppg_simulate</a></li>
<li><a href="neurokit2/rsp/rsp_amplitude.html">neurokit2.rsp.rsp_amplitude</a></li>
Expand Down
2 changes: 1 addition & 1 deletion _modules/neurokit2/misc/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ <h1>Source code for neurokit2.misc.report</h1><div class="highlight"><pre>
<span class="k">def</span> <span class="nf">text_combine</span><span class="p">(</span><span class="n">info</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Reformat dictionary describing processing methods as strings to be inserted into HTML file.&quot;&quot;&quot;</span>
<span class="n">preprocessing</span> <span class="o">=</span> <span class="s1">&#39;&lt;h2 style=&quot;background-color: #FB1CF0&quot;&gt;Preprocessing&lt;/h1&gt;&#39;</span>
<span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;text_cleaning&quot;</span><span class="p">,</span> <span class="s2">&quot;text_peaks&quot;</span><span class="p">]:</span>
<span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;text_cleaning&quot;</span><span class="p">,</span> <span class="s2">&quot;text_peaks&quot;</span><span class="p">,</span> <span class="s2">&quot;text_quality&quot;</span><span class="p">]:</span>
<span class="k">if</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">info</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
<span class="n">preprocessing</span> <span class="o">+=</span> <span class="n">info</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">+</span> <span class="s2">&quot;&lt;br&gt;&quot;</span>
<span class="n">ref</span> <span class="o">=</span> <span class="s1">&#39;&lt;h2 style=&quot;background-color: #FBB41C&quot;&gt;References&lt;/h1&gt;&#39;</span>
Expand Down
60 changes: 56 additions & 4 deletions _modules/neurokit2/ppg/ppg_methods.html
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ <h1>Source code for neurokit2.ppg.ppg_methods</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">..misc.report</span> <span class="kn">import</span> <span class="n">get_kwargs</span>
<span class="kn">from</span> <span class="nn">.ppg_clean</span> <span class="kn">import</span> <span class="n">ppg_clean</span>
<span class="kn">from</span> <span class="nn">.ppg_findpeaks</span> <span class="kn">import</span> <span class="n">ppg_findpeaks</span>
<span class="kn">from</span> <span class="nn">.ppg_quality</span> <span class="kn">import</span> <span class="n">ppg_quality</span>


<div class="viewcode-block" id="ppg_methods">
Expand All @@ -390,6 +391,7 @@ <h1>Source code for neurokit2.ppg.ppg_methods</h1><div class="highlight"><pre>
<span class="n">method</span><span class="o">=</span><span class="s2">&quot;elgendi&quot;</span><span class="p">,</span>
<span class="n">method_cleaning</span><span class="o">=</span><span class="s2">&quot;default&quot;</span><span class="p">,</span>
<span class="n">method_peaks</span><span class="o">=</span><span class="s2">&quot;default&quot;</span><span class="p">,</span>
<span class="n">method_quality</span><span class="o">=</span><span class="s2">&quot;default&quot;</span><span class="p">,</span>
<span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
<span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;**PPG Preprocessing Methods**</span>
Expand Down Expand Up @@ -417,6 +419,11 @@ <h1>Source code for neurokit2.ppg.ppg_methods</h1><div class="highlight"><pre>
<span class="sd"> will be set to the value of ``&quot;method&quot;``. Defaults to ``&quot;default&quot;``.</span>
<span class="sd"> For more information, see the ``&quot;method&quot;`` argument</span>
<span class="sd"> of :func:`.ppg_findpeaks`.</span>
<span class="sd"> method_quality: str</span>
<span class="sd"> The method used to assess PPG signal quality. If ``&quot;default&quot;``,</span>
<span class="sd"> will be set to the value of ``&quot;templatematch&quot;``. Defaults to ``&quot;templatematch&quot;``.</span>
<span class="sd"> For more information, see the ``&quot;method&quot;`` argument</span>
<span class="sd"> of :func:`.ppg_quality`.</span>
<span class="sd"> **kwargs</span>
<span class="sd"> Other arguments to be passed to :func:`.ppg_clean` and</span>
<span class="sd"> :func:`.ppg_findpeaks`.</span>
Expand All @@ -430,15 +437,17 @@ <h1>Source code for neurokit2.ppg.ppg_methods</h1><div class="highlight"><pre>

<span class="sd"> See Also</span>
<span class="sd"> --------</span>
<span class="sd"> ppg_process, ppg_clean, ppg_findpeaks</span>
<span class="sd"> ppg_process, ppg_clean, ppg_findpeaks, ppg_quality</span>

<span class="sd"> Examples</span>
<span class="sd"> --------</span>
<span class="sd"> .. ipython:: python</span>

<span class="sd"> import neurokit2 as nk</span>

<span class="sd"> methods = nk.ppg_methods(sampling_rate=100, method=&quot;elgendi&quot;, method_cleaning=&quot;nabian2018&quot;)</span>
<span class="sd"> methods = nk.ppg_methods(</span>
<span class="sd"> sampling_rate=100, method=&quot;elgendi&quot;,</span>
<span class="sd"> method_cleaning=&quot;nabian2018&quot;, method_quality=&quot;templatematch&quot;)</span>
<span class="sd"> print(methods[&quot;text_cleaning&quot;])</span>
<span class="sd"> print(methods[&quot;references&quot;][0])</span>

Expand All @@ -450,7 +459,12 @@ <h1>Source code for neurokit2.ppg.ppg_methods</h1><div class="highlight"><pre>
<span class="k">else</span> <span class="nb">str</span><span class="p">(</span><span class="n">method_cleaning</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
<span class="p">)</span>
<span class="n">method_peaks</span> <span class="o">=</span> <span class="p">(</span>
<span class="nb">str</span><span class="p">(</span><span class="n">method</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="k">if</span> <span class="n">method_peaks</span> <span class="o">==</span> <span class="s2">&quot;default&quot;</span> <span class="k">else</span> <span class="nb">str</span><span class="p">(</span><span class="n">method_peaks</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
<span class="nb">str</span><span class="p">(</span><span class="n">method</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
<span class="k">if</span> <span class="n">method_peaks</span> <span class="o">==</span> <span class="s2">&quot;default&quot;</span>
<span class="k">else</span> <span class="nb">str</span><span class="p">(</span><span class="n">method_peaks</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
<span class="p">)</span>
<span class="n">method_quality</span> <span class="o">=</span> <span class="p">(</span>
<span class="nb">str</span><span class="p">(</span><span class="n">method_quality</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
<span class="p">)</span>

<span class="c1"># Create dictionary with all inputs</span>
Expand All @@ -459,16 +473,19 @@ <h1>Source code for neurokit2.ppg.ppg_methods</h1><div class="highlight"><pre>
<span class="s2">&quot;method&quot;</span><span class="p">:</span> <span class="n">method</span><span class="p">,</span>
<span class="s2">&quot;method_cleaning&quot;</span><span class="p">:</span> <span class="n">method_cleaning</span><span class="p">,</span>
<span class="s2">&quot;method_peaks&quot;</span><span class="p">:</span> <span class="n">method_peaks</span><span class="p">,</span>
<span class="s2">&quot;method_quality&quot;</span><span class="p">:</span> <span class="n">method_quality</span><span class="p">,</span>
<span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
<span class="p">}</span>

<span class="c1"># Get arguments to be passed to cleaning and peak finding functions</span>
<span class="c1"># Get arguments to be passed to cleaning, peak finding, and quality assessment functions</span>
<span class="n">kwargs_cleaning</span><span class="p">,</span> <span class="n">report_info</span> <span class="o">=</span> <span class="n">get_kwargs</span><span class="p">(</span><span class="n">report_info</span><span class="p">,</span> <span class="n">ppg_clean</span><span class="p">)</span>
<span class="n">kwargs_peaks</span><span class="p">,</span> <span class="n">report_info</span> <span class="o">=</span> <span class="n">get_kwargs</span><span class="p">(</span><span class="n">report_info</span><span class="p">,</span> <span class="n">ppg_findpeaks</span><span class="p">)</span>
<span class="n">kwargs_quality</span><span class="p">,</span> <span class="n">report_info</span> <span class="o">=</span> <span class="n">get_kwargs</span><span class="p">(</span><span class="n">report_info</span><span class="p">,</span> <span class="n">ppg_quality</span><span class="p">)</span>

<span class="c1"># Save keyword arguments in dictionary</span>
<span class="n">report_info</span><span class="p">[</span><span class="s2">&quot;kwargs_cleaning&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">kwargs_cleaning</span>
<span class="n">report_info</span><span class="p">[</span><span class="s2">&quot;kwargs_peaks&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">kwargs_peaks</span>
<span class="n">report_info</span><span class="p">[</span><span class="s2">&quot;kwargs_quality&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">kwargs_quality</span>

<span class="c1"># Initialize refs list with NeuroKit2 reference</span>
<span class="n">refs</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;&quot;&quot;Makowski, D., Pham, T., Lau, Z. J., Brammer, J. C., Lespinasse, F., Pham, H.,</span>
Expand Down Expand Up @@ -537,6 +554,41 @@ <h1>Source code for neurokit2.ppg.ppg_methods</h1><div class="highlight"><pre>
<span class="s2">&quot;text_peaks&quot;</span>
<span class="p">]</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;The peak detection was carried out using the method </span><span class="si">{</span><span class="n">method_peaks</span><span class="si">}</span><span class="s2">.&quot;</span>

<span class="c1"># 2. Quality</span>
<span class="c1"># ----------</span>
<span class="k">if</span> <span class="n">method_quality</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;templatematch&quot;</span><span class="p">]:</span>
<span class="n">report_info</span><span class="p">[</span>
<span class="s2">&quot;text_quality&quot;</span>
<span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
<span class="s2">&quot;The quality assessment was carried out using template-matching, approximately as described &quot;</span>
<span class="o">+</span> <span class="s2">&quot;in Orphanidou et al. (2015).&quot;</span>
<span class="p">)</span>
<span class="n">refs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Orphanidou C, Bonnici T, Charlton P, Clifton D, Vallance D, Tarassenko L (2015)</span>
<span class="sd"> Signal-quality indices for the electrocardiogram and photoplethysmogram: Derivation</span>
<span class="sd"> and applications to wireless monitoring</span>
<span class="sd"> IEEE Journal of Biomedical and Health Informatics 19(3): 832–838. doi:10.1109/JBHI.2014.2338351.&quot;&quot;&quot;</span>
<span class="p">)</span>
<span class="k">elif</span> <span class="n">method_quality</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;disimilarity&quot;</span><span class="p">]:</span>
<span class="n">report_info</span><span class="p">[</span>
<span class="s2">&quot;text_quality&quot;</span>
<span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
<span class="s2">&quot;The quality assessment was carried out using a disimilarity measure of positive-peaked beats, &quot;</span>
<span class="o">+</span> <span class="s2">&quot;approximately as described in Sabeti et al. (2019).&quot;</span>
<span class="p">)</span>
<span class="n">refs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Sabeti E, Reamaroon N, Mathis M, Gryak J, Sjoding M, Najarian K (2019)</span>
<span class="sd"> Signal quality measure for pulsatile physiological signals using</span>
<span class="sd"> morphological features: Applications in reliability measure for pulse oximetry</span>
<span class="sd"> Informatics in Medicine Unlocked 16: 100222. doi:10.1016/j.imu.2019.100222.&quot;&quot;&quot;</span>
<span class="p">)</span>
<span class="k">elif</span> <span class="n">method_quality</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;none&quot;</span><span class="p">]:</span>
<span class="n">report_info</span><span class="p">[</span><span class="s2">&quot;text_quality&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;There was no quality assessment carried out.&quot;</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">report_info</span><span class="p">[</span>
<span class="s2">&quot;text_quality&quot;</span>
<span class="p">]</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;The quality assessment was carried out using the method </span><span class="si">{</span><span class="n">method_quality</span><span class="si">}</span><span class="s2">.&quot;</span>

<span class="n">report_info</span><span class="p">[</span><span class="s2">&quot;references&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">unique</span><span class="p">(</span><span class="n">refs</span><span class="p">))</span>
<span class="k">return</span> <span class="n">report_info</span></div>

Expand Down
Loading

0 comments on commit 464e806

Please sign in to comment.