Edit this page

NWB Workshops and Hackathons

:rewind: Back to the projects list

Query and complex indexing for NWB data

Key Investigators

Andrew Tritt (LBNL) Tom Davidson (UCSF) Nile Graddis (AIBS)

Project Description

Add functionality to support complex slicing.

Objectives

Determine implementation plan for query/complex slicing in NWB

Approach and Plan

  1. Add ability to specify dimension scales - issue
  2. Add ability to copy Containers in HDMF- issue
  3. Add __getitem__ to Query class in HDMF
    • may need to rewrite Query to be a class that takes and performs slices on a target e.g. TimeSeries
    • this will be the helper class that executes the query:
      ts = DecompositionSeries(...)
      ts.q[Mask(...), 'loc == CA1', 'name == theta']
      
  4. Decide on name for and add defined-over/domain/support/observation-intervals to TimeSeries class in PyNWB

  5. Add abstract Mask class to HDMF
    • Mask should be resolved from a query and a the values to which it applies, and should return a list of bools, and the new values to which it applies. Example usage:
      new_timestamps, bool_mask = mask.resolve(timestamps)
      
    • Make a TimeMask object that operates on timestamps, and is aware of defined-over/domain/support/observation-intervals
  6. Add a class to represent list of non-overlapping intervals
    • needs functionality for and and or

Progress and Next Steps

We made good progress on determining what features and methods need to be implemented. The next step is to move these into GitHub as issues, and start writing code.

Materials

Background and References