Skip to content

Commit

Permalink
build based on 893aa24
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Oct 10, 2024
1 parent 421ba5b commit 97588b8
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 51 deletions.
2 changes: 1 addition & 1 deletion previews/PR52/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.11.0","generation_timestamp":"2024-10-10T00:19:56","documenter_version":"1.6.0"}}
{"documenter":{"julia_version":"1.11.0","generation_timestamp":"2024-10-10T18:20:47","documenter_version":"1.6.0"}}
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.
4 changes: 2 additions & 2 deletions previews/PR52/benchmarks/index.html

Large diffs are not rendered by default.

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.
26 changes: 13 additions & 13 deletions previews/PR52/glossary/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion previews/PR52/how-to/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

pks = findmaxima(y)
plotpeaks(t, y; peaks=pks.indices)</code></pre><img src="553f62b2.svg" alt="Example block output"/><p>The simplest way to remove those peaks (assuming the signal is already filtered) is by setting the window <code>w</code> argument in <code>findmaxima</code> and friends:</p><pre><code class="language-julia hljs">pks = findmaxima(y, 15)
f = plotpeaks(t, y; peaks=pks.indices)</code></pre><img src="19fd8630.svg" alt="Example block output"/><p>If only the peaks circled in blue are wanted, then setting the window <code>w</code> too wide won&#39;t work, since there are larger peaks that would become dominant.</p><img src="1ad2c60d.svg" alt="Example block output"/><h2 id="How-to-filter-peaks-by-peak-characteristics"><a class="docs-heading-anchor" href="#How-to-filter-peaks-by-peak-characteristics">How to filter peaks by peak characteristics</a><a id="How-to-filter-peaks-by-peak-characteristics-1"></a><a class="docs-heading-anchor-permalink" href="#How-to-filter-peaks-by-peak-characteristics" title="Permalink"></a></h2><p>Every peak-characteristic finding function can optionally filter the newly calculated characteristics using the keyword arguments <code>min</code> and <code>max</code>.</p><p>Plotting all the peak characteristics and/or looking at the characteristic values can help show which characteristics should be filtered to remove all the unwanted peaks.</p><pre><code class="language-julia hljs">plotpeaks!(f, t, y; peaks=pks.indices, prominences=true, widths=true)</code></pre><img src="f7f704cd.svg" alt="Example block output"/><pre><code class="language-julia hljs">DataFrame(pks[Not(:data)])</code></pre><div><div style = "float: left;"><span>7×5 DataFrame</span></div><div style = "clear: both;"></div></div><div class = "data-frame" style = "overflow-x: scroll;"><table class = "data-frame" style = "margin-bottom: 6px;"><thead><tr class = "header"><th class = "rowNumber" style = "font-weight: bold; text-align: right;">Row</th><th style = "text-align: left;">indices</th><th style = "text-align: left;">heights</th><th style = "text-align: left;">proms</th><th style = "text-align: left;">widths</th><th style = "text-align: left;">edges</th></tr><tr class = "subheader headerLastRow"><th class = "rowNumber" style = "font-weight: bold; text-align: right;"></th><th title = "Int64" style = "text-align: left;">Int64</th><th title = "Float64" style = "text-align: left;">Float64</th><th title = "Float64" style = "text-align: left;">Float64</th><th title = "Float64" style = "text-align: left;">Float64</th><th title = "Tuple{Float64, Float64}" style = "text-align: left;">Tuple…</th></tr></thead><tbody><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">1</td><td style = "text-align: right;">37</td><td style = "text-align: right;">3.3983</td><td style = "text-align: right;">0.349768</td><td style = "text-align: right;">19.0733</td><td style = "text-align: left;">(28.6219, 47.6952)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">2</td><td style = "text-align: right;">102</td><td style = "text-align: right;">5.06883</td><td style = "text-align: right;">5.0532</td><td style = "text-align: right;">111.484</td><td style = "text-align: left;">(18.3513, 129.835)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">3</td><td style = "text-align: right;">180</td><td style = "text-align: right;">1.26454</td><td style = "text-align: right;">0.60992</td><td style = "text-align: right;">24.5815</td><td style = "text-align: left;">(169.131, 193.712)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">4</td><td style = "text-align: right;">273</td><td style = "text-align: right;">1.3268</td><td style = "text-align: right;">2.5423</td><td style = "text-align: right;">44.1711</td><td style = "text-align: left;">(251.305, 295.477)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">5</td><td style = "text-align: right;">347</td><td style = "text-align: right;">-0.559051</td><td style = "text-align: right;">0.627436</td><td style = "text-align: right;">23.1592</td><td style = "text-align: left;">(332.166, 355.326)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">6</td><td style = "text-align: right;">446</td><td style = "text-align: right;">-2.94121</td><td style = "text-align: right;">0.340754</td><td style = "text-align: right;">20.0388</td><td style = "text-align: left;">(436.069, 456.108)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">7</td><td style = "text-align: right;">534</td><td style = "text-align: right;">3.38041</td><td style = "text-align: right;">0.331916</td><td style = "text-align: right;">16.6846</td><td style = "text-align: left;">(528.124, 544.809)</td></tr></tbody></table></div><p>Looking at the figure and the characteristic values, we can list the usefulness of each characteristic for filtering:</p><ul><li>Peak height?<ul><li>There are other peaks around the same height as the peaks we want, so applying a <code>min</code> or <code>max</code> height filter would remove peaks we want, or allow peaks we don&#39;t want.</li></ul></li><li>Peak prominence?<ul><li>All the peaks we want have similarly small prominences (&lt;1) and the other peaks have much larger prominences (&gt;2). This would be a good filtering option, using <code>peakproms(pks; max=1)</code>.</li></ul></li><li>Peak width?<ul><li>The peaks we want have fairly similar widths (~15-25 elements wide), and the other peaks have larger widths (&gt;40 elements wide). This would be a good filter, using <code>peakwidths(pks; max=30)</code>.</li></ul></li></ul><p>In this case, filtering by peak prominence would be the better choice, because calculating peak widths depends on prominences, so filtering by peak prominence would do the job while avoiding unnecessary work.</p><p>In many cases, the desired peaks aren&#39;t very different from many other peaks in any one peak characteristic. In these situations, it may be necessary to filter multiple times based on different peak characteristics or different <code>min</code>/<code>max</code> thresholds. There is also a <a href="../reference/#Peaks.filterpeaks!"><code>filterpeaks!</code></a> function which allows you to give a filter predicate and filter by multiple characteristics at once.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../benchmarks/">Benchmarks »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.6.0 on <span class="colophon-date" title="Thursday 10 October 2024 00:19">Thursday 10 October 2024</span>. Using Julia version 1.11.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
f = plotpeaks(t, y; peaks=pks.indices)</code></pre><img src="19fd8630.svg" alt="Example block output"/><p>If only the peaks circled in blue are wanted, then setting the window <code>w</code> too wide won&#39;t work, since there are larger peaks that would become dominant.</p><img src="1ad2c60d.svg" alt="Example block output"/><h2 id="How-to-filter-peaks-by-peak-characteristics"><a class="docs-heading-anchor" href="#How-to-filter-peaks-by-peak-characteristics">How to filter peaks by peak characteristics</a><a id="How-to-filter-peaks-by-peak-characteristics-1"></a><a class="docs-heading-anchor-permalink" href="#How-to-filter-peaks-by-peak-characteristics" title="Permalink"></a></h2><p>Every peak-characteristic finding function can optionally filter the newly calculated characteristics using the keyword arguments <code>min</code> and <code>max</code>.</p><p>Plotting all the peak characteristics and/or looking at the characteristic values can help show which characteristics should be filtered to remove all the unwanted peaks.</p><pre><code class="language-julia hljs">plotpeaks!(f, t, y; peaks=pks.indices, prominences=true, widths=true)</code></pre><img src="f7f704cd.svg" alt="Example block output"/><pre><code class="language-julia hljs">DataFrame(pks[Not(:data)])</code></pre><div><div style = "float: left;"><span>7×5 DataFrame</span></div><div style = "clear: both;"></div></div><div class = "data-frame" style = "overflow-x: scroll;"><table class = "data-frame" style = "margin-bottom: 6px;"><thead><tr class = "header"><th class = "rowNumber" style = "font-weight: bold; text-align: right;">Row</th><th style = "text-align: left;">indices</th><th style = "text-align: left;">heights</th><th style = "text-align: left;">proms</th><th style = "text-align: left;">widths</th><th style = "text-align: left;">edges</th></tr><tr class = "subheader headerLastRow"><th class = "rowNumber" style = "font-weight: bold; text-align: right;"></th><th title = "Int64" style = "text-align: left;">Int64</th><th title = "Float64" style = "text-align: left;">Float64</th><th title = "Float64" style = "text-align: left;">Float64</th><th title = "Float64" style = "text-align: left;">Float64</th><th title = "Tuple{Float64, Float64}" style = "text-align: left;">Tuple…</th></tr></thead><tbody><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">1</td><td style = "text-align: right;">37</td><td style = "text-align: right;">3.3983</td><td style = "text-align: right;">0.349768</td><td style = "text-align: right;">19.0733</td><td style = "text-align: left;">(28.6219, 47.6952)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">2</td><td style = "text-align: right;">102</td><td style = "text-align: right;">5.06883</td><td style = "text-align: right;">5.0532</td><td style = "text-align: right;">111.484</td><td style = "text-align: left;">(18.3513, 129.835)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">3</td><td style = "text-align: right;">180</td><td style = "text-align: right;">1.26454</td><td style = "text-align: right;">0.60992</td><td style = "text-align: right;">24.5815</td><td style = "text-align: left;">(169.131, 193.712)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">4</td><td style = "text-align: right;">273</td><td style = "text-align: right;">1.3268</td><td style = "text-align: right;">2.5423</td><td style = "text-align: right;">44.1711</td><td style = "text-align: left;">(251.305, 295.477)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">5</td><td style = "text-align: right;">347</td><td style = "text-align: right;">-0.559051</td><td style = "text-align: right;">0.627436</td><td style = "text-align: right;">23.1592</td><td style = "text-align: left;">(332.166, 355.326)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">6</td><td style = "text-align: right;">446</td><td style = "text-align: right;">-2.94121</td><td style = "text-align: right;">0.340754</td><td style = "text-align: right;">20.0388</td><td style = "text-align: left;">(436.069, 456.108)</td></tr><tr><td class = "rowNumber" style = "font-weight: bold; text-align: right;">7</td><td style = "text-align: right;">534</td><td style = "text-align: right;">3.38041</td><td style = "text-align: right;">0.331916</td><td style = "text-align: right;">16.6846</td><td style = "text-align: left;">(528.124, 544.809)</td></tr></tbody></table></div><p>Looking at the figure and the characteristic values, we can list the usefulness of each characteristic for filtering:</p><ul><li>Peak height?<ul><li>There are other peaks around the same height as the peaks we want, so applying a <code>min</code> or <code>max</code> height filter would remove peaks we want, or allow peaks we don&#39;t want.</li></ul></li><li>Peak prominence?<ul><li>All the peaks we want have similarly small prominences (&lt;1) and the other peaks have much larger prominences (&gt;2). This would be a good filtering option, using <code>peakproms(pks; max=1)</code>.</li></ul></li><li>Peak width?<ul><li>The peaks we want have fairly similar widths (~15-25 elements wide), and the other peaks have larger widths (&gt;40 elements wide). This would be a good filter, using <code>peakwidths(pks; max=30)</code>.</li></ul></li></ul><p>In this case, filtering by peak prominence would be the better choice, because calculating peak widths depends on prominences, so filtering by peak prominence would do the job while avoiding unnecessary work.</p><p>In many cases, the desired peaks aren&#39;t very different from many other peaks in any one peak characteristic. In these situations, it may be necessary to filter multiple times based on different peak characteristics or different <code>min</code>/<code>max</code> thresholds. There is also a <a href="../reference/#Peaks.filterpeaks!"><code>filterpeaks!</code></a> function which allows you to give a filter predicate and filter by multiple characteristics at once.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../benchmarks/">Benchmarks »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.6.0 on <span class="colophon-date" title="Thursday 10 October 2024 18:20">Thursday 10 October 2024</span>. Using Julia version 1.11.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 97588b8

Please sign in to comment.