physiopy / phys2denoise

A toolbox and collection of scripts to prepare physiology data for fMRI denoise
https://phys2denoise.readthedocs.io/
Apache License 2.0
9 stars 19 forks source link

Fix lag application for negative lags #36

Open tsalo opened 3 years ago

tsalo commented 3 years ago

Closes #35.

This PR corrects the calculation of negative lags.

Proposed Changes

Change Type

Checklist before review

smoia commented 1 year ago

Actually, @tsalo, it's difficult for me to figure out which changes you wanted to stay - can you resolve the conflicts with master, please?

tsalo commented 1 year ago

Sorry for the delay @smoia. I'll give that a try now.

tsalo commented 1 year ago

I ended up having to change a few things. Lags were removed from rv at some point, but the parameter was still there, so I removed the parameter.

Also, lags in apply_lags wasn't applying lags correctly, AFAICT. I think I've fixed that.

codecov[bot] commented 1 year ago

Codecov Report

Merging #36 (f7c85b1) into master (24515ca) will not change coverage. The diff coverage is 33.33%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/physiopy/phys2denoise/pull/36/graphs/tree.svg?width=650&height=150&src=pr&token=FWDBRF95Y3&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=physiopy)](https://codecov.io/gh/physiopy/phys2denoise/pull/36?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=physiopy) ```diff @@ Coverage Diff @@ ## master #36 +/- ## ======================================= Coverage 47.04% 47.04% ======================================= Files 7 7 Lines 321 321 ======================================= Hits 151 151 Misses 170 170 ``` | [Impacted Files](https://codecov.io/gh/physiopy/phys2denoise/pull/36?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=physiopy) | Coverage Δ | | |---|---|---| | [phys2denoise/metrics/cardiac.py](https://codecov.io/gh/physiopy/phys2denoise/pull/36?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=physiopy#diff-cGh5czJkZW5vaXNlL21ldHJpY3MvY2FyZGlhYy5weQ==) | `94.73% <ø> (ø)` | | | [phys2denoise/metrics/utils.py](https://codecov.io/gh/physiopy/phys2denoise/pull/36?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=physiopy#diff-cGh5czJkZW5vaXNlL21ldHJpY3MvdXRpbHMucHk=) | `69.56% <0.00%> (ø)` | | | [phys2denoise/metrics/chest\_belt.py](https://codecov.io/gh/physiopy/phys2denoise/pull/36?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=physiopy#diff-cGh5czJkZW5vaXNlL21ldHJpY3MvY2hlc3RfYmVsdC5weQ==) | `85.54% <100.00%> (ø)` | |