FIX: blink annotations eyetracking/pupilometry
Reference issue
Fixes #12408
What does this implement/fix?
properly adjusts blink onsets/offsets to account for the start time of the signal. This allows you to crop the signal and still have an accurate description of blink onsets
@scott-huberty @larsoner sorry if i have completely screwed up how you guys normally do this - i closed the previous PR (i dont think i could edit the code once the PR was made) as i noticed it didn't import the annotations function needed (i incorrectly assumed it would be there by default, but then tested and found i was wrong).
This should work!
Again, sorry if i have messed up the normal workflow 😆
@schekroud you can just edit the code in your schekroud:main branch on GitHub and those changes will be reflected in the PR. No need to close and open a new one
No worries @schekroud there can be a learning curve for PR's. Have you read the contributing guide? I still use it from time to time to remind myself.
One comment (@larsoner can correct me if it isn't a big deal in this case), usually it's best to open a PR from a development branch (not your main branch). This should be covered in the contributing guide (let us know if it isn't).
I just took a closer look at this PR. It looks like most of the failing tests are unrelated, and I think all of them should have been fixed by recently merged PR's (i.e. #12417 ).
@schekroud if you do want to work on this PR from a development branch here is what I would do:
git commands
(Assuming you are in the mne-python github respoitory directory, and on your main branch):
# note I have edited the commands below since initially posting this comment
# checkout new branch, bringing over commits from y9ou rmain branch
git checkout -b fix_interpolate_blinks
# add a link to the mne-python github repo, we'll call it "upstream"
git remote add upstream https://github.com/mne-tools/mne-python.git
# bring in the latest changes that have been merged into mne-python
git fetch upstream main
git merge upstream/main --ff-only
# push your new local development branch to your remote fork
git push --set-upstream origin fix_interpolate_blinks
Then you could open another PR and close this one.
resetting your main branch to be in line with mne-pythons main branch
if you create a new branch with the changes from this PR, you'll want to reset your main branch:
git checkout main
git reset --hard upstream/main
Either way (you create a new dev branch or just continue this PR from your main branch), There a couple things to do.
- add a new
rstfile todoc/changes/develthat describe the changes made by this PR. See https://mne.tools/dev/development/contributing.html#describe-your-changes-in-the-changelog - @larsoner should we amend
test_interpolate_blinksto include a test with a cropped raw object?
Hi @schekroud do you still have time to work on this? I think you just need to merge in the updates to mne since your last commit, and add an entry to the changelog (see point 1 in my previous message). Let me know if you need any support from us!
I merged main. A test should be added to cover the previous failure.