Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about the time value and filter edge artifacts in PAC #177

Open
bettina77 opened this issue Jul 15, 2024 · 2 comments
Open

Question about the time value and filter edge artifacts in PAC #177

bettina77 opened this issue Jul 15, 2024 · 2 comments
Labels
question 🙋 Further information is requested

Comments

@bettina77
Copy link

Dear Raphael,

This is a question about the purpose of the 2 second epochs around the negative peak of the detected slow-waves in the SO-sigma coupling algorithm. In the examplary text of the notebook it is specifically mentioned that "Only the time range from 2 to 2 s was considered, to avoid filter edge artifacts." So, do I understand correctly that this time value is specifically used to minimize or cap filter edge artifacts and act as a buffer to avoid filter-related signal distortion during the PAC process?

Again, sorry that this is a very basic question, I just wanted to double check that my understanding of this standard 2 sec value for the "time" variable is correct.

Best,
Bettina

@raphaelvallat
Copy link
Owner

Hi @bettina77,

this time value is specifically used to minimize or cap filter edge artifacts and act as a buffer to avoid filter-related signal distortion during the PAC process?

In theory, yes. However, in YASA the filtering is applied on the raw, whole-night signal at once, and not separately for each slow-wave epoch as in the cited article, therefore the edge artefacts are not really an issue. I kept the 2-seconds because I think it provides a good trade-off between being too narrow or too wide around the negative peak of the slow-waves, while making sure that the selected window includes the full slow-wave oscillation. You could also set this parameter to 1-second if you wanted to be very specific. I would not recommend using values below 1-second or larger than 3 seconds though.

Best,
Raphael

@raphaelvallat raphaelvallat added the question 🙋 Further information is requested label Jul 15, 2024
@bettina77
Copy link
Author

Hi Raphael,

This was very helpful, thank you for the super quick clarification!

Best,
Bettina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question 🙋 Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants