pynwb icon indicating copy to clipboard operation
pynwb copied to clipboard

[Documentation]: add advanced read tutorial

Open weiglszonja opened this issue 3 years ago • 0 comments

#1453 introduces a basic read tutorial, but a more advanced version is needed where we can add more coverage of Container base class features

Thanks for putting together this tutorial. Just a few (random) general thoughts.

Ultimately, I think it will be useful to have tutorials like this for each main application area (i.e., at least ecephys, ophys, and icephys) where we can then cover details that are specific to the area. E.g., for ecephys that would involve items like using ElectricalSeries.electrodes to locate and use electrode metadata. Or for icephys it involves dealing with the icephys metadata tables, for which we already have a tutorial here https://pynwb.readthedocs.io/en/stable/tutorials/domain/plot_icephys_pandas.html . As such, I would suggest that we focus here on introducing common key concepts and then link to tutorials for the different areas for further details in those areas. I think overal this tutorial is a great start for this, but we may (eventually) want to move items that are specific for a particular area to (e.g., units) to the corresponding domain-specific read tutorial.

I don't think we necessarily have to cover all these concepts here, but I just wanted to mention a few general concepts that I think could be useful for read tutorials to:

  • Container.children and NWBFile.all_children to iterate over containers
  • NWBFile.acquistion, NWBFile.processing and NWBFile.all_children use LabelledDict which has some (basic) features that are useful for query (see https://hdmf.readthedocs.io/en/stable/hdmf.utils.html?highlight=LabelledDict#hdmf.utils.LabelledDict). E.g., if you want to find all ElectricalSeries in acquisition you could do something like NWBFile.acquistion['neurodata_type==ElectricalSeries']
  • A few general concepts from the Container base class that could be of interest for this tutorial, are, e.g,: type_hierarchy(), .parent, objectid, get_ancestor. Some of these may be too much detail or not useful here, but I just wanted to mention them in case they are useful (see https://hdmf.readthedocs.io/en/stable/hdmf.container.html?highlight=fields#hdmf.container.AbstractContainer)
  • Similarly, hdmf.container.Data has a few additional features that could be useful for read, e.g., the transform method.
  • ...

Originally posted by @oruebel in https://github.com/NeurodataWithoutBorders/pynwb/pull/1453#discussion_r851513536

weiglszonja avatar Apr 20 '22 14:04 weiglszonja