diff --git a/paper/fig_breathingamplitude.svg b/paper/fig_breathingamplitude.svg index e34f792..e662868 100644 --- a/paper/fig_breathingamplitude.svg +++ b/paper/fig_breathingamplitude.svg @@ -2,7 +2,7 @@ - + - + @@ -5540,7 +5542,7 @@ L 11.71875 0 z " id="DejaVuSans-Bold-49"/> - + @@ -5621,49 +5623,49 @@ Q 25.484375 57.71875 25.484375 53.421875 z " id="DejaVuSans-Bold-56"/> - + - - - - - - - - - @@ -5954,14 +5956,14 @@ z - +" id="me99b3dca8f" style="stroke:#ff1493;"/> - + @@ -6049,14 +6051,14 @@ z - +" id="mcdad15b1f3" style="stroke:#ff1493;"/> - + @@ -6130,10 +6132,10 @@ z +" id="m75f01958d0" style="stroke:#000000;stroke-width:0.8;"/> - + @@ -6161,7 +6163,7 @@ Q 64.796875 54.546875 64.796875 36.375 z " id="DejaVuSans-Bold-48"/> - + @@ -6169,24 +6171,51 @@ z - + - - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + - + + + + + + + + + + + + + + + - + - - + + - + - + + + + + + + + + + + + + + + - + - + - - + - + +" id="m5ca87729b7" style="stroke:#000000;stroke-width:0.8;"/> - + - + @@ -6378,17 +6435,17 @@ L -3.5 0 - - + - + - + - + @@ -6398,17 +6455,17 @@ L 471.882383 234.654244 - - + - + - + - + @@ -6418,17 +6475,17 @@ L 471.882383 211.861561 - - + - + - + - + @@ -6438,17 +6495,17 @@ L 471.882383 189.068878 - - + - + - + - + @@ -6458,17 +6515,17 @@ L 471.882383 166.276195 - - + - + - + - + @@ -6477,7 +6534,7 @@ L 471.882383 143.483512 - + - - - - - + - - - - - - - + - + diff --git a/paper/generate_fig_breathingamplitude.py b/paper/generate_fig_breathingamplitude.py index 5f5e235..93303a6 100644 --- a/paper/generate_fig_breathingamplitude.py +++ b/paper/generate_fig_breathingamplitude.py @@ -38,11 +38,11 @@ ax1.set_frame_on(False) ax0.plot(signal, linewidth=2.5, label="breathing signal") -ax0.scatter(peaks, signal[peaks], c="deeppink", marker="^", zorder=3, s=200, +ax0.scatter(peaks, signal[peaks], c="deeppink", marker="^", zorder=3, s=125, label="inhalation peaks") ax0.scatter(troughs, signal[troughs], c="deeppink", marker="v", zorder=3, - s=200, label="exhalation troughs") -ax0.legend(fontsize="small", markerscale=.6, bbox_to_anchor=(0.15, 1.1)) + s=125, label="exhalation troughs") +ax0.legend(fontsize="small", markerscale=.75, bbox_to_anchor=(0.15, 1.1)) ax1.plot(amp, linewidth=2.5, c="mediumvioletred") ax1.vlines(peaks, ymin=min(amp), ymax=max(amp), colors="deeppink", linewidth=3, @@ -51,6 +51,10 @@ ax1.set_xlabel("Time (sec)", fontsize="large", fontweight="bold") ax1.set_ylabel("Inhalation amplitude (a.u.)", fontsize="large", fontweight="bold") + +ax0.set_xlim(right=40000) +ax1.set_xlim(right=40000) + sec = np.rint((ax1.get_xticks() / sfreq)).astype(int) ax1.set_xticklabels(sec) ax1.tick_params(axis="both", which="major", labelsize="medium") diff --git a/paper/paper.md b/paper/paper.md index dd0ed93..f3c971e 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -48,13 +48,16 @@ For example, Fig. 1 through 3 illustrate the extraction of instantaneous heart p (inhalation) amplitude respectively. ![figure1](fig_heartperiod.svg) + *Figure 1*: Extraction of heart period based on R-peaks in an ECG. Note that this is conceptually identical to the extraction of heart period based on systolic peaks in PPG. ![figure2](fig_breathingperiod.svg) + *Figure 2*: Extraction of breathing period based on inhalation peaks in a breathing signal. ![figure3](fig_breathingamplitude.svg) + *Figure 3*: Extraction of inhalation amplitude based on breathing extrema in a breathing signal. In summary, `biopeaks` is designed to make biosignal inspection, extrema detection and editing, as well as feature