NeurodataWithoutBorders / nwbwidgets

Explore the hierarchical structure of NWB 2.0 files and visualize data with Jupyter widgets.
https://nwb-widgets.readthedocs.io/en/latest/
Other
48 stars 21 forks source link

Adding time grid widget #302

Open h-mayorquin opened 1 year ago

h-mayorquin commented 1 year ago

The idea is to have a quick visual representation of how the timing of the objects stands in regard to each other. I put this together quickly, so I'm very open to stylistic and other suggestions. I tested this against the Valero Conversion from the Buzsaki lab, and also used another dataset using Panel.

I'm also uncertain about the best placement for this, so right now it sits between the header data and the accordion. I'm not clear on how it could be in the accordion as this maps directo to the nwbfile and not to a sub-type...

This does not have a lot of functionality - and I think it probably should not - but I added the possibility of having epoch guides for orientation. I also thought that it might be a good idea to have an option to mark the trials, but I was concerned that this would be more computationally costly and I didn't have a lot of time to put this together.

This is using panel: image

And this is using a local example with more structure:

https://github.com/NeurodataWithoutBorders/nwbwidgets/assets/6429509/007c79bd-f42f-4212-92f3-0a5226fd94f3

codecov[bot] commented 1 year ago

Codecov Report

Merging #302 (f7a4add) into master (2adfb8a) will decrease coverage by 0.74%. The diff coverage is 48.66%.

:exclamation: Current head f7a4add differs from pull request most recent head 8b8d6b4. Consider uploading reports for the commit 8b8d6b4 to get more accurate results

@@            Coverage Diff             @@
##           master     #302      +/-   ##
==========================================
- Coverage   66.22%   65.48%   -0.74%     
==========================================
  Files          35       36       +1     
  Lines        3458     3607     +149     
==========================================
+ Hits         2290     2362      +72     
- Misses       1168     1245      +77     
Flag Coverage Δ
unittests 65.48% <48.66%> (-0.74%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nwbwidgets/time_grid.py 47.61% <47.61%> (ø)
nwbwidgets/file.py 71.42% <100.00%> (+1.21%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more