AllenInstitute / openscope_databook

OpenScope databook: a collaborative, versioned, data-centric collection of foundational analyses for reproducible systems neuroscience 🐁🧠🔬🖥️📈
https://alleninstitute.github.io/openscope_databook
Other
62 stars 19 forks source link

In Exploring an NWB File, consider using html_repr #329

Closed bendichter closed 2 months ago

bendichter commented 8 months ago

The html repr function has improved greatly since the "Exploring an NWB File" notebook was created. Could you add it here? It could potentially replace the print.

To view the html_repr in a notebook, you just need the last line to return the value of the thing you are inspecting, e.g.

instead of

io = NWBHDF5IO(filepath, mode="r", load_namespaces=True)
nwb = io.read()

print(nwb)

you could simply write

io = NWBHDF5IO(filepath, mode="r", load_namespaces=True)
nwb = io.read()

nwb

This provides an interactive collapsable view of the file.

rcpeene commented 2 months ago

Implemented https://github.com/AllenInstitute/openscope_databook/commit/90519fabe98477cebd765dc20f8ee1407167e0ab