[Documentation]: add advanced read tutorial
#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.electrodesto 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.childrenandNWBFile.all_childrento iterate over containersNWBFile.acquistion,NWBFile.processingandNWBFile.all_childrenuseLabelledDictwhich 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 allElectricalSeriesin acquisition you could do something likeNWBFile.acquistion['neurodata_type==ElectricalSeries']- A few general concepts from the
Containerbase 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.Datahas a few additional features that could be useful for read, e.g., thetransformmethod.- ...
Originally posted by @oruebel in https://github.com/NeurodataWithoutBorders/pynwb/pull/1453#discussion_r851513536