|
gstlal 1.13.0
|
Public Member Functions | |
| __init__ (self, Union[str, DataSource] data_source, Dict[Detector, str] channel_name, Union[int, LIGOTimeGPS] gps_start_time=None, Union[int, LIGOTimeGPS] gps_end_time=None, Dict[Detector, str] shared_memory_partition=None, Dict[Detector, str] shared_memory_dir=None, str frame_segments_name=None, Dict[Detector, str] state_vector_on_bits=None, Dict[Detector, str] state_vector_off_bits=None, str dq_vector_on_bits=None, str dq_vector_off_bits=None, Union[str, Path] frame_cache=None, Union[str, Path] injections=None, str nds_host=None, int nds_port=None, str nds_channel_type='online', int shared_memory_assumed_duration=4, int shared_memory_block_size=4096, Union[str, Path] frame_segments_file=None, int block_size=DEFAULT_BLOCK_SIZE, Dict[Detector, str] frame_type=None, Union[str or DataFindServer] data_find_server=None, str framexmit_addr=None, str framexmit_iface=None, Dict[Detector, str] state_channel_name=None, Dict[Detector, str] dq_channel_name=None, Dict[Detector, str] idq_channel_name=None, Dict[Detector, str] idq_state_channel_name=None) | |
| validate (self) | |
Static Public Member Functions | |
| from_optparse (optparse.Values options) | |
Public Attributes | |
| data_source = data_source.name if isinstance(data_source, DataSourceInfo) else data_source | |
| if no frame segments provided, set them to an empty segment list dictionary | |
| block_size = block_size | |
| frame_cache = frame_cache.as_posix() if isinstance(frame_cache, Path) else frame_cache | |
| dict | frame_type = {} if frame_type is None else frame_type |
| str | data_find_server = '{}:{:d}'.format(data_find_server.host, data_find_server.port) if isinstance(data_find_server, HostInfo) else data_find_server |
| gps_start_time = gps_start_time.gpsSeconds if isinstance(gps_start_time, LIGOTimeGPS) else gps_start_time | |
| gps_end_time = gps_end_time.gpsSeconds if isinstance(gps_end_time, LIGOTimeGPS) else gps_end_time | |
| injections = injections.as_posix() if isinstance(injections, Path) else injections | |
| dict | channel_name = {} if channel_name is None else channel_name |
| nds_host = nds_host | |
| nds_port = nds_port | |
| nds_channel_type = nds_channel_type | |
| framexmit_addr = DEFAULT_FRAMXMIT_ADDR.copy() | |
| framexmit_iface = framexmit_iface | |
| state_channel_name = DEFAULT_STATE_CHANNEL.copy() | |
| dq_channel_name = DEFAULT_DQ_CHANNEL.copy() | |
| dict | idq_channel_name = {} if idq_channel_name is None else idq_channel_name |
| dict | idq_state_channel_name = {} if idq_state_channel_name is None else idq_state_channel_name |
| shared_memory_partition = DEFAULT_SHARED_MEMORY_PARTITION.copy() | |
| shared_memory_assumed_duration = shared_memory_assumed_duration | |
| shared_memory_block_size = shared_memory_block_size | |
| shared_memory_dir = DEFAULT_SHARED_MEMORY_DIR.copy() | |
| frame_segments_file = frame_segments_file | |
| frame_segments_name = frame_segments_name | |
| dict | state_vector_on_bits = {} if state_vector_on_bits is None else state_vector_on_bits |
| dict | state_vector_off_bits = {} if state_vector_off_bits is None else state_vector_off_bits |
| dict | dq_vector_on_bits = {} if dq_vector_on_bits is None else dq_vector_on_bits |
| dict | dq_vector_off_bits = {} if dq_vector_off_bits is None else dq_vector_off_bits |
| injection_filename = self.injections | |
| dict | channel_dict = self.channel_name |
| dq_channel_dict = self.dq_channel_name | |
| state_channel_dict = self.state_channel_name | |
| shm_part_dict = self.shared_memory_partition | |
| shm_assumed_duration = self.shared_memory_assumed_duration | |
| shm_block_size = self.shared_memory_block_size | |
| shm_dir_dict = self.shared_memory_dir | |
| seg = None | |
| frame_segments | |
| if no frame segments provided, set them to an empty segment list dictionary | |
| state_vector_on_off_bits = zip_dict_values(self.state_vector_on_bits, self.state_vector_off_bits, defaults=DEFAULT_STATE_VECTOR_ON_OFF) | |
| dq_vector_on_off_bits = zip_dict_values(self.dq_vector_on_bits, self.dq_vector_off_bits, defaults=DEFAULT_DQ_VECTOR_ON_OFF) | |
Protected Attributes | |
| _frame_cache_fileobj = tempfile.NamedTemporaryFile(suffix=".cache", dir=os.getenv("_CONDOR_SCRATCH_DIR", tempfile.gettempdir())) | |
| create a temporary cache file | |
A pythonic representation of a datasource with configured settings necessary for usage in pipelines
Definition at line 173 of file datasource.py.
| python.datasource.DataSourceInfo.__init__ | ( | self, | |
| Union[str, DataSource] | data_source, | ||
| Dict[Detector, str] | channel_name, | ||
| Union[int, LIGOTimeGPS] | gps_start_time = None, | ||
| Union[int, LIGOTimeGPS] | gps_end_time = None, | ||
| Dict[Detector, str] | shared_memory_partition = None, | ||
| Dict[Detector, str] | shared_memory_dir = None, | ||
| str | frame_segments_name = None, | ||
| Dict[Detector, str] | state_vector_on_bits = None, | ||
| Dict[Detector, str] | state_vector_off_bits = None, | ||
| str | dq_vector_on_bits = None, | ||
| str | dq_vector_off_bits = None, | ||
| Union[str, Path] | frame_cache = None, | ||
| Union[str, Path] | injections = None, | ||
| str | nds_host = None, | ||
| int | nds_port = None, | ||
| str | nds_channel_type = 'online', | ||
| int | shared_memory_assumed_duration = 4, | ||
| int | shared_memory_block_size = 4096, | ||
| Union[str, Path] | frame_segments_file = None, | ||
| int | block_size = DEFAULT_BLOCK_SIZE, | ||
| Dict[Detector, str] | frame_type = None, | ||
| Union[str or DataFindServer] | data_find_server = None, | ||
| str | framexmit_addr = None, | ||
| str | framexmit_iface = None, | ||
| Dict[Detector, str] | state_channel_name = None, | ||
| Dict[Detector, str] | dq_channel_name = None, | ||
| Dict[Detector, str] | idq_channel_name = None, | ||
| Dict[Detector, str] | idq_state_channel_name = None ) |
Create a DataSource information object that contains the necessary details to produce GStreamer elements
for loading gravitational wave data from a variety of possible sources.
Args:
data_source:
str or DataSource, the data source from [frames|framexmit|lvshm|nds|silence|white] which to download data
gps_start_time:
int or LIGOTimeGPS, the start time of the segment to analyze in GPS seconds. Required unless data_source=lvshm
gps_end_time:
int or LIGOTimeGPS, the end time of the segment to analyze in GPS seconds. Required unless data_source=lvshm
channel_name:
Dict[Detector, str] or Dict[Detector, HostInfo], the name of the channels to process per detector
framexmit_addr:
Dict[Detector, str] or Dict[Detector, HostInfo], the address of the framexmit service.
framexmit_iface:
str, the multicast interface address of the framexmit service.
state_channel_name:
Dict[Detector, str], the name of the state vector channel. This channel will be used to control the flow of data via the on/off bits.
dq_channel_name:
Dict[Detector, str], the name of the data quality channel. This channel will be used to control the flow of data via the on/off bits.
idq_channel_name:
Dict[Detector, str], the name of the idq channel. This channel will be used to create the idq_series information.
idq_state_channel_name:
Dict[Detector, str], the name of the idq state channel. This channel will be used to gate the idq_series information created by idq_channel_name.
shared_memory_partition:
Dict[Detector, str], the name of the shared memory partition for a given detector.
shared_memory_dir:
Dict[Detector, str], the name of the shared memory directory for a given detector.
frame_segments_name:
str, the name of the segments to extract from the segment tables. Required iff frame_segments_file is given
state_vector_on_bits:
Dict[Detector, str], default None, the state vector on bits to process (optional). The default is 0x7 for all detectors. Override with {Detector:bits} Only
currently has meaning for online (lvshm) data.
state_vector_off_bits:
Dict[Detector, str], default None, the state vector on bits to process (optional). The default is 0x160 for all detectors. Override with {Detector:bits} Only
currently has meaning for online (lvshm) data.
dq_vector_on_bits:
Dict[Detector, str], default None, the dq vector on bits to process (optional). The default is 0x7 for all detectors. Override with {Detector:bits} Only
currently has meaning for online (lvshm) data.
dq_vector_off_bits:
Dict[Detector, str], default None, the dq vector off bits to process (optional). The default is 0x160 for all detectors. Override with {Detector:bits} Only
currently has meaning for online (lvshm) data.
frame_cache:
str or Path, the name of the LAL cache listing the LIGO-Virgo .gwf frame files
injections:
str or Path, default None, the name of the LIGO light-weight XML file from which to load injections (optional)
nds_host:
str, the NDS server address. only used if data_source=nds
nds_port:
int, the NDS server port. only used if data_source=nds
nds_channel_type:
str, default 'online', the NDS channel type. Only used if data_source=nds
shared_memory_assumed_duration:
int, default 4, the assumed span of files in seconds. Default = 4.
shared_memory_block_size:
int, default 4096, the byte size to read per buffer.
frame_segments_file:
str or Path, the name of the LIGO light-weight XML file from which to load frame segments. Optional iff data_source=frames
block_size:
int, default 16384 * 8 * 512 (512 seconds of double precision data at 16384 Hz), Data block size to read in bytes. This parameter is only used if
data_source is one of {white, silence, AdvVirgo, LIGO, AdvLIGO, nds}.
frame_type:
Dict[Detector, str], default None, a dictionary setting the frame type (string) for each detector, e.g. {Detector.H1: 'H1_GWOSC_O2_16KHZ_R1'}. Used with data_source='frames'.
data_find_server:
str, default None, the data find server for LIGO data discovery. Used with data_source=frames.
Definition at line 177 of file datasource.py.
|
static |
Construct a DataSourceInfo object from an optparer.OptionParser
Args:
options:
Values, with all of the arguments defined in append_options
Returns:
DataSourceInfo object
Definition at line 394 of file datasource.py.
| python.datasource.DataSourceInfo.validate | ( | self | ) |
Validation of configuration
Definition at line 341 of file datasource.py.
|
protected |
create a temporary cache file
Definition at line 332 of file datasource.py.
| python.datasource.DataSourceInfo.block_size = block_size |
Definition at line 255 of file datasource.py.
| dict python.datasource.DataSourceInfo.channel_dict = self.channel_name |
Definition at line 302 of file datasource.py.
| dict python.datasource.DataSourceInfo.channel_name = {} if channel_name is None else channel_name |
Definition at line 262 of file datasource.py.
| str python.datasource.DataSourceInfo.data_find_server = '{}:{:d}'.format(data_find_server.host, data_find_server.port) if isinstance(data_find_server, HostInfo) else data_find_server |
Definition at line 258 of file datasource.py.
| python.datasource.DataSourceInfo.data_source = data_source.name if isinstance(data_source, DataSourceInfo) else data_source |
if no frame segments provided, set them to an empty segment list dictionary
Definition at line 254 of file datasource.py.
| python.datasource.DataSourceInfo.dq_channel_dict = self.dq_channel_name |
Definition at line 303 of file datasource.py.
| python.datasource.DataSourceInfo.dq_channel_name = DEFAULT_DQ_CHANNEL.copy() |
Definition at line 269 of file datasource.py.
| dict python.datasource.DataSourceInfo.dq_vector_off_bits = {} if dq_vector_off_bits is None else dq_vector_off_bits |
Definition at line 281 of file datasource.py.
| dict python.datasource.DataSourceInfo.dq_vector_on_bits = {} if dq_vector_on_bits is None else dq_vector_on_bits |
Definition at line 280 of file datasource.py.
| python.datasource.DataSourceInfo.dq_vector_on_off_bits = zip_dict_values(self.dq_vector_on_bits, self.dq_vector_off_bits, defaults=DEFAULT_DQ_VECTOR_ON_OFF) |
Definition at line 339 of file datasource.py.
| python.datasource.DataSourceInfo.frame_cache = frame_cache.as_posix() if isinstance(frame_cache, Path) else frame_cache |
Definition at line 256 of file datasource.py.
| python.datasource.DataSourceInfo.frame_segments |
if no frame segments provided, set them to an empty segment list dictionary
Definition at line 317 of file datasource.py.
| python.datasource.DataSourceInfo.frame_segments_file = frame_segments_file |
Definition at line 276 of file datasource.py.
| python.datasource.DataSourceInfo.frame_segments_name = frame_segments_name |
Definition at line 277 of file datasource.py.
| dict python.datasource.DataSourceInfo.frame_type = {} if frame_type is None else frame_type |
Definition at line 257 of file datasource.py.
| python.datasource.DataSourceInfo.framexmit_addr = DEFAULT_FRAMXMIT_ADDR.copy() |
Definition at line 266 of file datasource.py.
| python.datasource.DataSourceInfo.framexmit_iface = framexmit_iface |
Definition at line 267 of file datasource.py.
| python.datasource.DataSourceInfo.gps_end_time = gps_end_time.gpsSeconds if isinstance(gps_end_time, LIGOTimeGPS) else gps_end_time |
Definition at line 260 of file datasource.py.
| python.datasource.DataSourceInfo.gps_start_time = gps_start_time.gpsSeconds if isinstance(gps_start_time, LIGOTimeGPS) else gps_start_time |
Definition at line 259 of file datasource.py.
| dict python.datasource.DataSourceInfo.idq_channel_name = {} if idq_channel_name is None else idq_channel_name |
Definition at line 270 of file datasource.py.
| dict python.datasource.DataSourceInfo.idq_state_channel_name = {} if idq_state_channel_name is None else idq_state_channel_name |
Definition at line 271 of file datasource.py.
| python.datasource.DataSourceInfo.injection_filename = self.injections |
Definition at line 301 of file datasource.py.
| python.datasource.DataSourceInfo.injections = injections.as_posix() if isinstance(injections, Path) else injections |
Definition at line 261 of file datasource.py.
| python.datasource.DataSourceInfo.nds_channel_type = nds_channel_type |
Definition at line 265 of file datasource.py.
| python.datasource.DataSourceInfo.nds_host = nds_host |
Definition at line 263 of file datasource.py.
| python.datasource.DataSourceInfo.nds_port = nds_port |
Definition at line 264 of file datasource.py.
| python.datasource.DataSourceInfo.seg = None |
Definition at line 310 of file datasource.py.
| python.datasource.DataSourceInfo.shared_memory_assumed_duration = shared_memory_assumed_duration |
Definition at line 273 of file datasource.py.
| python.datasource.DataSourceInfo.shared_memory_block_size = shared_memory_block_size |
Definition at line 274 of file datasource.py.
| python.datasource.DataSourceInfo.shared_memory_dir = DEFAULT_SHARED_MEMORY_DIR.copy() |
Definition at line 275 of file datasource.py.
| python.datasource.DataSourceInfo.shared_memory_partition = DEFAULT_SHARED_MEMORY_PARTITION.copy() |
Definition at line 272 of file datasource.py.
| python.datasource.DataSourceInfo.shm_assumed_duration = self.shared_memory_assumed_duration |
Definition at line 306 of file datasource.py.
| python.datasource.DataSourceInfo.shm_block_size = self.shared_memory_block_size |
Definition at line 307 of file datasource.py.
| python.datasource.DataSourceInfo.shm_dir_dict = self.shared_memory_dir |
Definition at line 308 of file datasource.py.
| python.datasource.DataSourceInfo.shm_part_dict = self.shared_memory_partition |
Definition at line 305 of file datasource.py.
| python.datasource.DataSourceInfo.state_channel_dict = self.state_channel_name |
Definition at line 304 of file datasource.py.
| python.datasource.DataSourceInfo.state_channel_name = DEFAULT_STATE_CHANNEL.copy() |
Definition at line 268 of file datasource.py.
| dict python.datasource.DataSourceInfo.state_vector_off_bits = {} if state_vector_off_bits is None else state_vector_off_bits |
Definition at line 279 of file datasource.py.
| dict python.datasource.DataSourceInfo.state_vector_on_bits = {} if state_vector_on_bits is None else state_vector_on_bits |
Definition at line 278 of file datasource.py.
| python.datasource.DataSourceInfo.state_vector_on_off_bits = zip_dict_values(self.state_vector_on_bits, self.state_vector_off_bits, defaults=DEFAULT_STATE_VECTOR_ON_OFF) |
Definition at line 338 of file datasource.py.