find_channels#

gwpy.io.nds2.find_channels(
channels: Sequence[str | Channel | nds2.channel],
connection: nds2.connection | None = None,
host: str | None = None,
port: int | None = None,
sample_rate: float | tuple[float, float] | None = None,
type: int | str | None = 127,
dtype: int | str | DTypeLike = 127,
*,
unique: bool = False,
epoch: str | tuple[int, int] | None = 'ALL',
) list[nds2.channel][source]#

Query an NDS2 server for channel information.

Parameters:
channelslist of str

List of channel names to query, each can include bash-style globs.

connectionnds2.connection, optional

Open NDS2 connection to use for query.

hoststr, optional

Name of NDS2 server to query, required if connection is not given.

portint, optional

Port number on host to use for NDS2 connection.

sample_rateint, float, tuple, optional

A single number, representing a specific sample rate to match, or a tuple representing a (low, high) interval to match.

typeint, optional

The NDS2 channel type to match.

dtypeint, optional

The NDS2 data type to match.

uniquebool, optional, default: False

Require one (and only one) match per channel.

epochstr, tuple of int, optional

The NDS epoch to restrict to, either the name of a known epoch, or a 2-tuple of GPS [start, stop) times.

Returns:
channelslist of nds2.channel

List of NDS2 channel objects.

See also

nds2.connection.find_channels

For documentation on the underlying query method.

Examples

>>> from gwpy.io.nds2 import find_channels
>>> find_channels(['G1:DER_DATA_H'], host='nds.ligo.caltech.edu')
[<G1:DER_DATA_H (16384Hz, RDS, FLOAT64)>]