xdas.DataCollection.query#
- DataCollection.query(indexers=None, **indexers_kwargs)[source]#
Query a given subset from a data collection.
The data collection is walked through, if any node name corresponds to a key of the indexers, the corresponding value is used to select a subset of that node.
- Parameters:
- Returns:
The queried data.
- Return type:
Examples
>>> import xdas as xd >>> from xdas.synthetics import wavelet_wavefronts >>> da = wavelet_wavefronts() >>> dc = xd.DataCollection( ... { ... "das1": ("acquisition", [da, da]), ... "das2": ("acquisition", [da, da, da]), ... }, ... "instrument", ... ) >>> dc.query(instrument="das1", acquisition=0) Instrument: das1: Acquisition: 0: <xdas.DataArray (time: 300, distance: 401)>