scientisst / BioSPPy

Biosignal Processing in Python
https://biosppy.readthedocs.io/
Other
72 stars 22 forks source link

Update quality.py #41

Closed camilabreu10 closed 7 months ago

camilabreu10 commented 7 months ago

Hello Sofia!

Thank you for your positive feedback and for suggesting some improvements. I'm glad to hear that everything is working well for you. I agree with making the changes you suggested to the verbose advice.

Thank you, and good work!

Camila Abreu


From: Sofia Monteiro @.> Sent: Sunday, April 7, 2024 7:06 PM To: scientisst/BioSPPy @.> Cc: camilabreu10 @.>; Author @.> Subject: Re: [scientisst/BioSPPy] Update quality.py (PR #41)

@sofia3ms requested changes on this pull request.

Hello Camila, thank you for your great contribution and for adding the optional verbose comments! Everything seems to be working great, I only wanted to suggest a few changes to the verbose advice for the metrics you added. I believe this way they are a bit more clear, let me know if you agree


In biosppy/quality.pyhttps://github.com/scientisst/BioSPPy/pull/41#discussion_r1555020041:


  • .. [Zhao18] Zhao, Z., & Zhang, Y. (2018).
  • SQI quality evaluation mechanism of single-lead ECG signal based on simple heuristic fusion and fuzzy comprehensive evaluation.
  • Frontiers in Physiology, 9, 727.
  • """
  • if rpeaks is None:
  • raise TypeError("Please specify the R-peak locations.")
  • rr_intervals = np.diff(rpeaks)
  • sdrr = np.std(rr_intervals)
  • mean_rr = np.mean(rr_intervals)
  • cSQI = sdrr / mean_rr
  • if verbose == 1:
  • print('-------------------------------------------------------')
  • print('cSQI Advice (comment this by setting verbose=0) -> The original segment should be more than 30s long for optimal results.')

⬇️ Suggested change


In biosppy/quality.pyhttps://github.com/scientisst/BioSPPy/pull/41#discussion_r1555020404:

  • Journal of The Royal Society Interface, 19. doi: 10.1098/rsif.2022.0012.
  • """
  • signal should be filtered?

  • if signal is None:
  • raise TypeError("Please specify the ECG signal.")
  • kSQI = stats.kurtosis(signal)
  • sSQI = stats.skew(signal)
  • print('kurtosis: ', kSQI)
  • print('skewness: ', sSQI)
  • hosSQI = abs(sSQI) * kSQI / 5
  • if verbose == 1:
  • print('-------------------------------------------------------')
  • print('hosSQI Advice (comment this by setting verbose=0) -> The signal should be filtered before this SQI and 5s long.')

⬇️ Suggested change

— Reply to this email directly, view it on GitHubhttps://github.com/scientisst/BioSPPy/pull/41#pullrequestreview-1985140994, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BGRZ6INZVSCAENMPAVU5IWLY4GDJ5AVCNFSM6AAAAABE565O5GVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSOBVGE2DAOJZGQ. You are receiving this because you authored the thread.Message ID: @.***>