gwsumm.channels module¶
Utilities for channel access
- gwsumm.channels.get_channel(channel, find_parent=True, timeout=5)[source]¶
Find (or create) a :class:`~gwpy.detector.Channel`.
If
channel
has already been created, the cached copy will be returned, otherwise a new ~gwpy.detector.Channel object will be created.- Parameters:
- channelstr
name of new channel
- find_parentbool, optional, default: True
query for raw version of trend channel (trends not in CIS)
- timeoutfloat, optional, default: 5
number of seconds to wait before connection times out
- Returns:
- Channel:class:`~gwpy.detector.Channel`
new channel.
- gwsumm.channels.get_channels(channels, **kwargs)[source]¶
Find (or create) multiple channels calling get_channel()
- Parameters:
- channelslist
list of channels as str or ~gwpy.detector.Channel objects
- **kwargs
keyword arguments applied to each channel in the list
- Returns:
- ChannelList~gwpy.detector.ChannelList
a list of channels
See also
- gwsumm.channels.split(channelstring)[source]¶
Split a comma-separated list of channels that may, or may not contain NDS2 channel types as well
- Parameters:
- channelstringstr
comma-separated string of channels
- Returns:
- outlist
list of strings for each channel
- gwsumm.channels.split_combination(channelstring)[source]¶
Split a math-combination of channels
- Parameters:
- channelstringstr
- Returns:
- ChannelList~gwpy.detector.ChannelList
- gwsumm.channels.update_channel_params()[source]¶
Update the globalv.CHANNELS list based on internal parameter changes
This is required to update Channel.type based on Channel.frametype, and similar.
- gwsumm.channels.update_missing_channel_params(channel, **kwargs)[source]¶
Update empty channel parameters using the given input
This method will only set parameters in the channel if the target parameter is None.
- Parameters:
- channel~gwpy.detector.Channel
channel to update
- **kwargs
(key, value) pairs to set
- Returns:
- target~gwpy.detector.Channel
the channel after updating parameters