lina-usc / pylossless

🧠 EEG Processing pipeline that annotates continuous data
https://pylossless.readthedocs.io/en/latest/
MIT License
24 stars 8 forks source link

Merge adjacent epoch flags into a single annotation #151

Closed scott-huberty closed 11 months ago

scott-huberty commented 11 months ago

Closes #75

Now, instead of having several 1-second annotaitons + < 1 -second gap annotations:

Screen Shot 2023-11-07 at 12 04 34 PM

You have this 1-single annotation:

Screen Shot 2023-11-07 at 12 04 50 PM

Leading to a much better UX.

This also removes the need for the flag_gap boilerplate, which I think really was an idiosyncrasy of the MATLAB pipeline, which couldn't leverage a native annotation structure. instead of filling small (less than 1-second) "gap" annotations between two annotation of the same description, we can just merge those annotations into a single annotation.

codecov[bot] commented 11 months ago

Codecov Report

Merging #151 (6d051ce) into main (a7842b2) will decrease coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #151      +/-   ##
==========================================
- Coverage   78.73%   78.70%   -0.03%     
==========================================
  Files          21       21              
  Lines        1152     1141      -11     
==========================================
- Hits          907      898       -9     
+ Misses        245      243       -2     
Files Coverage Δ
pylossless/pipeline.py 74.13% <100.00%> (-0.21%) :arrow_down:

:mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!