Channel#
- class gwpy.detector.Channel(name: str | Self, **params)[source]#
Bases:
objectRepresentation of a gravitational-wave detectory data channel.
- Parameters:
- name
str,Channel Name of this Channel (or another Channel itself). If a
Channelis given, all other parameters not set explicitly will be copied over.- sample_rate
float,Quantity, optional Rate at which data are sampled for this channel, simple floats must be given in Hz.
- unit
Unit,str, optional Name of the unit for the data of this channel.
- frequency_range
tupleoffloat [low, high)spectral frequency range of interest for this channel.- safe
bool, optional If
Truethis channel is ‘safe’ to use as a witness of non-gravitational-wave noise in the detector.- dtype
numpy.dtype, optional Numeric type of data for this channel.
- frametype
str, optional LDAS name for frames that contain this channel.
- model
str, optional Name of the SIMULINK front-end model that produces this channel.
- name
Notes
The
Channelstructure implemented here is designed to match the data recorded in the LIGO Channel Information System (https://cis.ligo.org) for which a query interface is provided.Attributes Summary
Numeric type for data in this channel.
LDAS type description for frame files containing this channel.
Frequency range of interest (Hertz) for this channel.
Interferometer prefix for this channel.
Name of the SIMULINK front-end model that defines this channel.
Name of this channel.
Name of this channel as stored in the NDS database.
NDS type integer for this channel.
Whether this channel is 'safe' to use as a noise witness.
Rate of samples (Hertz) for this channel.
Instrumental signal for this channel.
Instrumental sub-system for this channel.
Instrumental system for this channel.
Name of this channel in LaTeX printable format.
Trend type for this channel.
DAQ data type for this channel.
Data unit for this channel.
CIS browser url for this channel.
Methods Summary
copy()Return a copy of this
Channel.find_frametype(-> str)Find the containing frametype(s) for this
Channel.from_arrakis(arrakischannel)Generate a new channel using an existing
arrakis.Channel.from_nds2(nds2channel)Generate a new channel using an existing nds2.channel object.
parse_channel_name(name, *[, strict])Decompose a channel name string into its components.
query(name, *[, kerberos])Query the LIGO Channel Information System for
name.query_nds2(name[, host, port, connection, type])Query an NDS server for channel information.
Attributes Documentation
- MATCH = re.compile('((?:(?P<ifo>[A-Z]\\d))?|[\\w-]+):(?:(?P<system>[a-zA-Z0-9]+))?(?:[-_](?P<subsystem>[a-zA-Z0-9]+))?(?:[-_](?P<signal>[a-zA-Z0-9_-]+?))?(?:[\\.-](?P<trend>[a-z]+))?(?:,(?P<type>([a-z]-)?[a-z]+))?$')#
- name[source]#
Name of this channel.
This should follow the naming convention, with the following format: ‘IFO:SYSTEM-SUBSYSTEM_SIGNAL’
- ndstype[source]#
NDS type integer for this channel.
This property is mapped to the
Channel.typestring.
- safe[source]#
Whether this channel is ‘safe’ to use as a noise witness.
Any channel that records part or all of a GW signal as it interacts with the interferometer is not safe to use as a noise witness
A safe value of
Nonesimply indicates that the safety of this channel has not been determined
- type[source]#
DAQ data type for this channel.
Valid values for this field are restricted to those understood by the NDS2 client sofware, namely:
‘m-trend’, ‘online’, ‘raw’, ‘reduced’, ‘s-trend’, ‘static’, ‘test-pt’
Methods Documentation
- find_frametype(
- gpstime: SupportsToGps | None = None,
- *,
- frametype_match: str | Pattern | None = None,
- return_all: Literal[False] = False,
- allow_tape: bool = True,
- **kwargs,
- find_frametype(
- gpstime: SupportsToGps | None = None,
- *,
- frametype_match: str | Pattern | None = None,
- return_all: Literal[True] = True,
- allow_tape: bool = True,
- **kwargs,
Find the containing frametype(s) for this
Channel.- Parameters:
- gpstime
int, optional A reference GPS time at which to search for frame files. Default is to search in the latest available data for each discoverable dataset.
- frametype_match
str A regular expression string to use to down-select from the list of all available datasets.
- return_all: `bool`, optional
If
Truereturn all matched datasets; ifFalse(default) only the first match is returned- allow_tape
bool, default:True If
True(default) include datasets whose files are stored on slow magnetic tape.- kwargs
Other keyword arguments are passed directly to
gwpy.io.datafind.find_frametype().
- gpstime
- Returns:
- classmethod from_arrakis(arrakischannel: arrakis.Channel) Self[source]#
Generate a new channel using an existing
arrakis.Channel.- Parameters:
- arrakischannel
arrakis.Channel The input channel from Arrakis to parse.
- arrakischannel
- Returns:
- channel
gwpy.detector.Channel A new
Channel.
- channel
- classmethod from_nds2(nds2channel: nds2.channel) Self[source]#
Generate a new channel using an existing nds2.channel object.
- classmethod parse_channel_name( ) dict[str, str | None][source]#
Decompose a channel name string into its components.
This method parses channels acccording to the LIGO Channel Naming Convention LIGO-T990033.
- Parameters:
- Returns:
- match
dict dictof channel name components with the following keys:'ifo': the letter-number interferometer prefix'system': the top-level system name'subsystem': the second-level sub-system name'signal': the remaining underscore-delimited signal name'trend': the trend type'ndstype': the NDS2 channel suffix
Any optional keys that aren’t found will return a value of
None
- match
- Raises:
ValueErrorif the name cannot be parsed with at least an IFO and SYSTEM
Examples
>>> Channel.parse_channel_name("L1:LSC-DARM_IN1_DQ") {'ifo': 'L1', 'ndstype': None, 'signal': 'IN1_DQ', 'subsystem': 'DARM', 'system': 'LSC', 'trend': None}
>>> Channel.parse_channel_name( ... "H1:ISI-BS_ST1_SENSCOR_GND_STS_X_BLRMS_100M_300M.rms,m-trend", ... ) {'ifo': 'H1', 'ndstype': 'm-trend', 'signal': 'ST1_SENSCOR_GND_STS_X_BLRMS_100M_300M', 'subsystem': 'BS', 'system': 'ISI', 'trend': 'rms'}
- classmethod query(name: str, *, kerberos: bool | None = None, **kwargs) Self[source]#
Query the LIGO Channel Information System for
name.- Parameters:
- name
str Name of channel for which to query.
- kerberos
bool, optional If
Trueuse an existing Kerberos ticket as the authentication credential. Default (None) is to check for credentials and request username and password if none are found.- kwargs
Other keyword arguments are passed directly to
ciecplib.get().
- name
- Returns:
- classmethod query_nds2(
- name: str,
- host: str | None = None,
- port: int | None = None,
- connection: nds2.connection | None = None,
- type: str | int | None = None,
Query an NDS server for channel information.
- Parameters:
- Returns:
- channel
Channel Channel with metadata retrieved from NDS2 server.
- channel
- Raises:
ValueErrorIf multiple channels are found for a given name.
Notes
Warning
One of
hostorconnectionis required.