snax.pipeparts module

snax.pipeparts.mkcondition(pipeline, src, sample_rate, native_rate, instrument, psd=None, psd_fft_length=32, veto_segments=None, nxydump_segment=None, td_whiten=False, track_psd=True, high_pass=True, high_pass_cutoff=12, width=64, channel_name='hoft')[source]

Build pipeline stage to whiten and downsample auxiliary channels.

  • pipeline: the gstreamer pipeline to add this to

  • src: the gstreamer element that will be providing data to this

  • rates: a list of the requested sample rates, e.g., [512,1024].

  • native_rate: Native sampling rate of channel

  • instrument: the instrument to process

  • psd: a psd frequency series

  • psd_fft_length: length of fft used for whitening

  • veto_segments: segments to mark as gaps after whitening

  • nxydump_segment: segment to dump to disk after whitening

  • track_psd: decide whether to dynamically track the spectrum or use the fixed spectrum provided

  • width: type convert to either 32 or 64 bit float

  • channel_name: channel to whiten and downsample

snax.pipeparts.mkextract(pipeline, src, instrument, channel, rate, waveforms, frequency_bins, snr_threshold=5.5, feature_sample_rate=1, min_downsample_rate=128, nxydump_segment=None, feature_mode='timeseries', latency_output=False)[source]

Extract features from whitened timeseries.

snax.pipeparts.mkfdwhiten(pipeline, src, instrument, psd_fft_length=32, track_psd=True, channel_name='hoft')[source]
snax.pipeparts.mkmultiband(pipeline, src, rates, native_rate, instrument, min_rate=128, quality=10)[source]

Build pipeline stage to split stream into multiple frequency bands by powers of 2. return value is a dictionary of elements indexed by sample rate

snax.pipeparts.mkmultisrc(pipeline, data_source_info, channels, verbose=False)[source]

All the things for reading real or simulated channel data in one place.

Consult the append_options() function and the DataSourceInfo class

This src in general supports only one instrument although DataSourceInfo contains dictionaries of multi-instrument things. By specifying the channels when calling this function you will only process the channels specified. A code wishing to have multiple multisrcs will need to call this multiple times with different sets of channels specified.

snax.pipeparts.mktdwhiten(pipeline, src, sample_rate, native_rate, instrument, psd=None, psd_fft_length=32, track_psd=True, high_pass=True, high_pass_cutoff=12, block_duration=250000000, channel_name='hoft')[source]
snax.pipeparts.mktimequeue(pipeline, src, max_time=1)[source]

mkqueue with simplified time arguments

snax.pipeparts.psd_units_or_resolution_changed(elem, pspec, psd)[source]

install signal handler to retrieve Delta f and f_{Nyquist} whenever they are known and/or change, resample the user-supplied PSD, and install it into the whitener.

snax.pipeparts.set_fir_psd(whiten, pspec, firelem, psd_fir_kernel)[source]

compute whitening kernel from PSD