gwdetchar.io.datafind module¶
Data discovery utilities
- gwdetchar.io.datafind.check_flag(flag, gpstime, duration, pad)[source]¶
Check that a state flag is active during an entire analysis segment
- Parameters:
- Returns:
- gwdetchar.io.datafind.get_data(channel, start, end, frametype=None, source=None, nproc=1, verbose=False, **kwargs)[source]¶
Retrieve data for given channels within a certain time range
- Parameters:
- channel
strorlist either a single channel name, or a list of channel names
- start
float GPS start time of requested data
- end
float GPS end time of requested data
- frametype
str, optional name of frametype in which channel(s) are stored, default:
None- source
str,list, optional path(s) of a LAL-format cache file or individual data file, default:
None- nproc
int, optional number of parallel processes to use, uses serial process by default
- verbose
bool, optional print verbose output about NDS progress, default: False
- **kwargs
dict, optional
- channel
- Returns:
- data
TimeSeriesorTimeSeriesDict collection of data for the requested channels in the requested time range
- data
See also
remove_missing_channelsa utility that removes channels missing from the frame archive
gwpy.timeseries.TimeSeries.getthe underlying method to read data over an NDS server
gwpy.timeseries.TimeSeries.readthe underlying method to read data from local files
Notes
If
channelis astr, then aTimeSeriesobject will be returned, else the result is aTimeSeriesDict.The
frametypeargument should be used to read from archived frame files, whilesourceshould be used to read from a local cache or specific data file. If either fails, or if neither is passed, this function will attempt to get data over an NDS server.If
frametypeis used to read from the archive, any channels missing from the first or last frame file in the requested time range will be ignored.
- gwdetchar.io.datafind.remove_missing_channels(channels, gwfcache)[source]¶
Find and remove channels from a given list that are not available in a given cache of frame files
- Parameters:
- Returns:
See also
gwpy.io.gwf.iter_channel_namesfor the utility used to identify frame contents
Notes
As a shorthand, this utility checks
channelsagainst only the first and last frame files ingwfcache. This saves time and memory by not loading tables of contents for large numbers of very long data files.For every channel requested that is not available in
gwfcache, aUserWarningwill be raised.